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

Missing Zero-Amount Check in _redeemWTokenPrivate()

Summary

The _redeemWTokenPrivate() function does not validate whether _wTokenAmount is zero before executing. This can lead to unnecessary gas consumption and inefficient external calls to the burn() and withdraw() functions, even when no actual redemption is taking place.

Vulnerability Details

Permlink: https://github.com/Cyfrin/2025-01-diva/blob/1b6543768c341c2334cdff87b6dd627ee2f62c89/contracts/src/AaveDIVAWrapperCore.sol#L452

Impact

unnecessary gas consumption.

Tools Used

Manual Review

Recommendations

Add a require statement at the beginning of the function:

if (_wTokenAmount == 0) revert ZeroAmount()
Updates

Lead Judging Commences

bube Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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