Core Contracts

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

Unused _minter and _burner Variables in RToken Contract

Summary

The RToken contract contains unused variables such as _minter and _burner, which are set by functions (setMinter, setBurner) but never utilized in the core minting or burning processes. This introduces unnecessary complexity, confusion, and potential for errors in contract logic. While _assetAddress is used in functions related to asset transfers, the _minter and _burner variables have no effect, raising concerns about the clarity and maintainability of the code.

Vulnerability Details

  • Unused Variables: The contract defines the _minter and _burner variables, which are set by the functions setMinter and setBurner respectively. However, these variables are not referenced anywhere in the contract, particularly in the minting (mint) or burning (burn) functions, leading to ambiguity about their intended usage.

  • Unclear Roles: The presence of these unused variables may cause confusion for developers and auditors regarding the intended functionality and control mechanisms in the contract. The _minter and _burner variables could suggest that only specific addresses are authorized to mint or burn tokens, but without their usage, there is no enforcement of such logic.

Impact

  • Low to Medium: The unused _minter and _burner variables do not directly cause security vulnerabilities but contribute to unnecessary complexity. Their lack of usage could result in misconfiguration or confusion, as it is unclear why these roles are defined if they are not enforced. In the long term, unused code may lead to future errors or vulnerabilities, especially if developers mistakenly assume these variables are part of the core logic.

  • Potential for Future Issues: If these unused variables are mistakenly assumed to function as access control for minting or burning operations, there is a risk that they could be inadvertently exploited or misconfigured.

Tools Used

Manual Review

Recommendations

Remove Unused Variables: If the _minter and _burner variables are not necessary for the intended functionality, they should be removed to simplify the contract and reduce the attack surface.

Updates

Lead Judging Commences

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