Last Man Standing

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

Owner Can Update Game Parameters Mid-Round (gracePeriod, claimFee, platformFee)

Root + Impact

Description

The contract owner has the ability to modify key gameplay parameters at any time using:

  • updateGracePeriod()

  • updateClaimFeeParameters()

  • updatePlatformFeePercentage()

Since these functions can be called while a round is active, they enable unilateral mid-game rule changes, such as:

  • Extending/reducing the gracePeriod

  • Making the next claimFee suddenly unaffordable or much cheaper

  • Increasing the platformFee to capture more from the pot

This undermines fairness and opens doors to manipulation, especially if the owner is a participant or colluding with one.

// @Owner can call these at any time, including mid-round
function updateGracePeriod(uint256 _newGracePeriod) external onlyOwner { ... }
function updateClaimFeeParameters(...) external onlyOwner { ... }
function updatePlatformFeePercentage(uint256 _newFee) external onlyOwner { ... }

Risk

Likelihood:

  • Always possible: These functions have no restriction on when they can be called.

  • Likely to be abused in high-stakes or high-value rounds.

Impact:

  • Game Fairness: Players make decisions based on current rules. Changing them mid-round is deceptive.

  • Trust Loss: Players may consider the game rigged or unfair.

  • Financial Harm: Players may be tricked into paying unexpectedly high fees or miss winning due to a changed gracePeriod.

Proof of Concept

Example:

// Scenario:
// 1. A player claims the throne assuming a 1-hour grace period.
// 2. Owner calls updateGracePeriod(10 minutes);
// 3. Previous king is declared winner prematurely.
await game.claimThrone({ value: calculatedFee });
await game.updateGracePeriod(600); // Reduces grace period to 10 mins
// Winner can now be declared in 10 mins, not the expected 1 hour
await time.increase(601);
await game.declareWinner(); // unexpected winner!

Similarly, increasing platformFee mid-round reduces the payout to the winner, or changes fee economics unfairly.

Recommended Mitigation

Explanation:

Freeze gameplay-critical parameters during active rounds. Only allow updates between rounds or schedule them for the next round.

+ function updateGracePeriod(uint256 _newGracePeriod) external onlyOwner gameEndedOnly{
+ function updateClaimFeeParameters( uint256 _newInitialClaimFee,uint256 _newFeeIncreasePercentage) external onlyOwner isValidPercentage(_newFeeIncreasePercentage) gameEndedOnly{
+ function updatePlatformFeePercentage(uint256 _newPlatformFeePercentage) external onlyOwner isValidPercentage(_newPlatformFeePercentage) gameEndedOnly {
Updates

Appeal created

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!