Skip to content
high MEV / Ordering No SWC entry CWE-682

Missing Slippage Protection on Liquidity/Swap Ops

SAFE-0085 MEV / Ordering Checked automatically by the scanner
1

What goes wrong

Add/remove-liquidity or multi-hop operations accept no minimum amounts, exposing users to sandwiching and unfavorable execution.

2

How to fix it

the pattern that is safe
router.removeLiquidity(a, b, lp, minA, minB, to, deadline); // enforce minimums
Always set minimum outputs on AMM operations.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0085 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs