When users open or close leveraged positions, the contract uses flash loans to execute the trades. After swapping tokens through 1inch and repaying the flash loan, there's usually a small amount of leftover tokens (due to favorable swap rates). The contract currently tries to be helpful by automatically supplying these leftover tokens back into Aave to strengthen the user's position.
Here's where things break: If Aave has frozen the asset, reached its supply cap, or paused the reserve (which happens regularly for risk management), the supply() call will fail. When this happens, the entire transaction reverts — meaning the user can't close their position at all, even though they have more than enough funds to repay the flash loan.
Why this matters: Imagine you're watching your leveraged position approach liquidation during a market crash. You desperately try to close it, but Aave has temporarily frozen USDC deposits due to market volatility. The contract has your money, the swap succeeded, the flash loan can be repaid — but you're stuck. The transaction keeps failing because the contract insists on depositing those extra few cents back into Aave. Meanwhile, your position gets liquidated and you lose everything.
Likelihood:
Aave governance regularly freezes assets during market stress
Supply caps get hit during high demand periods
Impact:
Users become trapped in losing positions during critical moments
Guaranteed liquidation in time-sensitive scenarios
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.
The contest is complete and the rewards are being distributed.