Slippage Parameter Missing or Ineffective
What it detects
The detector checks for exchange functions that fail to bound price movement with a slippage parameter. Without this guard, trades can execute at unfavorable rates if the market shifts.
Typical symptoms
- Swap functions that accept any output amount
- No check against the minimum received tokens
Solidity snippet (v0.8.25)
pragma solidity ^0.8.25;
contract Swap {
function trade(uint256 amountIn) external {
// No slippage check on the output amount
// tokensOut = getPrice(amountIn);
}
}
Why it matters on EVM
Ineffective slippage protection exposes users to major losses from price manipulation during transaction execution.