The claimFee
is designed to increase by a fixed percentage (feeIncreasePercentage
) after each successful throne claim to incentivize progressively higher stakes.
However, when the initial claimFee
is set to a very small value (e.g., below 100 / feeIncreasePercentage
wei), the calculated fee increment (claimFee * feeIncreasePercentage) / 100
evaluates to zero due to integer division rounding.
As a result, the claimFee
remains constant across claims, breaking the intended progressive increase mechanic.
Likelihood:
This issue only manifests if the initial claimFee
is configured with a very small value, which is unlikely under typical deployment parameters.
Impact:
The stagnation of the claimFee
breaks the game's economic design by allowing players to claim the throne repeatedly at a fixed minimal cost, potentially impacting user incentives and gameplay fairness.
Deploy the contract with an initial claimFee
of 1 wei and a feeIncreasePercentage
of 10.
After a player successfully calls claimThrone()
by sending 1 wei, observe that the claimFee
remains 1 wei due to rounding of the increment to zero.
Implement a minimum increment logic to guarantee the claimFee
increases by at least 1 wei per claim:
Alternatively, enforce a reasonable lower bound on the initial claimFee
during contract deployment to prevent values that would cause zero increments.
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.