The gracePeriod
defines how long the game must wait after the last throne claim before a winner can be declared. It is used to control the pacing of the game and to determine when a round is considered over.
However, the contract allows the owner to arbitrarily change the gracePeriod
at any time using the updateGracePeriod()
function. This creates a critical trust dependency: the timing of when a winner can be declared is no longer guaranteed by the protocol but is subject to owner manipulation. For example, the owner could shorten the period right after a claim, enabling themselves or a favored address to call declareWinner()
earlier than expected. This can be used to frontrun other participants, resulting in unfair or manipulated outcomes.
Likelihood:
Happens whenever the game is in progress and the owner decides to alter the grace period for personal advantage or based on inside information. Since the owner is often considered trustworthy, the likelihood is rather low.
Occurs more frequently in smaller games or games without governance or audits, where the owner is not publicly accountable.
Impact:
Undermines fairness and trust assumptions - users expect consistent timing rules that are not alterable mid-round.
Enables frontrunning and game manipulation by reducing the grace period just before calling declareWinner()
, effectively guaranteeing the win.
The exploit occurs because Alice believed she had up to 3 days to remain king, but the owner maliciously changed the rules mid-round by reducing the grace period to 10 seconds. This allowed the owner (or an ally) to call declareWinner()
almost immediately, cutting Alice's round short and claiming the win or ending the game before any competition.
The vulnerability can be mitigated by allowing the owner to update the future round parameter for the grace period at any time, but preventing the change from taking effect mid-round, preserving game integrity.
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.