The game design assumes that a player is a current king, shouldn't be able to claim throne while still being a king.
The check, in the claimThrone function, which should make sure that current king won't claim the throne again, is incorrectly implemented and prevents anyone from entering the game.
Likelihood:
The issue will occur everytime when somebody will try to call the claimThrone function because it will check msg.sender against the 0 address.
Impact:
Incorrectly implemented check makes smart contract unusable right after deployment.
Unaware players will lose gas used to submit tx.
The following test should be added to the Game.t.sol file. This test shows demonstrates scenarios where a player tries to enter the game and tx reverts with error.
The check must be update to make sure that msg.sender isn't the current king instead of comparing msg.sender with the currentKing value.
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.