According to the game documentation: "The current king receives a small payout from the next player's claimFee (if applicable)."
However, in the current implementation of the claimThrone()
function, there is no logic to compensate the previous king when a new player claims the throne. The variable previousKingPayout
is declared but never assigned or used.
Likelihood:
The issue will occur every time a new player claims the throne, because previousKingPayout
is always set to 0 and never update.
The documentation clearly states the previous king should receive a portion of the claim fee - but no logic implements this behavior.
Impact:
Players expect to earn partial rewards when dethroned, which is a core mechanic and incentive.
Previous kings never receive compensation, making the game less attractive and possibly discouraging participation.
Reputational risk for the contract owner if the siscrepancy between doc and logic is discovered post-deployement
Player 1 calls `claimThrone()` and becomes the current king
Player 2 calls `claimThrone()` with sufficient ETH
Player 1 receives nothing, despite being promised a reward. But he should received a small reward as per documentation.
Implement payout logic for the previous king 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.