All owner update functions Game::updateGracePeriod()
, Game::updateClaimFeeParameters()
, and Game::updatePlatformFeePercentage()
lack any restriction to prevent them from being called while a game is active. This allows the contract owner to manipulate core parameters at any time. Any ability to change it during an ongoing game introduces centralization risk and violates the expected fairness for participants.
The following functions can be arbitrarily called by the owner while a game is still ongoing:
Game::updateGracePeriod(uint256 _newGracePeriod)
Game::updateClaimFeeParameters(uint256 _newInitialClaimFee, uint256 _newFeeIncreasePercentage)
Game::updatePlatformFeePercentage(uint256 _newPlatformFeePercentage)
None of these check whether the game is currently active or has ended. As a result, any of these parameters can be modified during an ongoing round to:
Favor a specific player.
Disrupt timing expectations.
Or maximize platform profits at the expense of players.
Such actions violate the trustless and fair competition expectations of on-chain games.
The ability to change gameplay fees, reward timing, or platform fee percentages mid-round breaks player trust and fairness. A malicious or compromised owner can:
Extend or reduce grace period based on who is king (Game::updateGracePeriod())
.
Increase/Decrease the feeIncreasePercentage right before a friend claims the throne (Game::updateClaimFeeParameters())
.
Increase platform fee after a big deposit to siphon more ETH (Game::updatePlatformFeePercentage())
.
This undermines the core assumption of immutability and fairness in game mechanics.
This test verifies that the contract owner can update key game configuration parameters grace period, claim fee, fee increase percentage, and platform fee while the game is actively running (i.e., mid-game).
The test simulates a real game scenario:
Player1 claims the throne, initiating the game
The owner then changes game parameters
Player2 claims the throne under the new conditions
Assertions check that updated parameters are reflected
This test highlights a potential vulnerability:
These updates can be made during an active game, potentially giving unfair advantage or breaking assumptions for current or future participants.
Add a Game::gameEndedOnly
modifier (or a similar check) to restrict such changes to only after the current game ends:
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.