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

Missing slippage control can cause loss of funds

Summary

There is no slippage protection when trading using Uniswap which can cause loss of funds.

Vulnerability Details

In Fees.sol there is a function that allows users to sell a desired token for WETH. However, when calling exactInputSingle, in the params object the amount0Minimum is set to 0 which means that the user allows receiving 0 tokens. If the transaction stays for too long in the mempool or a MEV bot frontruns the user, he can lose his assets and receive little to no WETH because of price fluctuation.

Impact

User tries to swap a token for WETH, but in result gets little to no WETH.

Tools Used

Manual Review

Recommendations

Add a second parameter to the sellProfits function that lets the user specify a desired slippage control.

Support

FAQs

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