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

Every call to sellProfits function in Fee.sol can be front-runned

Summary

Every call to sellProfits function in Fee.sol can be front-runned because amountOutMinimum is set to 0.

Vulnerability Details

Using amountOutMinimum = 0 tells the swap that the caller will accept a minimum amount of 0 output tokens from the swap. If someone spots this configuration it is easy for him to create a MEV bot to front-run every transaction. This could lead to a significant loss in percentage terms because there is no slippage protection at all.

Impact

Loss of funds.

Tools Used

Manual review.

Recommendations

amountOutMinimum value should be calculated using an oracle.

Support

FAQs

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