Normal Behavior:
In a King-of-the-Hill game, each player must pay an increasing fee to claim the throne. Once a player becomes the king, they must wait for someone else to dethrone them — they shouldn't be able to re-claim the throne while already in power.
Issue:
There is no check preventing the current king (msg.sender == currentKing) from calling claimThrone() again. This allows them to:
Artificially extend the timer to avoid being dethroned
Inflate the claim fee unnecessarily
Waste gas for no change in game state
This undermines the competitiveness of the game and opens it up to monopolization by one participant.
Likelihood:
The current king can call claimThrone() multiple times, as there is no restriction preventing reclaims.
This can occur any time during the active game, especially when grace period is near expiry.
It's highly likely in real gameplay, especially with bots or high-frequency users.
Impact:
This allows the current king to monopolize the throne.
Other players are discouraged from participating as the claim fee escalates quickly.
The game becomes unfair and may cause reputation or financial damage to the platform.
Explanation:
This contract allows the current king to repeatedly reclaim the throne and reset the grace period — blocking other players from winning and escalating the claim fee unfairly.
To ensure fair competition, enforce a check in the claimThrone() function that prevents the current king from reclaiming the throne. This stops them from artificially extending the timer and inflating the claim fee without any gameplay change.
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.