Normally, after a player claims the throne, the game enters a "grace period" during which no other player can claim. Once this period expires, the game is supposed to end, and the current king is declared the winner. This logic is implemented in the declareWinner()
function.
However, the contract does not have any automated trigger for ending the game. The function declareWinner()
can only be called by an external address. If no one calls this function after the grace period expires, the game remains stuck in a limbo state — the pot is locked, and no new rounds can be started.
Likelihood:
This issue is likely to occur in cases where no users are actively monitoring the game or incentivized to call declareWinner()
.
On low-traffic contracts or newly deployed games, this condition may arise early in the contract lifecycle.
Impact:
The game can stall indefinitely.
The pot remains locked in the contract.
resetGame()
cannot be called since gameEnded
never becomes true.
This affects the trust, usability, and functionality of the entire game system.
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.