Lack of address(0) check and improper initialization of currentKing leads to broken logic and misinterpreted reverts.
The claimThrone() function contains a logic flaw combined with the absence of zero-address validation. Initially, currentKing is implicitly set to address(0), and there's no check to prevent it from being treated as a valid player
the msg.sender is a zero address address(0)
and the statement makes it impossible for players to become current king making the game stuck
Likelihood:
It will happen 100% of time after the contract has been deployed
Impact:
On deployment, currentKing is address(0). If the zero address somehow calls claimThrone() (e.g., via testing), the contract behaves as if it's a legitimate king, triggering this revert with a misleading message.
game initializes and sets address zero as king.
Add zero address checks claimThrone()
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.