Eggstravaganza

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

MIN_GAME_DURATION has too small value

Summary

Owner could set game duration and minimal of it is 60 seconds. This value too short for game.

Vulnerability Details

When owner start game, he specify game duration. This value should be equal or greater than MIN_GAME_DURATION.

function startGame(uint256 duration) external onlyOwner {
require(!gameActive, "Game already active");
require(duration >= MIN_GAME_DURATION, "Duration too short");
startTime = block.timestamp;
endTime = block.timestamp + duration;

MIN_GAME_DURATION is 60. It means that owner could set game duration only 1 minute. This value too small and do not adequate.
Most of user could not be on time and send tx.

Impact

Game duration could be too small and users could not be on time for participate in the game.

Tools Used

Manual review

Recommendations

Increase value of MIN_GAME_DURATION constant up to at least 5 minutes, for example.

Updates

Lead Judging Commences

m3dython Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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