claimThrone
Method, Causing No new player can participate after the first claim.Normally, any player except the current king should be able to claim the throne by paying the claim fee.
The contract currently only allows the current king to claim the throne, which breaks the intended game logic and makes the game unplayable for new participants.
Likelihood:
This will occur every time a non-king tries to claim the throne, as the require statement blocks them.
The game cannot progress beyond the first king.
Impact:
No new players can participate after the first claim.
The game logic and incentives are completely broken.
To demonstrate the i issue, we need to show that only the current king can claim the throne, and any other player will be reverted by the contract.
This breaks the intended game flow, as new players should be able to claim the throne.
Add the following test to your GameTest.sol
to show that a non-king cannot claim the throne:
Change the require statement to prevent the current king from reclaiming, allowing others to claim:
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.