When a new player claims the throne, the dethroned (previous) king should receive a payout from the new claim, as described in the README (“Receives a small payout from the next player's claimFee”).
The current implementation never pays or credits any amount to the previous king. The relevant code in claimThrone() only initializes previousKingPayout to 0 and never updates or pays it. As a result, dethroned kings receive no reward for holding the throne, breaking the intended game economics.
Likelihood:
This will always occur whenever a player is dethroned. The previous king receives nothing because their payout is never calculated or credited.
Anyone reading the README or expecting the documented behavior will notice the missing payout in both tests and live usage.
Impact:
The dethroned king is never rewarded, breaking fairness and removing a key incentive from the game.
Players may lose trust or interest, leading to reduced participation and negative reputation for the protocol.
The contract does not match its documentation or intended game rules.
Alice claims the throne.
Bob claims the throne after Alice.
Expected: Alice receives a payout from Bob’s claim.
Actual: Alice receives nothing. The entire amount (minus platform fee) goes only to the pot.
Add a parameter for previousKingPayoutPercentage (e.g., settable by the owner, capped at 100).
On every new claim, if there was a previous king, credit them their share to pendingWinnings.
Ensure the sum of previous king payout, platform fee, and amount to pot does not exceed sentAmount.
Players can then withdraw their pending winnings via the existing withdrawWinnings() function.
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.