Core Contracts

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

Hardcoded `BLOCKS_PER_DAY` Assumes Ethereum Block Time, Leading to Incorrect Reward Emissions on Other Chains

Summary

The hardcoded BLOCKS_PER_DAY value in the RAACMinter contract assumes a fixed block time, which may not be accurate when deployed on different blockchain networks. This can lead to incorrect reward emission rates, affecting the contract’s functionality.

Vulnerability Details

The RAACMinter contract defines a constant BLOCKS_PER_DAY to determine the expected number of blocks per day.

@> uint256 public constant BLOCKS_PER_DAY = 7200; // Assuming 12-second block time
uint256 public constant INITIAL_RATE = 1000 * 1e18; // 1000 RAAC per day

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/minters/RAACMinter/RAACMinter.sol#L28C1-L29C1

However, this value is specific to Ethereum (assuming ~12s block time, 7200 blocks/day). If deployed on a network with a different block time (e.g., Binance Smart Chain with ~3s block time, 28800 blocks/day, Polygon with ~2s block time, 43200 blocks/day), the contract will incorrectly calculate reward distributions and emissions.

If deployed on a different chain:

  • A chain with faster block times (e.g., BSC) will reduce the effective rewards per block, slowing down emissions.

Impact

Incorrect reward emissions: Rewards may be distributed at an incorrect rate.

Unfair distribution: Users on different chains may receive more or fewer rewards than expected.

Tools Used

Manual Review

Recommendations

Replace the hardcoded BLOCKS_PER_DAY value with a configurable state variable.

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!