Summary: DexSwapStrategy.sol does not enforce minimum output amounts, exposing swaps to MEV attacks.
Vulnerability Details:
The executeSwap function in DexSwapStrategy.sol calculates minAmountOut using a fixed multiplier without real-time validation. Front-runners can manipulate DEX pools to worsen swap rates, causing significant slippage.
Code Reference:
Attack Scenario:
A user initiates a large swap. A front-runner sandwiches the transaction, inflating the price before the swap and selling afterward. The user receives 10% less than expected due to unadjusted slippage tolerance.
Impact: Medium – Financial loss for users due to unfavorable swaps.
Recommendations:
Derive minAmountOut dynamically using real-time TWAP oracles.
Allow users to submit custom slippage tolerances.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.