Game::claimThrone()
Permanently Blocks All Players From Claiming the ThroneNormally, the Last Man Standing game allows any player (except the current king) to pay a fee and claim the throne, becoming the new king and resetting the grace period.
However, the following line in the Game::claimThrone()
function introduces a critical logic error: it incorrectly restricts the ability to claim the throne only to the current king, instead of excluding them. As a result, no player can ever claim the throne, not even the first one — since currentKing
is initialized to address(0)
, and msg.sender
will never match it. This breaks the game entirely and renders the protocol unusable.
Likelihood:
This always occurs from the first interaction: the condition immediately reverts for any address since no one matches the initial value of currentKing
(which is address(0)
).
It prevents every single user from interacting with the core function of the game — including the first player who should normally be able to start the round.
Impact:
The game is entirely locked and no progression is possible. No one can claim the throne or win the pot.
All funds sent to the contract are essentially trapped, and the game state never advances past initialization.
The economic incentives and escalation logic of the game are fully broken.
Add the following test to Game.t.sol
. This reverts on the first ever throne claim, showing the game is broken at its core.
The condition should be inverted in order to prevents the king from reclaming their own throne while allowing others to compete.
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.