Core Contracts

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

Batch Implementation Discrepancy

Summary]

The RAACNFT contract is expected to implement batch functionality for NFT minting as described in its documentation. However, the `addNewBatch` function only increments the `currentBatchSize` counter without implementing any additional batch processing logic, resulting in a discrepancy between the documented behavior and the actual code.

Vulnerability Details

The `addNewBatch` function is defined as follows:
```solidity
function addNewBatch(uint256 _batchSize) public override onlyOwner {
if (_batchSize == 0) revert RAACNFT__BatchSize();
currentBatchSize += _batchSize;
}
```
This function merely increases the `currentBatchSize` value, with no further handling of batch operations, such as grouping token IDs or managing batch minting processes. This is inconsistent with documentation that suggests more extensive batch functionality.
If the owner calls `addNewBatch(5)`, the function will simply increase the currentBatchSize by 5. However, there is no observable change in how NFT minting or management operates—no grouping or batching logic is triggered. This behavior confirms that the batch functionality is not fully implemented as described.

Impact

Inconsistent Behavior: Users or integrators expecting a full-fledged batch minting mechanism may be misled by the documentation, leading to confusion or misapplication.
Functional Limitations: The contract does not support advanced batch operations (e.g., processing multiple NFT mints as a single transaction) which could limit scalability or efficiency.
Documentation Discrepancy: Misalignment between the documented intent and the implemented logic may result in incorrect expectations regarding NFT supply management and minting procedures.

Tools Used

Manual Review

Recommendations

Clarify Intent:
Review the protocol’s intended design for batch operations. If a comprehensive batch minting mechanism is desired, extend the function to include additional logic (e.g., managing arrays of token IDs, grouping minting operations, etc.).
Align Documentation:
If the batch functionality is intentionally limited to merely tracking batch size, update the documentation to accurately reflect this behavior and remove any misleading implications of a more complex batch system.
Implement Unit Tests:
Create tests to verify the behavior of the batch functionality and ensure that any changes or enhancements meet the intended design.
By addressing these recommendations, the protocol can ensure that both the withdrawal mechanism and batch functionality align with the intended design and provide a better user experience.
Updates

Lead Judging Commences

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