Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Invalid

Users will spent more Gas if ```amount == 0```

Summary

In ZENO.solif user call redeemAll function when balance is zero. Then user will spent more gas on calling reedemAllfunction . Because there is no checking for amount==0 or not. If that is present there then user will spent less gas when their amout is zero.

Vulnerability Details

function redeemAll() external nonReentrant {
if (!isRedeemable()) {
revert BondNotRedeemable();
}
+ if(amount ==0 ) revert AmountIsZero;
uint256 amount = balanceOf(msg.sender);
totalZENORedeemed += amount;
_burn(msg.sender, amount);
USDC.safeTransfer(msg.sender, amount);
}

Impact

User will spent more gas when amount==0and call redeemAllFunction.

Tools Used

Maual Review

Recommendations

Updates

Lead Judging Commences

inallhonesty Lead Judge 5 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.