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

Hardcoded `amountOutMinimum` value in `Fees.sol`

Summary

In Fees.sol, the amountOutMinimum value is set to 0, which can potentially allow a third party to frontrun the transaction and lead to a swap at a price that is not favorable to the user.

Vulnerability Details

In Fees.sol:38, when calling the exactInputSingle function of the swapRouter, an ExactInputSingleParams struct sets the amountOutMinimum parameter to 0, which can lead to the transaction being frontrun and the trade may end up being executed at a price that's not favorable to the user.

Impact

Potential loss of funds for the user in case the transaction is executed at an unfavorable price.

Tools Used

Manual Review

Recommendations

It is recommended to not hardcode the amountOutMinimum in the smart contract, and instead receive this value from the user.

Support

FAQs

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

Give us feedback!