Although the contract's documentation suggests that a portion of the new claim fee should be paid to the dethroned king, the logic to perform this payout is completely absent. Additionally, variables like previousKingPayout
are defined but unused, reinforcing the appearance of incomplete implementation.
The claimThrone() function documentation states that a portion of the new claim fee should be paid to the previous king. However, this logic is entirely missing from the implementation.
The variable previousKingPayout is initialized to zero and never updated. As a result, no funds are transferred to the previous king, despite the comment suggesting otherwise.
This breaks the economic incentive model and may mislead users expecting a partial rebate when dethroned.
Likelihood:
The issue occurs during normal contract usage. Any player claiming the throne will trigger it, making exploitation trivial and highly likely.
Impact:
Misleading documentation / broken incentive mechanism.
Players may expect to receive compensation after being dethroned but will not.
Implement the payout logic to the previous king as described, e.g.:
Or alternatively, update the documentation and remove unused variables (e.g. previousKingPayout) if this behavior is not intended.
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.