The claimFee
in the Game.sol
contract increases by 10% after each claim, leading to exponential growth that results in impractically high fees after multiple claims, deterring player participation and potentially rendering the game unplayable.
The claimThrone
function allows players to claim the throne by paying the current claimFee, which starts at 0.1 ETH and increases by 10% after each successful claim, as implemented in:
Likelihood:
The claimFee grows exponentially with each claim, reaching 2.81 ETH after 35 claims and 5.4 ETH after 42 claims in a game with active participation.
Competitive environments with frequent claims accelerate the fee’s growth, making high fees inevitable in prolonged rounds.
Impact:
Players are deterred from participating due to the high claimFee, reducing game activity and engagement, as fees like 5.4 ETH (~$15,000–$20,000) are unaffordable for most.
Impact 2
The following Foundry test demonstrates the exponential growth of the claimFee. It performs 50 claims, cycling through three players to avoid the currentKing restriction, and logs the claimFee after each claim. The test fails at the 36th claim due to an OutOfFunds error, as player3’s balance (initially 10 ETH) is insufficient for the claimFee of ~2.81 ETH.
The test output shows the claimFee growth up to claim 35, with the test failing at claim 36 due to OutOfFunds:
Claim fee after claim 33: 2322515441988780795
Claim fee after claim 34: 2554766986187658874
Claim fee after claim 35: 2810243684806424761
VM::prank(player3: [0xcC37919fDb8E2949328cDB49E8bAcCb870d0c9f3])
│ └─ ← [Return]
├─ [0] Game::claimThrone{value: 2810243684806424761}()
│ └─ ← [OutOfFunds] EvmError: OutOfFunds
└─ ← [Revert] EvmError: Revert
To prevent the claimFee from becoming impractically high, implement a cap on the claimFee.
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.