Stratax::_executeUnwindOperation calculates how much collateral to withdraw from Aave after repaying a portion of debt. The formula is intended to withdraw exactly the collateral that backed the repaid debt, scaled by the asset's LTV ratio. The code comment on line 574 explicitly names the denominator variable as ltv.
The destructuring of getReserveConfigurationData captures the third return value (index 2 = liquidationThreshold) and names it liqThreshold, while the second return value (index 1 = ltv) is skipped. For WETH on Aave (ltv=7500, liqThreshold=8000), using liqThreshold in the denominator inflates it by 8000/7500, which reduces collateralToWithdraw by exactly 6.25% on every call. The shortfall remains locked in Aave on the contract's Aave balance and is not returned to the user.
Likelihood:
Every call to unwindPosition or executeOperation on any collateral token where ltv != liqThreshold triggers the loss — which is true for all standard Aave v3 assets (e.g. WETH: ltv=7500, liqThreshold=8000).
The loss is deterministic and accumulates with every partial unwind; a user performing 10 partial unwinds on a $10,000 position loses approximately $83 in collateral.
Impact:
The user receives 6.25% less collateral than they are entitled to on each unwind. The shortfall (e.g. ~0.028 WETH per 1000 USDC of debt) stays on the contract's Aave deposit and cannot be individually recovered.
Cumulative losses scale linearly with the number of unwind iterations and the size of the position, representing a direct and silent financial loss for every user who closes or partially unwinds a position.
This changes the destructuring to capture index 1 (ltv) instead of index 2 (liquidationThreshold), matching the intent described in the comment on line 574.
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.