Fees contract allow swapping fees generated by the protocol in form of collateral tokens to be swapped to WETH and transfered to Staking contract.
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.
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
Observation
Change sellProfits
function implementation to calculate amountOutMinimum
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.