Normal Behaviour: Per spec, players (non-owners) claimThrone to become king and build the pot fairly, with gracePeriod fixed per round for expiration/winner declaration—owner updates params but cannot manipulate mid-active game (limits like "cannot declare before expiry" assume stable rules).
Issue: Owner claims throne (no restriction), updates gracePeriod mid-game to shorten (e.g., 1s), forces expiry (timestamp manipulable), declares self-winner—steals pot (user fees) + platform fees (double-dip), bypassing competition and eroding trustlessness.
Likelihood:
Reason 1 : Triggers post-owner claim (deterministic if owner intends)—no "if" prevention on update or claim.
Reason 2: Scales with pot size (more claims = bigger theft). Miner help for short grace edges(delay blocks ~15s).
Impact:
Impact 1: Full fund theft—pot (95%+ user ETH) + platform fees to owner, breaking "fair competition" (web3 core: trustless rules violated).
Impact 2: Central authority erosion—users waste gas/deposits on rigged game; trust lost, protocol abandoned (real-world: Similar rugs in DeFi games cause 80%+ TVL drops, refunds/legal backlash).
This Foundry test simulates the full chain (Owner join/claim + rig update + expiry + withdraw)
Output: [PASS] gas:~250k—verifies central risk in blockchain time/determinism.
Add Owner claim block in claimThrone - prevents insider kings/collusion (to some extent). However, the owner can still join from other external accounts.
Add gameEndedOnly to update gracePeriod - locks changes to postend (next round only).Prevents central authority to change the gracePeriod mid-game.
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.