Core Contracts

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

Documentation vs Implementation Mismatch in RAACNFT Contract

Description

The RAACNFT contract has a significant discrepancy between its documented functionality and actual implementation. While the documentation specifies batch minting as a key feature, the contract lacks any batch minting implementation. Additionally, there are unused state variables and functions related to batch operations.

// Unused state variable
uint256 public currentBatchSize = 3;
// Unused function that can't be reset
function addNewBatch(uint256 _batchSize) public override onlyOwner {
if (_batchSize == 0) revert RAACNFT__BatchSize();
currentBatchSize += _batchSize;
}

Impact

  1. Misleading Documentation:

    • Users expecting batch minting functionality will find it unavailable

    • Integration partners may build systems assuming batch capabilities exist.

  2. Dead Code:

    • Unnecessary storage variable (currentBatchSize) wastes gas on deployment

    • Unused function (addNewBatch) adds complexity without value

    • No way to reset or modify batch size except increase

  3. Contract Bloat:

    • Contract size larger than needed

    • Higher deployment costs

Fix Recommendations

Option 1: Implement Batch Minting (Recommended)

Option 2: Remove Unused Functionality

If batch minting is not intended:

  1. Remove currentBatchSize state variable

  2. Remove addNewBatch function

  3. Update documentation to remove batch minting references

  4. Remove related interface functions

Tools Used

  • Manual code review

  • Documentation analysis

  • Foundry testing framework

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
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.