The endGame function in the EggHuntGame contract allows the owner to end the game before the specified endTime, which is not the intended behavior. This can lead to premature termination of the game.
The endGame function currently does not check if the current time (block.timestamp) has reached or passed the endTime. As a result, the owner can call endGame at any time, even before the game is supposed to end.
Relevant code:
Participants may lose the opportunity to find eggs within the expected duration.
Manual review
Add a condition to the endGame function to check if the current time has reached or passed the endTime before allowing the game to end.
Owner is trusted and is not expected to interact in ways that would compromise security
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.