The claimThrone() function's access control check is inverted:
This causes:
First claims to revert (when currentKing == address(0))
Incorrect error message about reclaims
Complete lockout of new players
Likelihood:
The condition will always fail for first-time claimants since currentKing is initialized to address(0)
The revert will trigger on every initial claim attempt due to the inverted logic
Impact:
Permanently prevents the game from starting as no player can become the first king
Locks all ETH sent to claimThrone() since claims can never succeed
Initial State Check: Confirms no king exists before test (address(0))
Fund Preparation: Player gets 5 ETH to cover claim fee
Revert Verification: Confirms the inverted condition triggers wrong revert
State Preservation: Shows game remains in initial unusable state
Logical Correction: Changes == to != to properly:
Allow first claims when currentKing == address(0)
Block actual reclaim attempts by current king
Message Preservation: Keeps same error message which now correctly describes reclaim prevention
Minimal Change: Single-character edit fixes core functionality without introducing new risks
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.