Provably Fair

Every game commits first, then rolls with entropy from the Solana chain. Here is exactly what that does and does not protect you from.

How a round actually runs

  1. Commit. When a lottery round, duel lobby or case battle is created, the server generates a secret serverSeed and publishes keccak256(serverSeed) straight away, next to the public clientSeed. For duels and battles this happens before an opponent even exists, so nobody can pick a seed that targets a known player list. Lottery rounds commit before a single ticket goes on sale.
  2. Close. Entries lock: lottery buys and sells stop at the closing tick, a duel needs both stakes in, a battle needs both players matched. Case battles also freeze a copy of the case's drop table at match, so later case edits cannot touch a battle already running.
  3. Entropy. Only after the inputs are locked does the settlement worker fetch one Solana blockhash and persist it together with its slot. Battles fetch theirs at match because the live per-round reveal starts there. The fetch only accepts a slot strictly newer than the chain tip recorded at commitment, so a game created and matched inside a single slot waits for the chain to move. A blockhash from after the commitment cannot be known at commitment time, which is what breaks seed grinding: the operator can try seeds all it wants, the final input has not happened yet.
  4. Derive and reveal. The outcome is one hash over serverSeed, clientSeed, the chain blockhash and the game id. At settlement everything is revealed: the seed, its published hash, the blockhash and its slot. You can re-run the math yourself in the verifier below and check the blockhash on any Solana explorer against the published slot.

What we can still do, stated plainly

  • The worker that fetches the blockhash is ours. It keeps trying until a value lands in a slot newer than the commitment, and exactly one fetched value is written with the settlement claim, so it cannot be quietly swapped afterwards. Attempts that fail or land too early simply retry, and a compromised or dishonest server could still time or retry that fetch. That is a single point of infrastructure trust, and no purely server-run scheme removes it.
  • Your account, your balance and the payouts live in our database. If the whole stack is compromised, fairness math will not save you. What this design removes is protocol-level steering: grinding seeds, re-rolling after seeing entries, or adding tickets once the draw entropy is known.
  • Rounds settled before this upgrade (visible in the reveal: no chain blockhash) used only the two seeds, and are still verifiable with the legacy formula.

Formulas

Winner-take-all lottery draws:

target(tier, attempt) = uint256(keccak256(serverSeed || clientSeed || [chainBlockhash] || drawId || tier || attempt)) mod totalTickets; winner(tier) = first entrant whose cumulative ticket count exceeds target; the single tier-1 winner takes the whole pot (legacy rounds paid up to 4 tiers; collisions with an earlier tier re-derive with attempt+1). Rounds settled after the chain-entropy upgrade include the 32 raw bytes of the revealed Solana blockhash (base58-decoded) between clientSeed and drawId; legacy rounds verified without it leave that segment out

Duel coin flip:

winnerSide = uint256(keccak256(serverSeed || clientSeed || [chainBlockhash] || lobbyId || 0x01 || 0x00)) mod 2; side 0 = lobby creator, side 1 = opponent (join order); rake = floor(pot * 0.5%). Duels settled after the chain-entropy upgrade include the 32 raw bytes of the revealed Solana blockhash (base58-decoded) between clientSeed and lobbyId; legacy duels verified without it leave that segment out

Case battle drops:

value(round, slot) = uint256(keccak256(serverSeed || clientSeed || [chainBlockhash] || battleId || round || slot)) mod 10000; drop = case dropItem whose cumulative weight range contains value; slot 0 = creator, slot 1 = joiner; winner = higher cumulative drop total; exact tie splits the pot after rake; winner takes the pot minus 5% rake, not the opened items. Battles settled after the chain-entropy upgrade include the 32 raw bytes of the revealed Solana blockhash (base58-decoded) between clientSeed and battleId, and derive against the drop table frozen on the battle at match; legacy battles verified without it leave that segment out and use the case's current drop table

Seed commitments

serverSeedHash (commitment): 0x8d73e5ed3b2db4eb284e108613cb6d02fc96434286ad0effbedacf5e5d3f8a76

