The claimThrone()
function contains a logic error that violates the intended game rule:
"Cannot claim the throne if they are already the current king."
Currently, the function uses the following condition:
This incorrectly allows only the current king to call claimThrone()
, which contradicts the intended behavior. Instead, any player except the current king should be allowed to claim the throne.
As a result, no player can ever claim the throne unless they are already king, making the game logic unusable.
Likelihood: High
This issue occurs every time the claimThrone()
function is called by any address other than the current king — which will always revert. It breaks the core functionality of the game.
Prevents new players from claiming the throne
Makes the game impossible to play
Halts progression, rewards, and payouts
Update the condition in claimThrone()
to reject only current kings, and allow all others to proceed.
This change correctly blocks the current king from re-claiming, while allowing others to participate.
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.