ok · 48 nSLOC · 0.97 sF-001 High Swap or liquidation call with minimum output hard-coded to 0
routerV2.swapExactTokensForTokens(amount, 0, path, address(this), deadline);
- Why it matters
- Without a slippage bound the swap accepts any price, so an MEV searcher can sandwich the transaction: move the price before it, let the contract swap at a terrible rate, and move it back afterwards.
- Fix
- Accept a caller-supplied minimum output, or derive one from a trusted oracle price minus a bounded slippage tolerance, and pass it to the swap.