In Game::claimthrone
, players should be able to "claim the throne" and become king by entering the function and paying a suitable fee. Current King should not be able to access the function as they are already king. But the require statement in claimThrone
is incorrect making it so that only the king
can enter and players cannot. This desrupts the functionality. Since they currentKing
starts as address(0)
, nobody can access the function except address(0) and this address cannot be changed..
Likelihood: High.
Reason 1 Happens whenever a player tries to claimThrone but they can't, even though they fulfill all the requirements
Reason 2
Impact: High
Impact 1 Nobody can claim the throne which severely disrupts functionality of the protocol.
Impact 2 Address(0) will always remain king and they cannot be changed
There are two tests in the Proof of Code. First Test will prove that a normal player cannot enter the claim throne. While fuzz testing, No address could enter claim throne except address(0). In the Second, It will prove that address(0) can access the function but it is only address(0) and no other address.
Try correcting the require statement in Game::claimThrone
so that it completes its intended purposse of making sure that players trying to claim the throne are not already king instead og checking whether players are kings and only k=giving them access.
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.