Normal Behavior:
The gracePeriod defines a buffer of time in which no new throne claims must occur for the current king to be eligible to win the pot via declareWinner(). It is expected to remain consistent throughout a round to give fair opportunity for contesting the throne.
Problem:
The updateGracePeriod() function allows the owner to reduce the grace period mid-game, after claiming the throne. This can be abused to make the game immediately endable — giving the owner a fast-track path to declare themselves the winner without giving others a fair chance to contest. This behavior violates the documented trust assumptions and fairness expectations of players.
Likelihood:
The likelihood is Low because:
This requires the owner to act maliciously and time it correctly, which may not occur in all deployments.
However, since the exploit is deterministic and accessible with no cost barrier, a malicious or key compromised owner can always execute it in any game with a large enough pot.
Impact:
The impact is High because the issue:
Allows the owner to forcibly end the game early and extract the pot by declaring themselves winner immediately.
Violates documented expectations and fairness for players who assume a stable grace period.
Could severely erode user trust and credibility of the protocol/game.
The POC demonstrates how an owner can change the grace period mid-game, claim the throne and declare himself as winner without giving others a fair chance to contest.
Add the test below to the Game.t.sol and use the following script to run it:
NOTE: for the poc to work replace the following require statement inside the claimThrone() (which is another issue):
Result:
Do not allow the grace period to be changed when a game is currently running.
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.