Core Contracts

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

ZENO Contract Lacks `decimals()` Override

Summary

The ZENO contract does not override the decimals() function from OpenZeppelin's ERC-20 implementation, which defaults to 18 decimals. However, according to the sponsor, ZENO is intended to have 6 decimals, as it is paired with USDC.

Vulnerability Details

The ZENO contract inherits OpenZeppelin's ERC-20, which implements decimals function like this:

/node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:83
83: function decimals() public view virtual returns (uint8) {
84: return 18;
85: }

But in Zeno contract there is no decimals function overriding. Therefore without overriding decimals(), the contract may not function as expected, leading to potential inconsistencies in token calculations.

Impact

Discrepancy in decimal precision may cause incorrect token transfers, balances, or integrations with external systems expecting 6 decimals.

Tools Used

Manual Review

Recommendations

Override the decimals() function to return 6 to align with USDC. Add this code to Zeno contract.

function decimals() public override view virtual returns (uint8) {
return 6;
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Appeal created

0xaman Submitter
7 months ago
inallhonesty Lead Judge
7 months ago
inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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

Give us feedback!