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

Negative Interest Rate Handling (

Summary

The contract assumes that Aave's aToken balance will always exceed the total wToken supply. However, if Aave implements negative interest rates (historically rare but possible in DeFi), the aToken balance could decrease below the wToken supply. This creates a scenario where the redeem of wTokens becomes impossible, leading to permanent fund loss.

Vulnerability Details

  • The function _getAccruedYieldPrivate calculates yield as aTokenBalance - wTokenSupply.

  • If aTokenBalance < wTokenSupply, this underflows, but Solidity 0.8.x reverts. However, the code uses aTokenBalance > wTokenSupply ? aTokenBalance - wTokenSupply : 0, masking the issue.

  • During redemption (_redeemWTokenPrivate), the contract attempts to withdraw _wTokenAmount from Aave. If the aToken balance is insufficient, the transaction reverts, freezing all redemptions.

Impact

Loss of funds

Tools Used

Manual review

Recommendations

Updates

Lead Judging Commences

bube Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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