Game::claimThrone() renders entire contract unusable and permanently locks all fundsThe Game::claimThrone() function contains a fatal logic error in its access control check.
The require should use != instead of ==. Since currentKing is initialized to address(0) and msg.sender can never be address(0), this condition will always fail, making the function permanently uncallable.
Likelihood:
High: No one can ever claim the throne
declareWinner() can never be called (requires currentKing != address(0))
resetGame() can never be called (requires gameEnded = true from declareWinner())
Impact:
The contract becomes a fund sink with no recovery mechanism
Complete loss of functionality
Contract is DOA (dead on arrival)
A user with balance more than claimFee fails to call claimThone() and shows the incorrect error message saying - Game: You are already the king. No need to re-claim.
Change == to != in the require statement of 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.