Problem Statement
Existing fuzz tests live in fuzz_tests.rs but cover only a handful of
inputs. The interesting adversarial inputs (dust amounts, exact-1.0
ratios, max u32 swap counts) are unprobed.
Expected Outcome
A proptest harness runs 30 random sequences per fuzz target (swap,
add_liquidity, …) and asserts invariants + return value bounds.
Acceptance Criteria
- New
src/fuzz.rs with proptest! strategy module.
- 5 strategy variables: amount, fee_bps, oracle_staleness, slippage,
user_balance.
cargo test fuzz_ --workspace runs in < 90 s.
Files Affected
peerx-contracts/counter/src/fuzz.rs, Cargo.toml.
Dependencies Issue #10.
Difficulty / Effort 🥑 / M
Labels testing, fuzz, priority/medium
Problem Statement
Existing fuzz tests live in
fuzz_tests.rsbut cover only a handful ofinputs. The interesting adversarial inputs (dust amounts, exact-1.0
ratios, max u32 swap counts) are unprobed.
Expected Outcome
A proptest harness runs 30 random sequences per fuzz target (swap,
add_liquidity, …) and asserts invariants + return value bounds.
Acceptance Criteria
src/fuzz.rswithproptest!strategy module.user_balance.
cargo test fuzz_ --workspaceruns in < 90 s.Files Affected
peerx-contracts/counter/src/fuzz.rs,Cargo.toml.Dependencies Issue #10.
Difficulty / Effort 🥑 / M
Labels
testing,fuzz,priority/medium