Description:
In the claimThrone function, the contract checks
instead of verifying the caller is not the current king. This inverted logic makes it impossible for any new player to claim the throne, since currentKing starts as address(0) and no regular msg.sender will ever equal that value.
Impact: This vulnerability completely breaks the game functionality, preventing any player from claiming the throne after the first claim, effectively making the game unplayable.
Denial of Service: No one can ever become king (and thus the game never starts).
Game Lock: The pot never grows, and declareWinner can never be called because currentKing remains address(0).
Proof of Concept: Add the following test to the 'Game.t.sol':
Mitigation:
Change the check to require the caller is not the current king:
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.