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): 0xc33b9f0bee1d8ef650e7bb0edf4590c78691858044925625a443267c625e5b5c

clientSeed: 0xb8c8332d08b5616c0490147064b45371d422143399f61ce507f2e26ba578c576

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x9577c54dd639fe00a61365c2f0070d3718d159d72cbe94b6675704a7a51d32f4

clientSeed: 0xf12e999ddc0d6b452fd395c61c06135286b1ed5ba3cdd4e3d8e197cb128ca6a9

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x24d5e14176236ff7fcb2d4db69870149192d8369adf799313bff22ad8d10f7ef

clientSeed: 0xe7ee2dd6d3bc1b68ccb2f80429ab27cbe9d8c0870cb67e94d0f69f68444a4120

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): n/a

clientSeed: 0xc7232ae2d71047eab03ff5d11ac53807851945f1f3754091bbb5f13cee458411

chain entropy: not yet, arrives with the draw

Rapid Firecancelled

serverSeedHash: 0x0910871ec4eb4bed91ca958152b038dbfe261e45c17b08d83b74b09bc9e8f545

clientSeed: 0xfa60a86eea02fa2eb54581650ec936d1f09605c6906ff5c942718539dfa466c1

serverSeed (revealed): 0x5f433b6866285cc688bb51b0ed64be3ecc670ecf8c503d7bcc86019446763d0e

chainBlockhash (revealed): 2qKNHR3fPLf4hFu92sgkFutznCFg3v7RiATqz6tKXFNP

chainSlot: 457751554

Rapid Firecancelled

serverSeedHash: 0x331b50d3166e69e3a8d08472d7246b5be68a0b81aef27d871644bc85b24352a8

clientSeed: 0xf1131effccb350296c9eb5cc3415a4a6404ae2b12d4d76d2b9300f6a0e2ec202

serverSeed (revealed): 0x283dd92a3606d69701c3e3b144789d572ffc7510ae9c4c8d47029c880f133d12

chainBlockhash (revealed): 6fjtc2YmBB6CLJz4CtUcJYYxVq8mb2ZbFjTD4LFkR2E1

chainSlot: 457750171

Rapid Firecancelled

serverSeedHash: 0x8dcc53a9b2db0314df10eb4558acb64e452de4bf46c364a46b520be9c4663af9

clientSeed: 0xb23aee2c034a4619d34bcc36cf027338c1ab56925a1f99babea19035bebb17da

serverSeed (revealed): 0x6b74bcaf90f51c42f98748d8be94734bc2416c6f7168d2a5ffb75044bcaa26c2

chainBlockhash (revealed): 7bCKJtREwjMC6eDqMob78L8cy43HmQyqSeXtG8aii7nX

chainSlot: 457748787

Rapid Firecancelled

serverSeedHash: 0xd52d917637c0fee1c50b3ec5c6f835420182f942835b5efba1fc5625b7740bbe

clientSeed: 0x5d5f0ca0ecd3bef20aa8446f74c635d5dafa949ce7fe0ba90be36e0fbc7e4665

serverSeed (revealed): 0x003b6abe4598c8ff3903c165635638b3675b83acbb6a2a3ae116702dd691c820

chainBlockhash (revealed): FDCbJtFsJJ4ii1s1KKFRmKaPoWu9nrKFg9gn4BR1MWWm

chainSlot: 457747410

serverSeedHash: 0xb19944a7fbec8864659f274df7ca888c1c0177c9090f1a8674d16731eedc443d

clientSeed: 0x83f44ef04b794982d5407bdec2627fd0414efdd58e9cfe8139199723dd725836

serverSeed (revealed): 0xed0f862c706d032558917cc0a202dfa7fd6f0dd5d9ed05a1cee2d7a82e642393

chainBlockhash (revealed): 3SHY1Pk3J38DkMVjkssi93e4pqhu6eRUkAHCqkjyABDd

chainSlot: 457746033

Rapid Firecancelled

serverSeedHash: 0x2b7c1750be2a8041b8b870727b2ace4629b0b21dee9c2f0fe096a7e350ddf6a1

