In a normal flow, when a player claims the throne, they must pay at least claimFee
. Upon successful claim, the contract increases claimFee
by a percentage defined in feeIncreasePercentage
.
However, the current implementation increases the claim fee based only on the minimum threshold, rather than the actual amount sent, which may be higher. This allows a player to overpay significantly to create the illusion of a high-value throne (to hold the throne for longer and make it harder for others to claim it), yet the next user can still claim the throne with a minimal increase over the baseclaimFee
.
This breaks the intended fairness of increasing claim cost over time and allows strategic manipulation of perceived throne value.
Likelihood:
The likelihood is High because:
This is very likely to occur in competitive scenarios, where players deliberately overpay to secure the throne and psychologically deter challengers.
Users may falsely assume the next claim will require an amount proportionate to the previous deposit, but the contract logic doesn't enforce that.
Impact:
The impact is high because it:
Breaks fairness: allows manipulation of the claim cost mechanism.
Can create a deceptive sense of high-value gameplay while allowing low-cost takeovers, possibly affecting user trust or leading to front-running.
The POC demonstrates how an user who overpaid so that he can stay at the throne for longer and make it harder for others to claim his throne is overthrown by a lower deposit that his.
Add the test below to the Game.t.sol
and use the following script:
NOTE: for the poc to work replace the following require statement inside the claimThrone() (which is another issue):
Result:
Instead of increasing claimFee
based on the old claimFee
, it should increase based on the actual contribution to the pot (sentAmount - fee
), which better reflects the real stake of the last king:
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.