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

Rewards can be lost due to unlimited slippage

Summary

sellProfits is vulnerable to sandwich attack

Vulnerability Details

There's a permissionless function sellProfits in Fees.sol. Since everyone can trigger this function, an attacker can launch a sandwich attack to steal the funds.
Following code tells the swap that the contract will accept a minimum amount of 0 output tokens from the swap, opening up the contract to a catastrophic loss of funds via MEV bot sandwich attacks.

amountOutMinimum: 0,

Impact

Rewards can be lost

Tools Used

Manual Review

Recommendations

Restrict the sellProfits function and allow owner to specify slippage. Also add a check that swapped amount is not less than amountOutMinimum

Support

FAQs

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