The current implementation calculates the new claim fee by applying a fixed feeIncreasePercentage
to the previous claim fee, rather than basing it on the sendAmount
provided by the player in the claimThrone
function. As a result, any additional amount sent by the player beyond the required claim fee does not contribute to increasing the next claim fee. This reduces the strategic advantage for the player, who might aim to discourage future claims by raising the claimFee
threshold.
New claim fee was computed based on the addition of feeIncreasePercentage on previous claim fee instead of the sendAmount
input by player in the claimThrone
function. This causes the additional amount sent in by the player was not used to raise the the next claim fee to increase the chances of winning for the currentKing with the hope of no next claim due to the new high claim fee.
Likelihood:
Current implementation affects all players who send more than the minimum claim fee, they receive no strategic advantage in return. The extra amount they contribute does not help increase the next claim fee, meaning it doesn't improve their chances of retaining the position of currentKing
. Instead, the additional funds go entirely toward increasing the platform's fee and the final pot value, benefits that the player may not enjoy if a new claimant emerges shortly after.
Impact:
Current implementation may discourage players from contributing more than the minimum claim fee, as the additional amount offers no direct advantage in retaining the throne. As a result, overall user engagement and strategic play may be affected. Players may become less willing to invest higher amounts, leading to lower platform revenue growth and a slower increase in the final pot value.
Instead switching to a model where the new claim fee is calculated based on the actual sendAmount
would provide several benefits as below:
Incentivizes higher bids: Players are motivated to send more than the minimum, increasing their chances of retaining the throne longer.
Increased platform revenue: Higher sendAmount
directly contributes to greater fee collection.
Larger final pot value: As more funds are funneled through claims, the overall pot value increases, enhancing the game’s appeal.
This change aligns player incentives with platform growth, rewarding both high bidders and the platform simultaneously.
In test/Game.t.sol
, add the following test:
In terminal, run forge test --match-test test_audit_nonIncentivizingClaimFeeCalculation -vvv
will generate the following results:
The test passed showing that the next new claim fee was lesser than the amount the player expected it to be, which the extra money invested didn't help the player strategically.
Use sendAmount
instead of claimFee
when computes the next claim fee:
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.