Core Contracts

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

12-second block time assumed by protocol not true for all EVM-compatible chains

Description & Impact

RAACMinter assumes BLOCKS_PER_DAY to be 7200 based on a calculation of 12-second block time. While this may be true for Ethereum chain, other L1 EVM-compatible chains are not the same. For example, Avalance (AVAX) chain has 2 second block time (not necessarily consistent).

Since critical value of emission rate is calculated based on BLOCKS_PER_DAY, this can result in 6x more tokens being minted than intended due to the calculation inside tick():

uint256 public minEmissionRate = 100 * 1e18 / BLOCKS_PER_DAY; // 100 RAAC per day minimum
uint256 public maxEmissionRate = 2000 * 1e18 / BLOCKS_PER_DAY; // 2000 RAAC per day maximum

and

uint256 amountToMint = emissionRate * blocksSinceLastUpdate;

Mitigation

Instead of having BLOCKS_PER_DAY as a constant, initialize it inside the constructor based off param passed during deployment so that it can be configured on a chain-to-chain basis.

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.