An atatcker can stuff the holders array to DoS the liquidation transaction , where many state changes are happening as shown below.
The vulnerability lies in the state layout and design of Liquidation pool. We use array to store the holders addresses.
A DoS attacker can make the liquidations never happen due to the out of gas error. An attacker can fill the holders array with 1000+ entries. So now the LiquidationPool.distributeAssets has to run 1000 holders * 5 assets so around 5000 transferFrom state changes + another 5000+ reward state change + another 1000+ positions state changes.
see the arrow marks below for the state changes.
HIGH (leaving bad debts to Liquidation pool stakers)
Manual review
Redesign the LiquidationPool control, to not do these many state change, but just use ERC4626 vault architecture, where shares are being used to denote how many assets staked, and whenever the balance of the vault increases, the price of each share increases.
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.