The AaveDIVAWrapper protocol integrates with Aave V3 to generate yield on user deposits. It uses Aave's aTokens which implement a rebasing mechanism where the token's value increases through exchange rate adjustments rather than balance increases.
The AaveDIVAWrapper protocol's yield calculation mechanism fundamentally mishandles how Aave V3's aToken rebasing works. The protocol mints wTokens 1:1 with user deposits and attempts to track yield by comparing raw aToken balances with wToken supply in _getAccruedYieldPrivate().
The core issue lies in the protocol's assumption that yield accrual increases aToken balances directly. However, Aave V3's aTokens accrue value through exchange rate adjustments while maintaining constant token quantities. The current implementation in _getAccruedYieldPrivate() only compares raw token quantities:
This leads to a situation where real yield generated through exchange rate increases is not captured by the calculation, resulting in incorrect yield accounting and potential loss of funds.
The protocol systematically fails to account for actual yield generated through Aave's rebasing mechanism, leading to incorrect yield distribution and potential permanent loss of funds for users when yield is claimed or positions are redeemed.
High. The bug directly impacts core protocol functionality by breaking yield calculations and leading to permanent loss of user funds through incorrect accounting of generated yields.
User deposits 100 USDC into protocol
Protocol receives 100 aUSDC from Aave
Protocol mints 100 wUSDC to user
After time passes, Aave rebase occurs
aUSDC exchange rate increases to 1.05
100 aUSDC now worth 105 USDC
Raw aToken balance remains at 100
Owner calls claimYield()
_getAccruedYieldPrivate() compares 100 (aToken balance) vs 100 (wToken supply)
Returns 0 yield despite 5 USDC in actual accrued value
When user redeems wTokens
Receives less than entitled amount due to incorrect yield accounting
Lost yield cannot be recovered
Manual review
The protocol should track yields using Aave's scaled balances and exchange rates instead of raw token comparisons. This ensures accurate accounting of yield generated through the rebasing mechanism.
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.