The AaveDIVAWrapper’s non-atomic handling of WToken burns and Aave withdrawals will cause permanent fund loss for users as failed withdrawals irreversibly burn WTokens, leaving users without collateral.
The _redeemWTokenPrivate()
function burns WTokens before withdrawing collateral from Aave V3. If the withdrawal fails (e.g., due to insufficient aToken balance), the WTokens are permanently destroyed, and users receive nothing. This violates atomic transaction principles, as the burn and withdrawal are not rolled back on failure.
Critical Code Flow:
Example Scenario:
User redeems 100 WTokens:
Protocol burns 100 WTokens (supply reduced).
Aave withdrawal fails (e.g., aToken balance = 95 due to negative interest).
Result: User’s 100 WTokens are burned, but they receive 0 collateral.
High Severity: Users permanently lose WTokens if Aave withdrawals fail post-burn. Validation criteria:
Aave withdrawals can fail (e.g., negative interest, slashing).
WToken burns are irreversible (ERC20 burn()
cannot be undone).
Steps to Reproduce:
User deposits 100 USDC:
aToken = 100
, wTokenSupply = 100
.
Owner claims yield:
claimYield()
reduces aToken balance to 100.
Aave imposes 5% negative interest:
aToken = 95
.
User calls redeemWToken(100)
:
Code burns 100 WTokens (burn()
).
Aave withdraw(100)
fails (balance = 95).
Outcome: User loses 100 WTokens, receives 0 USDC.
Manual Review
Reorder operations to ensure atomicity: Withdraw from Aave first, then burn WTokens.
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.