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

No slippage check when swapping in `Fees.sol`

Summary

Improper slippage handling in Fees.sol may lead to loss of funds for the protocol and users.

Vulnerability Details

The sellProfits function in Fees.sol swaps tokens to WETH and then transfers to staking contract. The slippage variable amountOutMin for the swap params is set to 0 meaning that the returned WETH amount from the swap could be 0 for a non zero amountIn.

Impact

The protocol would lose funds which should be used in the Staking contract as rewards. This may also lead to users not receiving rewards for their stake.

Tools Used

Recommendations

Calculate a minAmountOut value to be used in the swap instead of using 0.

Support

FAQs

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