Core Contracts

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

RAACMinter different block numbers

Summary

The RaacMinter contract contains hardcoded values that assume a block time of 12 seconds, resulting in a fixed BLOCKS_PER_DAY value of 7200. While this assumption holds true for Ethereum, it is not valid for all EVM-compatible chains, as different networks have varying block times.

uint256 public constant BLOCKS_PER_DAY = 7200; // Assuming 12-second block time
uint256 public constant INITIAL_RATE = 1000 * 1e18; // 1000 RAAC per day
uint256 public constant MAX_BENCHMARK_RATE = 2000 * 1e18 / BLOCKS_PER_DAY; // 2000 RAAC per day maximum
uint256 public constant MAX_EMISSION_UPDATE_INTERVAL = 1 days;
uint256 public constant MAX_ADJUSTMENT_FACTOR = 100; // 100% adjustment per update
uint256 public constant MAX_UTILIZATION_TARGET = 100; // 100% target utilization

Vulnerability Details

The use of hardcoded BLOCKS_PER_DAY assumes a universal block time of 12 seconds. However, different EVM-compatible chains (e.g., BNB Smart Chain, Polygon, Avalanche, Optimism) have different block times. If this contract is deployed on a chain with a different block time (e.g., 2 seconds for BSC, 5 seconds for Polygon), the emission rate calculations and benchmarking will be incorrect, leading to unintended supply dynamics.

Potential Issues:

  1. Incorrect Token Emission – The INITIAL_RATE and MAX_BENCHMARK_RATE are derived based on BLOCKS_PER_DAY. If the actual block time differs, the real emission rate will not align with expectations.

  2. Inconsistent Benchmarking – The contract's benchmark for maximum emissions will be inaccurate on chains with different block intervals.

  3. Reduced Flexibility – The hardcoded value makes the contract less adaptable to different blockchain environments without requiring redeployment.

Impact

The incorrect block time assumption could lead to inflationary or deflationary effects depending on the deployment chain. If deployed on a chain with a shorter block time, token emissions will be higher than expected, potentially leading to excessive supply. Conversely, a longer block time would result in lower-than-expected emissions, slowing down the intended distribution of tokens.

Tools Used

Manual Review

Recommendations

Make BLOCKS_PER_DAY Configurable – Instead of a hardcoded constant, allow it to be set via constructor parameters or an adjustable state variable.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RAACMinter hardcoded BLOCKS_PER_DAY breaks cross-chain compatibility with variable token emission rates

Known issue LightChaser M12

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RAACMinter hardcoded BLOCKS_PER_DAY breaks cross-chain compatibility with variable token emission rates

Known issue LightChaser M12

Appeal created

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

RAACMinter hardcoded BLOCKS_PER_DAY breaks cross-chain compatibility with variable token emission rates

Known issue LightChaser M12

Support

FAQs

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