The Game::claimThrone() function promises in its documentation to distribute "a small portion of the new claim fee" to the dethroned king. However, the implementation hardcodes previousKingPayout = 0 and contains no logic to calculate or transfer funds to previous kings. This creates a critical discrepancy where:
Documentation misleads players about game mechanics
Previous kings receive zero compensation despite protocol promises
Game economics are broken, as early kings subsidize the pot without reward
The variable previousKingPayout is declared but never initialized with actual payout logic. The code only allocates funds to the platform fee and pot, completely ignoring payouts to dethroned kings.
Likelihood:
Affects 100% of throne claims after the first king
Easily verifiable by reading the function logic
No conditionals bypass the flaw
Impact:
Previous kings lose expected ETH payouts
Documentation describes nonexistent mechanics
Disincentivizes early participation; breaks core "King of the Hill" dynamic
No transfers to currentKing before it gets overwritten.
Simulation:
King A claims throne with 1 ETH
→ Pot = 0.95 ETH (assuming 5% platform fee)
King B overthrows with 1.1 ETH
→ King A receives 0 ETH
→ Pot grows to 2.045 ETH (0.95 + [1.1 - 5% fee])
Mathematical Proof:
The payout formula never executes:
Implement the documented payout logic:
Add checks:
Ensure kingPayout doesn’t exceed (sentAmount - platformFee)
Use call{value} over transfer() for reentrancy safety
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.