When unwinding, the protocol needs to withdraw enough collateral from Aave so that, after swapping via 1inch, it can obtain sufficient debt tokens to repay the flash loan (and/or debt). The helper calculateUnwindParams() estimates the needed collateral using oracle prices, then adds a fixed 5% buffer.
This approach is brittle:
Underestimation: Real slippage and MEV can exceed 5% (especially for large trades or thin liquidity), causing the unwind flow to revert because the swap cannot meet _minReturnAmount or the flash loan cannot be repaid.
Overestimation: In normal conditions slippage can be far less than 5%, meaning the protocol withdraws more collateral than required, reducing efficiency and complicating correct “return equity to user” accounting.
Likelihood:
This logic is used whenever users rely on calculateUnwindParams() to prepare unwind inputs; the 5% multiplier is always applied.
Slippage > 5% is realistic during market volatility, MEV sandwiching, low-liquidity routes, or large unwind sizes relative to pool depth.
Impact:
Unwind DoS / Stuck Positions: If actual slippage exceeds 5%, the unwind transaction can repeatedly revert, preventing users from closing risk.
Inefficiency / Incorrect Withdrawals: If slippage is much lower than 5%, the protocol may withdraw more collateral than needed, which can worsen equity accounting and increase exposure to other unwind bugs.
Make the slippage buffer configurable (per-call or per-user) and rely on the DEX quote + _minReturnAmount for the actual protection.
Minimal change (remove the hardcoded multiplier and let _minReturnAmount / quotes drive the unwind):
Better change (parameterize the buffer in basis points):
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.