The claimThrone()
function’s documentation states that the previous king receives a portion of the new claim fee, but the implementation does not execute this logic. Instead, it initializes previousKingPayout = 0
and never assigns any value to it, meaning the previous king receives nothing.
The defensive check (if (currentPlatformFee > (sentAmount - previousKingPayout))
) is redundant since previousKingPayout
is always 0
.
Likelihood: Medium
Reason 1 : The discrepancy affects every throne claim after the first one (i.e., whenever there is a previous king).
Reason 2: The mismatch between docs and code guarantees user confusion, as the promised payout mechanism is non-functional.
Impact:
Impact 1: Economic distortion – The pot grows larger than intended (since no funds are diverted to previous kings), unfairly benefiting future winners.
Impact 2: Reputational harm.
Scenario:
Player1
claims the throne (becomes currentKing
).
Player2
claims the throne, sending 1 ETH
(claimFee = 1 ETH
).
Expected: Player1
(previous king) receives a small payout (e.g., 10%).
Actual: Player1
receives nothing; entire 1 ETH
(minus platform fee) goes to the pot.
1.Implement the payout logic to match the docs.
2.Or Update the documentation to remove references to previous king payouts.
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.