Last Man Standing

First Flight #45
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

Missing Limit on Fee Increase Can Lead to Permanent Lock

Root + Impact

Description

  • Each time claimThrone() is called, claim fee increases:

claimFee = claimFee + (claimFee * feeIncreasePercentage) / 100;

But there is no max cap on claimFee.

If feeIncreasePercentage is 100, then:

  • First claim: 1 ETH → next fee = 2 ETH

  • Next: 2 ETH → 4 ETH

  • Then: 4 ETH → 8 ETH

  • Very quickly: 32 ETH, 64 ETH, 128 ETH...

Eventually, no one will be able to afford it → game freezes

Risk

Likelihood:

Impact:

  • Game freezes after few rounds

Proof of Concept

Owner sets feeIncreasePercentage = 100, then lets the game run for 5–6 claims. Observe claimFee becomes unaffordable.

game.updateClaimFeeParameters(1 ether, 100); // +100% per claim

Then try calling claimThrone() with large values — eventually, no player can afford it.

Recommended Mitigation

Add a maximum cap to claimFee, like the below code

Or set a maximum feeIncreasePercentage during config (e.g., 25%).

uint256 maxClaimFee = 10 ether; // arbitrary safe cap
if (claimFee > maxClaimFee) {
claimFee = maxClaimFee;
}
Updates

Appeal created

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.