The claimThrone function does not enforce a restriction that users can only claim the throne within the grace period, which contradicts the protocol specification.
Impact:
After the grace period ends, players can still continuously challenge for the throne.
Under high player activity, a third-party arbiter (or any user) may never be able to successfully call the declareWinner() function, preventing the game from concluding.
This verification assumes the claimThrone function has already fixed the following two issues:
Correct initial check: require(msg.sender != currentKing, "Game: You are already the king. No need to re-claim.");
Proper handling of the previous king's reward: uint256 previousKingPayout = (sentAmount * previousKngFeePercentage) / 100;
Admin deploys the contract.
Player player1 pays the claim fee and calls claimThrone.
Player player2 pays the claim fee and calls claimThrone.
Wait for the grace period to expire (1 day).
Player player1 pays the claim fee and calls claimThrone.
Player player2 pays the claim fee and calls claimThrone.
Wait for another day.
This cycle can continue indefinitely.
Simply add a check at the beginning of the claimThrone function to ensure claiming is only allowed during the grace period:
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.