Core Contracts

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

Hardcoded Block Time in `RAACMinter` Causes Incorrect Emission Rates Across Different Chains

Summary

The RAACMinter contract hardcodes BLOCKS_PER_DAY to 7200 assuming a 12-second block time, which is specific to Ethereum mainnet. This assumption breaks emission rate calculations on other chains with different block times, leading to incorrect token distribution rates.

Vulnerability Details

The contract uses BLOCKS_PER_DAY in critical emission rate calculations:

uint256 public constant BLOCKS_PER_DAY = 7200; // Assuming 12-second block time
// These constants use BLOCKS_PER_DAY for daily rate calculations
uint256 public constant MAX_BENCHMARK_RATE = 2000 * 1e18 / BLOCKS_PER_DAY; // 2000 RAAC per day maximum
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

The issue manifests in several ways:

  1. Different Block Times:

  • Ethereum: ~12 seconds (7200 blocks/day)

  • BSC: ~3 seconds (28800 blocks/day)

  • Polygon: ~2 seconds (43200 blocks/day)

  • Avalanche: ~2 seconds (43200 blocks/day)

  1. Emission Rate Impact: For a target of 1000 RAAC per day:

// On Ethereum (7200 blocks/day):
emission = 1000 * 1e18 / 7200 = 138.89 * 1e15 per block
daily_total = 138.89 * 1e15 * 7200 = 1000 * 1e18 (correct)
// On BSC (28800 blocks/day):
emission = 1000 * 1e18 / 7200 = 138.89 * 1e15 per block
daily_total = 138.89 * 1e15 * 28800 = 4000 * 1e18 (4x too high)

Impact

This dramatically accelerates token distribution and depletes supply faster than designed on chains other than ethereum

Tools Used

Manual Review

Recommendations

Replace the block-based calculations with time-based calculations:

Updates

Lead Judging Commences

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

Give us feedback!