Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

CHRISTMAS_2023_BLOCK_TIME incorrectly set

Summary

The current value of CHRISTMAS_2023_BLOCK_TIME results in failing to start collecting gifts on time.

Vulnerability Details

Although a CHRISTMAS_2023_BLOCK_TIME between [Christmas 2023 - 24h; Christmas 2023 + 24h] is acceptable, the given value of this constant is out of this range. It prevents the game from being started at the right time.

Anvil command:

anvil --fork-url https://arbitrum-mainnet.infura.io/v3/{your_infura_api_key}

returns the following output:

Fork
==================
Endpoint: https://arbitrum-mainnet.infura.io/v3/{your_infura_api_key}
Block number: 156281728
Block hash: 0xa2aa527ce1fc5edb2beffa1f53a2767902244922e16af10e5f53c06075d03d3a
Chain ID: 42161
...

Block number stored in CHRISTMAS_2023_BLOCK_TIME is 1703480381. Arbiscan Countdown shows that expected date for this block is August 18, 2028.

Impact

High. It will not be possible to collect gifts, because the following condition in collectPresent() will revert during Christmas 2023:

if (block.timestamp < CHRISTMAS_2023_BLOCK_TIME) {
revert SantasList__NotChristmasYet();
}

Tools Used

Manual check.

Recommendations

Value of CHRISTMAS_2023_BLOCK_TIME should be set around 162671717.

Updates

Lead Judging Commences

inallhonesty Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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