20,000 USDC
View results
Submission Details
Severity: high
Valid

amountOutMinimum is set to 0. Makes it prone to slippage.

Summary

amountOutMinimum in the ExactInputSingleParams is set to 0 which makes it prone to sandwich attacks.

Vulnerability Details

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.

Impact

Losses due to slippage because amountOutMinimum is set to 0.

Tools Used

Manual review

Recommendations

It is recommended that the function allow the user to set their own amountOutMinimum to avoid slippage.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.