The root cause lies in the presence of a previousKingPayout
variable in claimThrone()
that is never assigned any non-zero value. The logic surrounding it suggests the previous king should receive part of the next claim fee — as stated in documentation — but no actual payout ever occurs:
Receives a small payout from the next player's
claimFee
(if applicable).
The impact is twofold: (1) the platform fee calculation includes a defensive check involving a meaningless variable, and (2) players are misled into thinking they will receive payouts as the previous king, when in fact they receive nothing.
The contract defines a previousKingPayout
and references it in fee calculations, but it is never assigned or transferred to the previous king.
This creates misleading expectations for players and leaves dead logic that serves no purpose.
Likelihood:
The likehood is High because:
Always active; previousKingPayout
is permanently set to 0
.
Code executes on every claimThrone()
call but has no real effect.
Impact:
The impact is Low because the issue:
Misleads users who expect payouts as per the documentation.
Introduces unnecessary code complexity and false safety checks.
None.
If previous king payouts are intended:
If not intended, simplify the logic:
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.