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

Wrong check for block.timestamp in `ChoosingRam::selectRamIfNotSelected`

Summary

Wrong check for block.timestamp in ChoosingRam::selectRamIfNotSelected which breaks contract invariant.

Vulnerability Details

In the README.md it is stated that If the user has not selected Ram before 12 October 2024, then the Organizer can select Ram if not selected.

However, the check is for 04 October 2024, not 12 October.

if (block.timestamp < 1728069120) {
revert ChoosingRam__TimeToBeLikeRamIsNotFinish();
}

It can be checked here - //https://blockchain-academy.hs-mittweida.de/timestamp-converter/.

Impact

The organizer can call ChoosingRam::selectedRamIfNotSelected much earlier, which breaks the contract invariant.

Tools Used

Manual Review

Recommendations

Change the check to be like that

+ if (block.timestamp < 1728691200) {
revert ChoosingRam__TimeToBeLikeRamIsNotFinish();
}
Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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