After the game ends and is reset, a grace period begins. During this grace period, players are allowed to claim the throne. Once the grace period ends, the last player to claim the throne during that window becomes the winner and can withdraw the pot.
The claimThrone()
function does not verify whether the grace period has ended. As a result, a user can still call claimThrone()
even after the grace period expires, unfairly claiming the throne and restarting the game, thus preventing the rightful winner from withdrawing.
Likelihood:
Happens every time someone claims the throne after the grace period.
There’s no protection against late claims.
Impact:
A user can front-run the intended winner after timeout.
The grace period becomes meaningless.
The PoC shows how someone can claim the throne even after the game should’ve ended. Since the contract doesn’t properly check if the grace period is over.
Add a check to claimThrone()
that reverts if the current time exceeds the grace period window:
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.