The sellProfits
function, which is used to swap tokens into WETH, which is then transferred into the staking rewards contract, does not have any slippage controls. This can result in MEV which results in significantly less WETH than expected when doing this swap.
The sellProfits
function is defined as follows:
The amountOutMinimum
and sqrtPriceLimitX96
are both set to 0, meaning that there are no slippage protections for this swap.
Rewards for stakers will be significantly lower due to loss of profits from swaps to the WETH reward token.
Manual review
Either allow users to specify the slippage parameters in the sellProfits
function, or calculate a amountOutMinimum
value based on twapp.
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.