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

Fees.sol is vulnerable to frontrun sandwich attack

Summary

The sellProfits() in Fees.sol is vulnerable to frontrun sandwich attack as amountOutMinimum parameter in ISwapRouter is set to 0 value.

Vulnerability Details

As amountOutMinimum parameter is hardcoded to zero value the ISwapRouter call would be vulnerable for frontrun sandwich attack which will lead to getting an unusually bad price for a trade due to a front running sandwich attack.
In official documentation it is mentioned that it should be set to zero and should be set using SDK or an onchain price oracle .
(https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps)

Impact

Getting an unusually bad price for a trade due to a front running sandwich

Tools Used

Manual Review

Recommendations

Always calculate an estimate return value for amountOutMinimum and not set to 0.

Support

FAQs

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