Summary
The flaw arises from caching aToken addresses instead of dynamically fetching them. Aave frequently upgrades aTokens, meaning any stored aToken reference will eventually break.
->By fetching aTokens dynamically or allowing updates, the protocol can ensure withdrawals always work, even after Aave upgrades.
AaveDIVAWrapper contract caches aToken addresses during collateral registration. However, Aave frequently upgrades aToken contracts, replacing them with new implementations. Because the contract never updates stored aToken addresses, users lose access to collateral withdrawals whenever Aave changes the aToken implementation.
Cached aToken Addresses Become Stale
The contract stores aToken addresses at the time of collateral registration:
However, Aave upgrades aTokens periodically.
When the cached aToken address does not match Aave’s latest implementation, all interactions fail.
Withdrawals Use Outdated aToken Addresses
The _redeemWTokenPrivate function relies on the cached aToken:
If Aave replaces the aToken, this call fails because the contract is trying to interact with a non-existent or deprecated aToken.
Aave Upgrades aToken
Aave replaces aUSDC v1 with aUSDC v2, changing the aToken address.
Users Attempt to Withdraw Collateral
The AaveDIVAWrapper still holds the old aToken address.
When a user tries to redeem wTokens, the withdrawal fails because the aToken no longer exists.
Users Cannot Withdraw Funds
Their collateral is still in Aave, but they cannot access it through the wrapper.
The protocol effectively locks user funds until a manual contract update is made.
💰 Funds Stuck: Users cannot redeem wTokens.
⛔ Protocol Breakage: Every Aave aToken upgrade requires a manual contract fix.
📉 Loss of User Trust: Users panic due to withdrawals failing unexpectedly.
Register USDC as Collateral
Deposit USDC & Receive wTokens
Aave Upgrades aUSDC
The old aToken address is replaced in Aave’s pool.
User Tries to Withdraw
Instead of storing aToken addresses, retrieve them dynamically whenever needed.
Introduce a function to update aToken addresses manually
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.