Since endgame function is not clear, for security purpose or just to end the game. The endGame()
function does not check whether the game's scheduled endTime
has passed before allowing the game to be ended. This allows the owner to end the game prematurely, before the game has reached the designated end time.
The issue arises because the endGame()
function does not verify if the current time (block.timestamp
) is greater than or equal to the endTime
. This means the owner can call endGame()
at any point, even before the game is meant to end, potentially leading to unfair or unintended game behavior.
The owner can prematurely end the game, disrupting game flow and creating unfair scenarios for players.
Users may feel the game is not being handled fairly if it ends too early.
Manual review
Implement a check to ensure that block.timestamp >= endTime
before allowing the game to be ended. This ensures that the game can only be ended after the designated time.
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.