Core Contracts

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

Zeno::mint(), Missing zero address check for to address

Summary

In Zeno's mint() function, because it does not check whether the to address is address(0), tokens can be minted under the name of a non-existent user, resulting in the tokens being permanently lost.

Vulnerability Details

function mint(address to, uint256 amount) external onlyOwner {
if (amount == 0) {
revert ZeroAmount();
}
_mint(to, amount);
totalZENOMinted += amount;
}

no check minter address

Impact

If a zero address is assigned to a miner, the mining rights could be burned, leading to a situation where new tokens cannot be minted. This could occur unintentionally due to errors in the code or logic. Furthermore, if the mining function does not properly check and accepts the zero address, tokens may be minted to the zero address and become permanently lost.

Recommendations

function mint(address to, uint256 amount) external onlyOwner {
+ if (to == address(0)) {
+ revert ZeroAddress();
+ }
if (amount == 0) {
revert ZeroAmount();
}
_mint(to, amount);
totalZENOMinted += amount;
}
Updates

Lead Judging Commences

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