Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

getTimeRemaining return wrong value

Summary

Vulnerability Details

User could play in the game if blocktimestamp >= startTime and blocktimestamp <= endTime, but function getTimeRemaining return 0 if block.timestamp >= endTime

Impact

User see incorect data of time remaing of the game

Tools Used

Manual review

Recommendations

function getTimeRemaining() external view returns (uint256) {
- return block.timestamp >= endTime ? 0 : endTime - block.timestamp;
+ return block.timestamp > endTime ? 0 : endTime - block.timestamp;
}
Updates

Lead Judging Commences

m3dython Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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