claimThrone()
function contains a critical logic error in the king validation check. The function requires that msg.sender == currentKing
, which prevents anyone except the current king from claiming the throne. This error ensures no address can claim the king. This is the opposite of the Protocol functionalities.The root impact is caused by a logical error in the require statement, which is shown below.
Likelihood:
This issue occurs 100% of the time
The bug is deterministic and will always prevent claims
Any attempt by a new player to claim the throne will fail with the error message "Game: You are already the king. No need to re-claim."
Impact:
This vulnerability completely breaks the core game mechanics
Nobody can claim the king
Players lose the ability to participate in the game after the initial claim
The entire "last man standing" concept is defeated, as no person can ever be king
When currentKing
is address(0)
(initial state), only address(0)
can claim (impossible)
Change the equality operator from ==
to !=
in the require statement:
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.