_executeUnwindOperation calculates collateral to withdraw using liqThreshold (liquidation threshold, e.g. 85%) from Aave's reserve config. The correct value to use is LTV (e.g. 80%). Because liquidation threshold is always higher than LTV, using it in the denominator yields a smaller collateral withdrawal amount per unit of debt repaid.
Likelihood:
Every unwind operation uses this calculation — the incorrect parameter is used on every call
The gap between LTV and liquidation threshold is typically 4–8 percentage points (e.g., LTV 80%, liqThreshold 85%)
Impact:
Collateral withdrawn is systematically lower than required to cover the full swap back to the debt token
Swap receives less collateral input → returnAmount < totalDebt → unwind reverts
Positions with tight margins cannot be unwound, permanently trapping funds
Change liqThreshold to ltv in the destructuring of getReserveConfigurationData. LTV is the correct metric for calculating how much collateral can be safely withdrawn against a given debt amount — the liquidation threshold is a different concept used for determining when a position becomes liquidatable.
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.