The claimThrone() function fails to implement the partial payout mechanism promised in the documentation for the "last king."
According to the project docs, the previous currentKing should receive a small portion of the next player's claimFee when overthrown.
However, the current code contains no logic to transfer or credit such a payout, resulting in the last king never receiving their due portion.
From the game documentation:
"Receives a small payout from the next player's
claimFee(if applicable)."
This means that in the claimThrone() flow:
A player (previousKing) is dethroned.
The new king pays the claimFee.
A portion of this claimFee should be sent to the previousKing immediately or credited to their pendingWinnings.
However, in the current claimThrone() implementation:
The claimFee is split between the platform fee and the pot.
There is no allocation to the previousKing.
The dethroned king receives nothing unless they win the pot after the grace period, which is unrelated to the small payout mechanism.
Impact:
Broken game mechanics: This is a direct mismatch between the documentation and actual implementation, causing incorrect in-game economics.
Financial loss for players: Previous kings lose the payout they were promised when a new king takes the throne.
Loss of incentive: Players may be discouraged from participating, as the small payout from being dethroned is one of the incentives for claiming the throne early.
Trust issues: If the docs claim a feature exists but it does not function, it undermines trust in the game’s fairness.
But before running the test, you need to correct this issue in claimThrone():
A simple test can show the missing payout:
Implement a payout mechanism in claimThrone() to transfer a percentage of the incoming claimFee to the dethroned currentKing.
Suggested Fix:
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.