Summary
Extend buy and sell contract functions with an optional max_slippage_bps parameter that causes the transaction to revert if the actual price impact exceeds the caller's specified tolerance.
Scope
- buy(key_id, amount, max_slippage_bps?) and sell(key_id, amount, max_slippage_bps?) updated
- Price impact computed against current curve state before execution
- SlippageExceeded error returned with actual_bps and max_bps when violated
- max_slippage_bps of 0 or absent skips the check (opt-in)
- Impact computed after fee deduction
Acceptance Criteria
ETA
24 hours
Summary
Extend buy and sell contract functions with an optional max_slippage_bps parameter that causes the transaction to revert if the actual price impact exceeds the caller's specified tolerance.
Scope
Acceptance Criteria
ETA
24 hours