Summary
The slippage protection and cooldown guard involve comparison logic that must hold for all valid input combinations. Property-based tests with randomised prices, quantities, and ledger numbers should assert these invariants never silently fail.
Scope
- Generate random (execution_price, max_price) pairs and assert SlippageExceeded is raised iff execution_price > max_price
- Generate random (execution_price, min_price) pairs and assert SlippageExceeded is raised iff execution_price < min_price
- Generate random (last_buy_ledger, current_ledger, cooldown) triples and assert CooldownActive is raised iff current_ledger - last_buy_ledger < cooldown
- Run at least 10 000 iterations per property
- Log the reproducing seed on any invariant violation
Acceptance Criteria
ETA: 24 hours
Coordinate on Telegram
Summary
The slippage protection and cooldown guard involve comparison logic that must hold for all valid input combinations. Property-based tests with randomised prices, quantities, and ledger numbers should assert these invariants never silently fail.
Scope
Acceptance Criteria
ETA: 24 hours
Coordinate on Telegram