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

sellProfits call might be front-run

Summary

Fees contract allow swapping fees generated by the protocol in form of collateral tokens to be swapped to WETH and transfered to Staking contract.

Vulnerability Details

Current sellProfits function calls Uniswap V3 ExactInputSingleParams function with hard-coded amountOutMinimum 0. That will allow swap to go through no matter how many weth we will get from the swap.

Impact

MEV sandwich bots may front-run contract's swap call and received weth amount might be much lower then anticipated.

According to the Uniswap docs - For a real deployment, this value should be calculated using our SDK or an onchain price oracle - this helps protect against getting an unusually bad price for a trade due to a front running sandwich or another type of price manipulation

Tools Used

Observation

Recommendations

Change sellProfits function implementation to calculate amountOutMinimum

Support

FAQs

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