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.
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.
Loss of funds
Manual review
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.