The claimThrone()
function contains an inverted logic check that prevents any new player from ever claiming the throne, rendering the game unplayable.
Normally, any user should be able to claim the throne by sending the required claimFee
, becoming the new king, increasing the pot, and resetting the timer.
However, due to a faulty logic condition in the claimThrone()
function, only the current king is allowed to call the function, defeating the entire purpose of the game.
Likelihood:
This occurs immediately after contract deployment when currentKing == address(0)
and any player attempts the first claim.
This continues to occur in every game round, as no address other than the current king can ever claim the throne.
Impact:
The core gameplay is completely broken, no one can ever claim the throne or win.
The pot never grows, grace periods never matter, and the contract becomes useless after deployment.
Invert the check to correctly disallow only the current king from reclaiming (if necessary)
Or remove the check entirely to allow re-claims, as they benefit the pot and reset the timer
or
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.