Eggstravaganza

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

Game End Time Not Enforced in `EggHuntGame::endGame`

Description: The EggHuntGame::endGame function does not check whether the game duration has elapsed. The owner can end the game prematurely, which could disrupt the game for participants.

Impact: Players may lose the opportunity to participate if the owner ends the game early.

Recommended Mitigation: Add a check to ensure the game can only be ended after the endTime.

function endGame() external onlyOwner {
require(gameActive, "Game not active");
+ require(block.timestamp > endTime, "Game not ended yet");
gameActive = false;
emit GameEnded(block.timestamp);
}
Updates

Lead Judging Commences

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

Support

FAQs

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

Give us feedback!