The EggHuntGame contract has conflicting mechanisms for determining if the game is active, creating a state where the game can be simultaneously expired by time but still active by flag.
The contract maintains two separate mechanisms for determining if the game is active:
The issue is that gameActive remains true even after endTime has passed until someone explicitly calls endGame(). This creates a discrepancy between the time-based check and the state flag.
The contract exists in an ambiguous state where time-based checks and state-based checks contradict each other
Players can continue to call searchForEgg() after the intended end time but before endGame() is called
The game state does not automatically transition when time expires, requiring manual intervention
Creates confusion about when the game is actually over
Undermines the deterministic nature of the contract
Secondary effects include potential front-running and selective ending by the owner
Manual code review
Implement automatic game state management based on 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.