The contract contains a hardcoded constant BLOCKS_PER_DAY = 7200
, which assumes a 12-second block time. However, Ethereum's block time is variable, fluctuating between 13 to 15 seconds. This incorrect assumption leads to inaccurate calculations of time-dependent logic, potentially affecting emissions, rewards, or any mechanism reliant on block counts.
The contract assumes a fixed block time of 12 seconds to calculate the number of blocks per day (BLOCKS_PER_DAY = 7200
). However, Ethereum's actual block time is not constant it fluctuates between 13 to 15 seconds depending on network conditions. This miscalculation can result in incorrect reward emissions or time-dependent mechanisms being slightly off.
Time-sensitive calculations such as emissions, staking rewards, or vesting schedules may be inaccurate.
Users may receive incorrect rewards due to miscalculations in block-based reward distribution.
Contracts relying on precise day-based execution may deviate from expected schedules.
Hardhat (for local blockchain testing and simulations)
Foundry (for additional debugging)
To demonstrate the issue, we simulate block times using Hardhat to show how the actual BLOCKS_PER_DAY
value deviates from the assumed 7200
.
Instead of 7200 blocks per day, the actual count is ~6646 blocks/day with a 13s block time.
If block time increases to 15s, it would drop further to ~5760 blocks/day.
This discrepancy affects reward calculations, emissions, and any block-based logic.
Instead of hardcoding BLOCKS_PER_DAY = 7200
, dynamically compute it based on average block time:
Alternatively, use an oracle or on-chain data to periodically update avgBlockTime
dynamically.
Known issue LightChaser M12
Known issue LightChaser M12
Known issue LightChaser M12
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.