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

Timestamp in `killRavana` does not represent real values

Summary

The function Dussehra::killRavana should work after 12 October 2024 and before 13 October 2024. But the timestamp represents different values.

Vulnerability Details

In killRavana function we have these two checks

if (block.timestamp < 1728691069) {
revert Dussehra__MahuratIsNotStart();
}
if (block.timestamp > 1728777669) {
revert Dussehra__MahuratIsFinished();
}

But 1728691069 represents the date "11 October 2024 23:57:49" instead of "12 October 2024 00:00:00".

Same this for 1728777669, it represents "13 October 2024 00:01:09" instead of "13 October 2024 00:00:00"

Impact

The incorrect representation of these timestamp values may result in the killRavana function being prematurely or belatedly enabled or disabled. This inconsistency could lead to unexpected behavior during the execution of the function, potentially affecting the fairness and reliability of the contract operations.

Tools Used

Manual review

Recommendations

Update the timestamp values in the killRavana function to accurately reflect the intended start and end times of operation (12 October 2024 and 13 October 2024). Preferably using a constant value instead of magic numbers. Ensure that the checks align precisely with these dates to avoid confusion and maintain the contract's intended functionality.

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.