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

No slippage protection in Fees.sellProfits()

Summary

No slippage protection in Fees.sellProfits() can lead to loss of funds for users and bad reputation.

Vulnerability Details

The Fees.sellProfits() function swaps loan tokens for collateral tokens from liquidations. So it should be called only by a lender but this is not the issue here. The uniswap V3 SwapRouter is imported to handle the above mentioned swap. However amountOutMinimum is set to 0. This basically means that there is no slippage protection at all and this could result in a significant loss of funds as not having slippage protection is an excellent environment for front runs and sandwich attacks. Setting amountOutMinimum to 0 literally means that the minimum amount of tokens that the user is willing to get from the swap is 0.

Impact

Loss of funds , bad reputation

Tools Used

Manual review

Recommendations

Consider applying slippage parameters

Support

FAQs

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