A logical flaw in the AaveDIVAWrapper
contract allows users to repeatedly claim yields without restriction, bypassing entitlement checks. This vulnerability stems from inadequate state tracking in the yield calculation and redemption process, permitting attackers to withdraw unlimited funds from the protocol. The absence of reentrancy requirements makes this exploit simple and highly impactful, threatening the protocol’s reserves and user trust.
The core issue lies in the yield claiming functions (redeemWToken
and redeemPositionToken
), which calculate and distribute yields solely based on the user’s current wToken
balance. No mechanism is in place to record or restrict previously claimed yields, leaving the system vulnerable to repetitive withdrawals.
Code Reference:
This lack of state updates enables attackers to call the function multiple times with the same wToken
balance, continually draining funds from the protocol.
The attacker deposits collateral into the protocol and receives
wTokens
as a representation of their holdings.
The attacker accrues yields over time and initiates a legitimate claim by calling
redeemWToken
.Without any tracking of previously claimed amounts, the attacker repeats the claim multiple times using the same
wToken
balance.
Protocol reserves are drained as the attacker claims more than their entitled share.
Legitimate users are unable to withdraw their rightful yields due to depleted reserves.
An attacker strategically deposits and repeatedly claims yields during periods of high protocol activity, ensuring maximum reserve depletion. This disrupts operations for other users and erodes trust in the protocol.
Unauthorized Withdrawals: Attackers withdraw funds exceeding their legitimate entitlement, depleting protocol reserves.
Financial Discrepancy: The yield distribution mechanism becomes unsustainable, leading to operational failures.
Reputation Loss: User confidence is severely impacted due to perceived incompetence in protocol security.
Introduce a mapping to track and limit claimed yields:
Implement caps on allowable yield claims based on either predefined thresholds or dynamic calculations derived from user balances:
Adopt the best practice of updating state variables before transferring funds to ensure atomicity and prevent exploits:
Enable the owner to halt yield claims during anomalies:
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.