require(msg.sender == currentKing, "Game: You are already the king. No need to re-claim."); . This statement is wrong because through which no one able to claim the throne because this line reverts due to msg.sender == currentKing.
Likelihood:
Likelihood: Very High for the conditional bug being triggered in any real usage after first king is set—every challenger will fail. The issue is deterministic and guaranteed as soon as someone tries to dethrone.
Risk: High because it completely blocks expected progression and would likely be caught only after deployment by users failing to claim, causing trust/retention loss or requiring a contract patch/reset.
Impact:
After the first throne claim, no new player can become king because challengers fail the require check—game stalls.
Users trying to claim after the initial king will see a revert with message that conflicts with condition semantics, making debugging/support harder.
Here is the ouput of the code.
Ran 1 test for test/Game.t.sol:GameTest
[FAIL: Game: You are already the king. No need to re-claim.] test_claimThrone() (gas: 46334)
Suite result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 900.58µs (36.88µs CPU time)
Change the require statement (msg.sender == currentKing) to (msg.sender != currentKing).
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.