The EggHuntGame
contract owner has unrestricted ability to end the game at any time via the endGame()
function, regardless of the predefined game duration. This centralized control allows the owner to arbitrarily terminate gameplay before the scheduled end time, potentially disrupting player expectations and compromising game fairness. The lack of constraints on this critical function introduces opportunity for manipulation and undermines trust in the game system.
The vulnerable function is found in the EggHuntGame
contract:
This function allows the owner to end the game at any time, subject only to the condition that the game is currently active. The function:
Does not check whether the game's natural end time (endTime
) has been reached
Provides no justification or extraordinary circumstances required to end early
Offers players no compensation mechanism if the game ends earlier than promised
This vulnerability has several significant impacts:
Trust Violation: Players engage with the game under the assumption of a fixed duration, but this can be arbitrarily shortened without their consent.
Competitive Fairness Issues: Premature termination can unfairly advantage certain players who were able to find eggs early, while disadvantaging others who may have planned their participation strategy around the full duration.
Economic Manipulation: In a game with valuable NFT rewards, the owner could monitor the distribution of eggs and end the game when a particular threshold or pattern is reached, manipulating the scarcity and potential value of the eggs.
Player Experience Degradation: Suddenly ending a game creates frustration and disappointment for active players, potentially harming the platform's reputation.
Resource Waste: Players may invest time and gas fees into participation strategies that become worthless if the game ends prematurely.
Manual Review
Time-Based Restrictions: Only allow early termination within a reasonable window of the scheduled end time:
Incorrect values reported when a game is ended early
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.