The updateGracePeriod() function should allow the owner to adjust grace period settings for future game rounds or during initial contract setup, with reasonable bounds and restrictions that prevent mid-game rule changes. The grace period represents a critical timing parameter that players rely on when making strategic decisions about when to claim the throne, and this value should remain consistent during active gameplay to ensure fair competition and predictable game mechanics.
The updateGracePeriod() function can be called by the owner at any time without restrictions, allowing real-time manipulation of game timing rules during active gameplay. The function only validates that the new period is greater than zero but lacks reasonable upper and lower bounds, permitting extreme values from 1 second to effectively infinite timeframes. This enables the owner to dynamically adjust grace periods based on their current position in the game: extending periods when they are king to prevent being dethroned, or shortening periods when opponents are king to force premature game endings, fundamentally breaking the fairness and predictability that competitive games require.
The function lacks restrictions preventing changes during active games and has no reasonable bounds checking for extreme values.
Likelihood:
This vulnerability activates whenever the owner's position in the current game becomes threatened or advantageous, as they can immediately call updateGracePeriod() to modify timing rules in real-time based on whether they currently hold the king position or want to accelerate game endings
The manipulation occurs during any active game session where the owner decides to optimize their winning chances, as the function imposes no restrictions on timing changes during ongoing gameplay and allows both extremely short periods (forcing quick endings) and extremely long periods (preventing game completion indefinitely)
Impact:
Unfair competitive advantage for the owner who can extend grace periods when they are king to maintain their position indefinitely, or shorten grace periods when opponents are king to force premature game endings before other players can respond
Destruction of game integrity and player trust through arbitrary rule changes that violate player expectations, as participants enter games with specific timing assumptions that can be unilaterally altered mid-game without consent, effectively creating a rigged game environment where only the owner has control over victory conditions
This PoC proves the vulnerability by demonstrating multiple manipulation scenarios where the owner changes grace periods at will during gameplay. The tests show the owner can set extreme values from 1 second to 100 years, change periods multiple times in succession, and create unwinnable scenarios by setting impossibly long grace periods. The PoC confirms there are no restrictions preventing real-time rule changes, no reasonable bounds checking, and no player protection mechanisms against arbitrary manipulation.
Add restrictions to prevent grace period changes during active games (when a king exists and the game hasn't ended) and implement reasonable bounds (1 hour to 7 days) to prevent extreme manipulation.
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.