The claimThrone()
function allows new throne claims even after the gracePeriod
has expired, enabling attackers to steal victories from legitimate winners. Players who have rightfully won the game (by surviving the grace period) can still be dethroned by subsequent claimants, completely breaking the core game mechanics and allowing theft of winnings.
The vulnerability exists because claimThrone()
only checks the gameNotEnded
modifier but fails to validate whether the gracePeriod
has expired for the current king. This creates a critical window between gracePeriod
expiration and declaring winner where legitimate winners can be robbed of their victory.
Game Rules (as intended):
Player becomes king by calling claimThrone()
If no one dethrones them within the gracePeriod
, they win
Winner gets the entire pot when declareWinner()
is called
Current Bug:
Even after gracePeriod
expires, new players can still call claimThrone()
This steals the victory from the player who legitimately survived the grace period
The attacker becomes the new king and can win the pot instead
Theft of Legitimate Winnings: Players who rightfully won by surviving the grace period lose their victory and pot rewards
Complete Rule Breakdown: The fundamental "grace period = win condition" rule is completely broken
Add grace period validation to prevent claiming throne after grace Period expiration:
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.