Core Contracts

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

Unbounded token minting in RAACMinter's tick function

Summary

The tick() function in RAACMinter allows unlimited token minting based on the number of blocks passed since the last update. This leads to uncontrolled token inflation and manipulation of the token supply through delayed function calls.

Vulnerability Details

function tick() external nonReentrant whenNotPaused {
// ... other code ...
uint256 blocksSinceLastUpdate = currentBlock - lastUpdateBlock;
if (blocksSinceLastUpdate > 0) {
uint256 amountToMint = emissionRate * blocksSinceLastUpdate;
// ... minting code ...
}
}

The calculation on line 265 allows blocksSinceLastUpdate to grow indefinitely. When multiplied by the emissionRate, this results in excessive token minting.

Attack Vector:

  1. An attacker monitors the contract for periods of inactivity

  2. The attacker waits for a significant number of blocks to pass (e.g., 1 month = 216,000 blocks)

  3. With an emission rate of 1000 RAAC per day (0.138 RAAC per block), the attacker calls tick()

  4. This results in a mint of 29,808 RAAC tokens in a single transaction (216,000 * 0.138)

  5. The attacker repeats this process by waiting for another period of inactivity

Impact

  1. Economic Disruption:
    Sudden large token mints create supply shocks
    Token value decreases due to unexpected inflation
    Market manipulation through controlled large mints

  2. System Instability:
    Emission schedule becomes unpredictable
    Token distribution deviates from intended economics
    Related protocols depending on stable token emissions break

Tools Used

Manual code review

Recommendations

  1. Implement a maximum block limit:

uint256 constant MAX_BLOCKS_PER_MINT = BLOCKS_PER_DAY; // 7200 blocks
function tick() external nonReentrant whenNotPaused {
// ... other code ...
uint256 blocksSinceLastUpdate = currentBlock - lastUpdateBlock;
blocksSinceLastUpdate = blocksSinceLastUpdate > MAX_BLOCKS_PER_MINT ?
MAX_BLOCKS_PER_MINT : blocksSinceLastUpdate;
// ... continue with minting ...
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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

Give us feedback!