clientSeed: 0x757e9288af2770f03dc48f967b9de1125fdf143cfaa5f70df9c129cda1d71ddb

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xbbe0ca437af0c7f264245fd5679f4b73f455a4ea322388aac9ad4ad49825d5a4

clientSeed: 0x3a72ba9c4bb6f6b111c7fb0ead969e73c91ee30a2c3903a5d8a89de6c38becd2

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xd449f4dc8f4994cc7c58d5ee3451cc40a65f0076a822926c1139ddd40bea0bb3

clientSeed: 0x784fc8db8aa524dc91467d096b5b9c554b245854bd8a025f940d258928a9b57f

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x1de14308e3055e32d9036594b402fa7d4b23e064f19f926e2e66b8e23301aa1a

clientSeed: 0x19af35baedda7731037af3be6faf601530cecb36afc236f3791b09e792b82184

chain entropy: not yet, arrives with the draw

Rapid Firecancelled

serverSeedHash: 0x8eeff107ed890a1611bb9eff6db67e54d4ea3737d7ab07da97081e76cf7ba1e2

clientSeed: 0x22b73bad96627e53e223fe457d4bd5602ab5ab3adffd89c76ee71380035ab170

serverSeed (revealed): 0x493c4159ad04bc1faf74e50c57caa5849cec8be0ac6c93fc48e028bcce9d0914

chainBlockhash (revealed): BPhaH1YvhfpuCgUDmw7WVXgrPZrPwr5ukZ2XPk5HvHVU

chainSlot: 458402038

Rapid Firecancelled

serverSeedHash: 0x9140a54e0ad5927b5b441963cf5447624bb25d081a176090d625ef40b56d72a3

clientSeed: 0x4d1c133d394db2f53a952818242c7936194f79e5eeb9b92821793e5ecc7bb77f

serverSeed (revealed): 0x148c43f9de993efe4c17757d6fb760bce874b371af583df4f22b40c9faadcca7

chainBlockhash (revealed): Cs1phJ3uJ6GrNHtL5Vq36QhHmcqXTBgGrRcK8R8pFj8X

chainSlot: 458400649

Rapid Firecancelled

serverSeedHash: 0x0dbc413b0a1266953acbed54b4e91a37f090d59892e1004b57072bf555b0f545

clientSeed: 0xbb832562350f58a8784aa41014e06d4f9d9af0675c1e85de77c4ff069c097c8e

serverSeed (revealed): 0xac84eac3ca826886aaaaeb02f19c1bf3f9e594b5cab0229376d29ad509d172f7

chainBlockhash (revealed): DyyGZt9KVFnCyEWFG5Eq6hkvkMLNtp1UcM7ro98YSSeV

chainSlot: 458399267

Rapid Firecancelled

serverSeedHash: 0x65f26e28ae1cdd1c961c456ba46735963ee0dccbf0c9cb20e22aff754365c556

clientSeed: 0x418fd597ad167c48917479209daa2a912c7fea130ccaecb122be9aecf0f61074

serverSeed (revealed): 0xdd393f750e2fcad9c786642bb7dbff11d538d31fc4e75ce8f113c98bbe751518

chainBlockhash (revealed): FQAm2tMPaWXzvyvQ2VzVAjaqgmBmehV8sqxZ3kDad2J

chainSlot: 458397896

Rapid Firecancelled

serverSeedHash: 0x6a5df944e45576382f625b56e493dad6dc4e58acdb2e55bfff7b5e70ee74f90c

clientSeed: 0xdd6761117e1dae1c99e377472412167d11ad1e6aabc2ac2c1ad9983353a3f23d

serverSeed (revealed): 0x6eda549e238e9ba7ac3aab93eb33625b3129a5334d909734dcc06464ddfe14d1

chainBlockhash (revealed): ED8kzLiJMZueq9mhKCkmmPSqf8LsRi37JtGUU56kQApg

chainSlot: 458396520

Rapid Firecancelled

serverSeedHash: 0x52446896a7dc3180071bcb828c4b02664077f3b142109bc38332d4c5c8ff2705

