The AaveDIVAWrapper
protocol is vulnerable to flash loan exploitation, allowing attackers to temporarily inflate the protocol’s aToken balance and claim excessive yields within a single transaction. This vulnerability arises from the yield calculation mechanism relying solely on real-time token balances without accounting for transaction-level temporal manipulations. Exploiting this issue can lead to drained reserves, protocol insolvency, and loss of user trust.
The yield calculation in the _getAccruedYieldPrivate
function compares the current aToken balance to the total supply of wTokens:
Dynamic Yield Calculation: The function dynamically calculates yield based on the current aToken balance without considering changes within a single transaction.
Lack of Temporal Safeguards: The absence of time-based validations enables attackers to manipulate balances temporarily using flash loans, exploiting the protocol's yield mechanism.
Borrow a Flash Loan
The attacker initiates a flash loan from a lending platform such as Aave, borrowing 1,000,000 units of the collateral token.
Temporarily Inflate aToken Balances
The attacker deposits the borrowed tokens into the protocol within the same transaction. This action significantly inflates the protocol’s aToken balance.
Trigger Excessive Yield Calculation
The attacker calls the claimYield
function, exploiting the inflated aToken balance to claim an excessive amount of yield.
Repay the Flash Loan
The attacker withdraws the tokens and repays the flash loan, leaving the protocol with drained reserves due to the excessive yield claim.
Below is a simplified example of how an attacker could exploit the vulnerability:
Financial Losses:
Exploiting the protocol’s yield calculation drains reserves, leading to significant financial losses.
Protocol Insolvency:
Depleted reserves may render the protocol unable to fulfill legitimate yield claims, causing a halt in operations.
Eroded User Trust:
Users lose confidence in the protocol’s security and reliability, reducing adoption and participation.
2. Use Historical Balance Snapshots
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.