The Game::claimThrone()` function contains a critical inverted condition that prevents new players from claiming the throne while incorrectly allowing the current king to reclaim it. This flaw fundamentally breaks the core game mechanic where players compete to become king by paying an increasing fee.
The condition require(msg.sender == currentKing, ...)
is logically inverted. Instead of preventing the current king from reclaiming (as intended), it only permits the current king to call the function. This violates the game's design where:
New players should replace the current king by paying the claim fee
The current king should be blocked from reclaiming
The first claim should set the initial king
Likelihood:
Probability: Certain (100%)
Attack Vector: Passive (Triggers on normal usage)
Prerequisites: None
Every valid game interaction attempt will trigger this flaw. The game cannot start or progress without patching.
Impact:
Renders contract non-functional
Permanent game deadlock
Observed Behavior:
First claim attempt always reverts
Only existing king can successfully call the function
Contract enters permanent locked state after deployment
Action Required:
Apply code patch immediately
Conduct full regression test suite
Deploy new contract instance
Submit patched code for re-audit
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.