The sellProfits function lacks slippage protection, making it vulnerable to potential sandwich attacks which could lead to financial losses for swappers
Take a look at Fees.sol#L24-L45
As seen the sellProfits() function is designed to swap loan tokens for collateral tokens from liquidations. The function uses ISwapRouter's exactInputSingle method to make this swap.
However, the function does not enforce slippage protection. This is evident from the fact that amountOutMinimum is set to zero which exposes the function to sandwich attacks-> financial loss.
Significant financial losses whenever a swap gets sandwiched.
Manual Audit
Implement a mechanism to enforce slippage protection in the sellProfits function. This can be done by requesting a non-zero minimum output amount 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.