Normal behavior:
When a new player claims the throne, the previous king should receive a portion of the claim fee as a reward for holding the throne.
Specific issue:
The contract does not pay the previous king when a new player claims the throne. Although the variable previousKingPayout
is declared, it is never used to credit the dethroned king. As a result, the previous king’s pendingWinnings
remains zero, and they receive no reward.
Likelihood:
This will occur every time a new player claims the throne, as the payout logic is missing.
Impact:
The dethroned king receives no reward, breaking the game’s economic incentives and fairness.
Violates the protocol’s documentation and may lead to loss of trust or legal risk.
The following test script demonstrates the bug. Player1 claims the throne, then player2 claims the throne. Player1’s pendingWinnings
remains zero, proving that no payout is made.
Pay the previous king before updating currentKing
in claimThrone()
:
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.