The function claimThrone()
has access control which it declares that current king can't re-claim.
However, the actual implementation logic is inverted, it allows only the current king to call claimThrone()
, while blocking all other players from participating.
Likelihood: High
The incorrect logic is already inside the contract and would immediately block all other players from interacting.
Impact: High
It prevents the primary functionality of the game — no one can claim the throne since initial current king is address(0)
Add the following test, then run the command: forge test --match-test testclaimThroneFail
Check if msg.sender != currentKing
in claimThrone()
to implement the correct access control
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.