clientSeed: 0xdc9227d45527f6fb36d7eedcb9fdcaa44e7ca8175ca1cb0859c376394f5c4809

serverSeed (revealed): 0x804b72d51bdb2cf263f30dcfc82d54a98a5cadbca451d732daf4b8e0da3270db

chainBlockhash (revealed): FVQMeQgDdgTxSDLP9Ki8HwNBSmhLPGN6RgzXYt4jtYfH

chainSlot: 458395122

Rapid Firecancelled

serverSeedHash: 0x7fbac8f688931918cf4c76da5f9d7f0b7e9f14761d537521f81381f9a6a5f543

clientSeed: 0x71646fb8618fee9045eb191f85d43c6a3e145f8563fa92f21ede18a63d38bfc6

serverSeed (revealed): 0xbade33d103aaaa0bcb531f14844949a8a75838d14489411efdcc28d13e923fa2

chainBlockhash (revealed): AnTdETLgyQgXL1Qe1oTNUeBVNKEBhQrsQ8UMje2AMXT7

chainSlot: 458393732

serverSeedHash: 0x758af80fe75d21b32cca03fb7f5eff7eeaeb7a364dc4ea142a1a97568047b73b

clientSeed: 0x42b35d41269c152e85375867a88ba05567128fe766619589a03e3e8865a5b610

serverSeed (revealed): 0x5f96d19ef4f1f7a98fe262a248903f833fd397db079dcb14ced12221b3b7a9b4

chainBlockhash (revealed): 8tixULHPVWDxjqPeRw87wLEYqqzGDaXFAp749jE2TJQ6

chainSlot: 458393731

Rapid Firecancelled

serverSeedHash: 0x9fcde7e0e9261ca74f741b059059be3c08ef3a415f0d9eb6a753b731db1b9dca

clientSeed: 0xb527dcfc073564f697c688a5457405f1f60a7c52cb0be0f53f0c41818ebed2cc

serverSeed (revealed): 0x8711ed30b5d359750fa0f0a637ef6f7843d62baf54fa40c77184cc7e195c31db

chainBlockhash (revealed): 8jRTH438LARoqoGhbn1d4q1LAdco3co6JwbiFN4Fq2rb

chainSlot: 458392354

Rapid Firecancelled

serverSeedHash: 0xe242819163892dbbfdbab400a7fa9876896a8b02f731a14f236296d2953d14ea

clientSeed: 0xc2b1391a48eb154165411b06f62148459627700302d4465a52474c372ce925ad

serverSeed (revealed): 0x9fc6e7a977b13d2f311a2d765c3d1c70421ea61ccfd732c530aa2572fe1084a3

chainBlockhash (revealed): 2BCC6xtfVVExowdWfoxVM6cBeUQm4um77RoyDQG8LfSL

chainSlot: 458390959

Rapid Firecancelled

serverSeedHash: 0xc44e2a15e27aa29eaf7986eee38be4bc78fc65140af19426d45a22b8b649020d

clientSeed: 0x23c5178b2cc8ec9f3f0c270917b9ec6a9b9dd9dfe890a029bb753e4cf69eca25

serverSeed (revealed): 0x3ba0081932679073602f4b537df587f4cc4ba235cf526a3e8e82c0c2128689e8

chainBlockhash (revealed): CsszLNKDBYN4vjjTTA92icj1aEgpL1zA8YNf276CsYVj

chainSlot: 458389572

Rapid Firecancelled

serverSeedHash: 0xe0cee7e074f557c63df188d2b92daa298fab23fb03cbe8c3a0a952024e8a48b6

clientSeed: 0x0267c496dc1d90aa29c60828a06e436374a660b4e3d689f0753abf317edc9d05

serverSeed (revealed): 0x01ad1f9bf5d85d0f9b945842f1207c8c7c6875595c13f09f0ca14452a1b17730

chainBlockhash (revealed): DtGyAWXdnYcGsTYETf8VmWMNcqPmQ8uXr1Chii73W4Fy

chainSlot: 458388176

Verifier