amountOutMinimum
in the ExactInputSingleParams
is set to 0 which makes it prone to sandwich attacks.
When the code has set 0 as amountOutMinimum
, it tells the swap function that the user will accept a minimum amount of 0 output tokens from the swap, opening up the user to a catastrophic loss of funds via MEV bot sandwich attacks. So, when these transactions are seen in the mempool, the user's transaction will be front-run and the user would receive fewer tokens than intended because of 0 slippage.
Losses due to slippage because amountOutMinimum
is set to 0.
Manual review
It is recommended that the function allow the user to set their own amountOutMinimum
to avoid slippage.
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.