Eggstravaganza

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

Owner can prematurely end game

Vulnerability Details

The endGame function allows the contract owner to immediately stop the game (gameActive = false) at any point after it has started, irrespective of the originally defined endTime.

//@audit-issue owner can end game early
/// @notice Ends the egg hunt game.
function endGame() external onlyOwner {
require(gameActive, "Game not active");
gameActive = false;
emit GameEnded(block.timestamp);
}

Impact

The owner can arbitrarily terminate an ongoing game, potentially before players have had a fair chance to participate based on the announced duration, invalidating player expectations and participation.

Recommendation

Remove the endGame function entirely, relying solely on the endTime timestamp to determine the game's conclusion.

Updates

Lead Judging Commences

m3dython Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

Trusted Owner

Owner is trusted and is not expected to interact in ways that would compromise security

Support

FAQs

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