sellProfits()
in Fees.sol is prone to front-running attacks
amountOutMinimum
in sellProfits()
is hardcoded to 0, which means slippage is essentially set 100%. MEV front-running bots is able to pay higher gas fee and protocol will end up with unfavorable trades.
Side note: Not all tokens have a liquidity pool pair with WETH.
Protocol can potentially lose all profits if MEV bots detect a pair that has not yet been deployed or a pool with low liquidity, this could result in extreme price volatility. In addition, sellProfits()
is marked as public, makes it easier for attacker to perform swap on behalf of protocol.
Protocol can lose all profits
Manual Review
Create a separate function to manage amountOutMinimum instead of hardcoding 0.
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.