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

Timestamp checks are not inclusive

Summary

Timestamp checks inside the contract ChoosingRam are not inclusive.

Vulnerability Details

Some validation of the checks should be made inclusive so they include the starting second of the day they refer to (00:00:00).
In more details:

  • if (block.timestamp > 1728691200) { inside the ChoosingRam::increaseValuesOfParticipants does not catch Oct 12 2024 00:00:00 which means that anyone will be able to call the function without reverting at that time.

  • if (block.timestamp > 1728777600) {inside ChoosingRam::selectRamIfNotSelected does not catch Oct 13 2024 00:00:00 which means that anyone will be able to call the function without reverting at that time.

Impact

The function ChoosingRam::increaseValuesOfParticipants does not revert when called on Oct 12 2024 00:00:00 and ChoosingRam::selectRamIfNotSelected - for Oct 13 2024 00:00:00.

Tools Used

Manual Review

Recommendations

Make the checks inclusive:

- if (block.timestamp > 1728691200) {
+ if (block.timestamp >= 1728691200) {
revert ChoosingRam__TimeToBeLikeRamFinish();
}
- if (block.timestamp > 1728777600) {
+ if (block.timestamp >= 1728777600) {
revert ChoosingRam__EventIsFinished();
}
Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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