No Slippage Protection while Swapping tokens through uniswap router.
In Fees contract, sellProfits method uses Uniswap Router which uses ExactInputSingleParams method call to swap loan tokens for collateral tokens. But the value of amountOutMinimum is set to be zero which allows 100% Value Slippage.
As there is no slippage control while swapping swap loan tokens for collateral tokens which means that a malicious actor could, e.g., trivially insert transactions before and after the naive transaction (using the infamous "sandwich" attack), causing the smart contract to trade at a radically worse price, profit from this at the caller's expense, and then return the contracts to their original state, all at a low cost.
Loss of Funds.
Manual Review
Please consider to use a require check at the end of swap to make sure that slippage is not higher than caller allowed slippage.
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.