clientSeed: 0xe23247a1490d56f3b94e35a7a89e1638afd20af4574c8df45163b02eb930301e

serverSeed (revealed): 0x92ca9b911ec99c1ba2df5f3e791a373fda6adbe425fdff7f5fbba055f8a519c8

chainBlockhash (revealed): 8qaz7KsgEFaAHDzDURQUDj3FDVkSMMwFUtJBaiEFczmv

chainSlot: 457746034

Rapid Firecancelled

serverSeedHash: 0xe43e03f78b4bc51c2b4a6668717231b91e027950f6d783717a1d5cfc00bef826

clientSeed: 0x724f875926b77d3ca8d24790cb665210acd175f0a856a570e904899abeb6165a

serverSeed (revealed): 0x04fa6b89ad8bd55fcd6794cdab2412239ffe9e4508c10fa968c38e6c0a837a16

chainBlockhash (revealed): DCDhEr4dcnKyupNVEZx3bGD2gf29CswNTQZGN5Pe3jrG

chainSlot: 457744653

Rapid Firecancelled

serverSeedHash: 0xb76ed29f242edbf55944afb6bc2993cf8ae118b873e03c361d23621cd2c407eb

clientSeed: 0x41c925a54588073687ff7bdc7d7e245051665b9562721988dbde31f8367decba

serverSeed (revealed): 0x050be3b16005f2873a15f06e597472d42a5bbf8d9cd0a9548dbd32e62f02f8dc

chainBlockhash (revealed): 3D6kbRQnuXnGWU5qbSDT4PJmVaADXjLhjkDh4id8vZsL

chainSlot: 457743265

Rapid Firecancelled

serverSeedHash: 0x70c968ec7b586389987a83560b3484db95449a314ec272ead0d1bc85945cab58

clientSeed: 0xcabb582f8abd5ec60228ce51d040ad5d7eba6475139c69ebd53ec42a0c5d04f3

serverSeed (revealed): 0xdafd94fb6e956c85992c25959a5d0ba2aa782f6a80c666a2d352a94ef118ed75

chainBlockhash (revealed): 67ttqbjAANf5p8hhTivTUbqpgEf2oHDDLgFDesLQCbP6

chainSlot: 457741883

Rapid Firecancelled

serverSeedHash: 0xa8454856eaa7e7f88b7bb25c563fff434ef8f336f44edcb60379df62f30644ac

clientSeed: 0x8f02cdbf5ae5d48d469148e377f63f3ebe1c4a83ad0f712d7b7b769b0a1fb9dc

serverSeed (revealed): 0x15862dbb58f1e074616746c0936df68da2cb4d97139b04612bde956e4a100530

chainBlockhash (revealed): 7YyZs9CrCTjS13Yy7Y4HByikLKE9GGeR749AurL9SnoR

chainSlot: 457740480

Rapid Firecancelled

serverSeedHash: 0x7aa906cdddb3f2243b3b895988075cc6f2bc23b5507a8f05beaf32e41d813ff3

clientSeed: 0xfc851057dcb9e5a628f62b044a4249e3717456e18e08aac575271bd85a23b9ea

serverSeed (revealed): 0x4b034049b5100c4521aaa95603390d3f170b6524d3bb5c154b51380e84fe3b5d

chainBlockhash (revealed): E5Q1DjZBc3Y98vDt2QEsNTSLrVCA2UG8NwqPegCswVhd

chainSlot: 457739100

Rapid Firecancelled

serverSeedHash: 0xda773a2c1d9dfe461d5ec45658d67e2075bcada6fd54ea6bc19a28488ea471c5

clientSeed: 0x3c008d8ce013cae2b623d41294bebeacb8947c86182c847fd83b219bc5ca6b24

serverSeed (revealed): 0xafb09d0beb77a75939545e5fc9dafdb8a074de5e7f05b9b3d4cb123a1b530510

chainBlockhash (revealed): 82WTjF9U2rCjfGrfuvtQcjmPyfroHN3Xk6q5wH6RiWXf

chainSlot: 457737723

Verifier