HardhatDeFi
15,000 USDC
View results
Submission Details
Severity: high
Invalid

Incorrect Yield Tracking Leading to Yield Theft

Summary

The claimYield function miscalculates available yield, allowing attackers to drain funds.

Vulnerability Details

The contract tracks yield as aToken.balanceOf(address(this)) - totalWTokenSupply. However, if aToken balances increase due to Aave interest before totalWTokenSupply is updated (e.g., via a flash loan), the yield calculation becomes inflated.

Impact

Malicious users could exploit timing mismatches to steal unclaimed yield.

Tools Used

Manual review of AaveDIVAWrapperCore.sol yield logic.

Recommendations

Track yield via a cumulative yieldPerShare variable, similar to staking vaults.

Updates

Lead Judging Commences

bube Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.