The README and function comments state that the previous king should receive a portion of the claim fee when dethroned.
The contract does not implement any logic to pay the previous king; the variable previousKingPayout
is unused.
Likelihood:
This occurs every time a new king claims the throne.
The previous king never receives any payout.
Impact:
Breaks the economic incentives and intended game mechanics.
Reduces player trust and engagement.
contract have a previousKingPayout
variable declared but no code sends ETH to the dethroned king.
The previous king’s address never receives any ETH when dethroned.
This PoC shows the previous king's balance stays the same after a new king claims the throne, proving no payout happens.
Implement logic to pay a portion of the claim fee to the previous king when a new king claims the throne or remove the redundant variable
1. Implement a Payout Mechanism (Recommended)
How to fix:
Modify the claimThrone()
function so that, whenever a new king is crowned, the contract sends a specified payout (e.g., a share of the claim fee) to the dethroned, previous king. This restores the intended game incentive and trust.
If the design intentionally does not reward the previous king:
Simply remove the previousKingPayout
variable and all related payout commentary or documentation.
Update README/comments to clarify that dethroned kings do not receive any compensation.
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.