What provably-fair here does and does not prove
Commit-reveal verifies: "the seed we revealed hashes to the hash we showed you." It does NOT verify: "we committed that hash before the round started" or "we didn't pick which precomputed seed to serve based on the pool composition." Without an external witness (on-chain anchor, drand-schedule commitment, mandatory user-seed binding), 'provably fair' here means 'provably not-trivially-retroactively-tampered'. Not the same thing.
8 ways around the scheme
The commit hash arrives via the server's WebSocket, from the same server that generates the seed. There is no on-chain Solana transaction, no public append-only log, no Merkle anchor, no signed attestation. The client stores commitHash in memory and shows it in the UI as 'Next Seed Hash (committed)'. If a user does not independently log the commit value against a trusted timestamp (which no normal user does), the operator can serve commit_A up-front, actually run seed_B, and reveal seed_B at the end — the hash check still passes because the operator rewrites what it 'committed' before the user compares.
Operator precomputes K candidate seeds for the next round. At commit time it serves hash_i for whichever seed_i the server wants to actually use. At reveal, serves seed_i. Hash verifies. No external witness ever saw the original commit.
Anchor commit on-chain BEFORE accepting bets (one Solana tx per round). Users verify commit matches the on-chain tx. Operator can no longer rewrite history.
Only by third parties who archive commits with external timestamps (e.g. a Twitter bot, a chain-anchor browser extension, archive.org snapshots of the fairness UI).
Operator generates N candidate (seed_i, hash_i) pairs offline. During each round's open phase, operator watches the live betting pool. When it's time to commit, operator picks the seed_i whose generated price curve maximizes house EV against the current pool (short-heavy pool → pick a seed with a long run; long-heavy pool → pick an early rug seed). Serves the matching hash_i. Users verify; all passes.
Because N can be large (precompute 10k seeds overnight), operator has fine-grained control over outcomes. The bigger the pool, the more incentive. UUID-v7 roundIds (A2) amplify this because they let serverSeed alone determine the curve — no roundId randomization dilutes the choice.
(a) On-chain anchor per round (V1 mitigation). (b) Force seed to be derived from a future-unknown source (drand next round, Solana block N+5). (c) Mandatory user-seed binding (see V3) so operator cannot pre-pick.
Statistical analysis of historical rounds vs. pool composition at commit time. If house win rate correlates with pool skew, that is the fingerprint. Requires archive of per-round pool snapshots + reveals.
The UI exposes an advanced option: user sets a client seed → RNG becomes HMAC-SHA256(serverSeed, userSeed). This is the one thing that would stop V1 and V2 cold — operator cannot pre-pick a serverSeed that produces a target outcome, because the user's unknown-until-reveal clientSeed shifts the whole RNG stream. BUT the feature is optional and hidden. 99 % of users play with the default (serverSeed alone). For those users, the HMAC path offers zero protection.
Operator does not need to bypass anything — users opt-out of the protection by default. Operator exploits V1 or V2 on the ~99 % of users who never touch the client-seed field.
Make client seed MANDATORY. Auto-generate at round-join if user doesn't set one. Display prominently. Make it the DEFAULT fairness mode, not an advanced opt-in.
Trivially — the UI reveals which rounds used user-seed binding. The population split is directly observable.
The round sends `game:standard:tick` events. The pricing is deterministic given the seed — which the OPERATOR already knows the moment commit is published. Any operator-owned account can place sidebets, open longs/shorts at any tick, close before rug, and claim rugpool tickets, all with perfect information. External users never see the seed until reveal (`pendingReveal` state exists precisely because reveal is delayed). The operator can trade against its own users with perfect foresight.
Operator maintains a 'friend account' or set of accounts. Each round, operator computes the rug tick from its own serverSeed. Enters LONG at tick 10 if rug tick > 50, closes at tick (rug - 5). Enters SHORT if rug tick < 30, closes just before. 100 % win rate on these specific accounts. Blends into general player activity.
Operator-owned accounts must be flagged publicly and barred from betting. Only enforced by third-party audit of registration IPs, deposit addresses, play patterns.
Statistical analysis of account win rates. Accounts with impossibly consistent cash-out-before-rug patterns are suspect. Requires public access to the full trade history.
Full Shield mode advertises `${serverSeed}|${externalHash}` where externalHash comes from drand or a Solana block hash AFTER commit. The intent: operator cannot pre-know externalHash, so cannot pre-pick serverSeed to produce a favorable outcome. BUT if the operator controls WHEN to freeze externalHash (which drand round, which Solana block), they can:
Wait for drand round N to publish. Try each precomputed candidate_serverSeed against drand_N. If none produce a profitable combined seed, wait for drand N+1. Rinse until one does. Submit that pair. From the user's perspective it looks fair — drand N+k genuinely was random — but the (seed, drand) pairing was adversarial.
Protocol MUST pin externalSource to a committed-ahead schedule (e.g. drand round number = round_start_timestamp / 30 + offset, with offset baked into round config BEFORE commit).
If drand round number used per rugs round is not strictly monotonic / matches a public formula, that is the smoking gun. Compare published externalSource timestamps against actual drand round timing.
The 'Shield' mode copy says 'hash chain locked and tamper-proof'. A hash chain is only tamper-proof if the chain head is published somewhere external. The code shows no reference to a public chain-head endpoint, no Solana PDA storing chain-head, no scheduled public attestation. The chain exists only in the server's own records.
Operator rotates backing store or 'loses records', claiming data corruption. Entire historical chain becomes unverifiable. Old malfeasance is masked.
Publish chain-head to a public immutable store (Arweave, IPFS pinned, Solana memo instruction, GitHub append-only repo with release tags) on every N-th round.
By checking whether a public chain-head endpoint actually exists and is populated. Currently: none observed in the client bundle.
If a user disconnects between commit and reveal (common on mobile, flaky WiFi), the client never records the commit it saw. On reconnect, the server can deliver a reveal matching ANY commit it chooses to show post-hoc for that user's view. User's local 'commitHash' is empty, so verification trivially passes.
Operator wait-and-see: if a user DCs during an unfavorable (to the house) round, serve them a different reveal matching a reconstructed-after-the-fact commit.
Persist commitHash to localStorage immediately on receive. On reconnect, cross-check server's claimed commit against the persisted one.
User-side via disconnection logging + replay testing.
Hash verification uses `crypto.subtle.digest('SHA-256', serverSeed)`. This is browser-native, correctly implemented. The weakness is NOT the hash primitive — it's that the hash check only proves 'revealed seed matches committed hash the user has in memory.' It does NOT prove 'the server published that commit before the round started.' Correct crypto, wrong trust model.
N/A (not the attack target). Flagged to clarify that the fairness isn't broken by weak hashing — it's broken by lack of external witness.
See V1.
N/A.
What Full Shield mode mixes in
drand — External randomness beacon (League of Entropy). Public, verifiable, scheduled rounds. Future beacon output unpredictable to anyone without compromising the beacon network.
solana — Solana block hash. Public post-commit. Future block hashes unpredictable to a party without validator control over the exact slot.