calculateUnwindParams applies a hardcoded 5% slippage buffer to the collateral withdrawal amount. This single fixed value applies to all token pairs, all liquidity environments, and all market conditions, with no ability to adjust.
Likelihood:
Illiquid or exotic token pairs routinely experience slippage beyond 5% — the buffer will be insufficient during stress periods
In stable conditions with deep liquidity, 5% causes unnecessary over-withdrawal that gets locked in Aave per M-2
Impact:
Under high volatility or thin liquidity: swap proceeds fall short of flash loan + premium, unwind reverts — position cannot be closed
Under normal conditions, excess collateral is over-withdrawn and re-deposited to Aave, requiring additional steps to fully exit
Replace the hardcoded 1050 multiplier with a configurable slippageBps parameter. Allowing the caller to specify slippage at call time lets the owner account for current market conditions, while owner-controlled bounds prevent malicious or accidental over-withdrawal.
Expose slippageBps as a caller parameter or owner-settable state variable with enforced bounds (e.g., 50–1000 bps).
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.