Description:
This logic incorrectly checks if the sender is the current king, which prevents any non-currentKing from claiming the throne.
The check should be to ensure that the sender is not the current king, allowing anyone else to claim it.
Impact: Since initial value of currentKing
is address(0)
, this logic blocks any user from claiming the throne, effectively making the game unplayable.
Proof of Concept:
add the following test to Game.t.sol
and run it
Recommended Mitigation:
change the logic to any non-currentKing can claim the throne
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.