Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

Magic Numbers

Summary

The timestamps checked against block.timestamp to determine if the event has started/finished are magic numbers and incorrect for the scheduled event of "after 12th October 2024 and before 13th October 2024".

Actual timestamp values: 2024-10-11 23:57:49 UTC & 2024-10-13 00:01:09 UTC

Vulnerability Details

Dussehra::killRavana has the wrong timestamps to determine if the event has started/finished; avoiding magic numbers will decrease the likelihood of human error.

Impact

Users can call Dussehra::killRavana 3 min before the event is scheduled to start or 1 hour after it is scheduled to end.

Tools Used

Manual review

Recommendations

+ const public EVENT_START_TIME = 1728691200
+ const public EVENT_END_TIME = 1728777600
function killRavana() public RamIsSelected {
- if (block.timestamp < 1728691069) {
+ if (block.timestamp < EVENT_START_TIME) {
revert Dussehra__MahuratIsNotStart();
}
- if (block.timestamp > 1728777669) {
+ if (block.timestamp < EVENT_END_TIME) {
revert Dussehra__MahuratIsFinished();
}
Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Incorrect timestamp

Support

FAQs

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