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

Several timestamps are not accurate leading the protocol to begin 3 min before and end 1 minute later.

Description

Dussehra::killRavana use wrong timestamp according the documentation.
Those timestamps allows the protocol to kill Ravana 3 minutes before the end if RamIsSelected and 1 minute after the end.

function killRavana() public RamIsSelected {
@> if (block.timestamp < 1728691069) {
revert Dussehra__MahuratIsNotStart();
}
@> if (block.timestamp > 1728777669) {
revert Dussehra__MahuratIsFinished();
}
IsRavanKilled = true;
uint256 totalAmountByThePeople = WantToBeLikeRam.length * entranceFee;
totalAmountGivenToRam = (totalAmountByThePeople * 50) / 100;
(bool success, ) = organiser.call{value: totalAmountGivenToRam}("");
require(success, "Failed to send money to organiser");
}

See the recommendation to know the correct timestamps.

Risk

Likelyhood: Low

  • Difference is small.

Impact:

  • More time to kill Ravana than expected.

Recommended Mitigation

function killRavana() public RamIsSelected {
- if (block.timestamp < 1728691069) {1728691200
+ if (block.timestamp < 1728691200) {
revert Dussehra__MahuratIsNotStart();
}
- if (block.timestamp > 1728777669) {
+ if (block.timestamp > 1728777600) {
revert Dussehra__MahuratIsFinished();
}
IsRavanKilled = true;
uint256 totalAmountByThePeople = WantToBeLikeRam.length * entranceFee;
totalAmountGivenToRam = (totalAmountByThePeople * 50) / 100;
(bool success, ) = organiser.call{value: totalAmountGivenToRam}("");
require(success, "Failed to send money to organiser");
}
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.