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

clientSeed: 0xcc2e4eea6483bc653caa80998181270dc396d6bd6432f26cb6fa9e87bf96d8b1

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x9a469debf4a8c94ab0f3d13ca691f783aaaba10560ebcdba9a0122e441b8bcda

clientSeed: 0x360e40dc5fe803f70beb56a4f68de71924b80c187ac3900b753b07982f6d3df0

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): n/a

clientSeed: 0xc7232ae2d71047eab03ff5d11ac53807851945f1f3754091bbb5f13cee458411

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xd141a9cdbb4df966a65cb0c74863245d48c910c0b171cf2afd18e7f0c1bc3214

clientSeed: 0x5131b2aa68e920aacc3e9368129b70d342ce7bc6b0dab05039d62e1b63f33b81

chain entropy: not yet, arrives with the draw

Rapid Firecancelled

serverSeedHash: 0x7a739b63bb006115cd359ca37c9fc1e8b0ceb523b0fe9853daaabdb95ecfcee3

clientSeed: 0xce2c221c67d41ba9865c054ae0bf34a43d8f8c33663ed62d9a93b5ff9f334e63

serverSeed (revealed): 0x6ede49c98fbf6b05423dd3c0d400039deff4248454fe83d3f514d0e3d92b77ca

chainBlockhash (revealed): EJULPTyeqGSCi9ExSy9sHtzhB91ZKFUeSqWuhTzU4m7C

chainSlot: 457881933

Rapid Firecancelled

serverSeedHash: 0x014a759d27ca4dc53b6a81749ccf516005c40fbe7b98491f02cb5d0a63a59873

clientSeed: 0x20d948e81a4e9c4e099ec0d21c8e9c9ff452ec5e75bbca432a938a18ba666154

serverSeed (revealed): 0xf6a43e13dda77faded093c7fbac38508cbe60c3e3f0cbace37b5030d3956165b

chainBlockhash (revealed): 2hmopyTV2vBP4yvCnHgU8zxN75biNTCLnASy4wa8zvgZ

chainSlot: 457880563

serverSeedHash: 0x26f1c5d87a21ef0ef0931269e49c0cadcae8dae1733ee4e4a4a03ec1fef1436c

clientSeed: 0xa40de022fc3f703d011f4a05d95d8eea3eb4624087719fe9874a9766eed4f048

serverSeed (revealed): 0x990c0b406c11ed1f5d1c21e32113d296b90dfc10b863fd10409b3f5995f7bb94

chainBlockhash (revealed): EAcZpEkwp7jYsgQYU2ZNtB1y52DdUGQ1aRFzYssoZnKZ

chainSlot: 457879175

Rapid Firecancelled

serverSeedHash: 0xd617ecf12a5f943494042c6cf8affa36c33d1fcca078af9e8346f46e71ce4419

clientSeed: 0xb03266a09a6a6d0aef7d8f254240d0ce88d3f307a00500f03f3ec45a9bdc595e

serverSeed (revealed): 0xca50e2027dbf2a64c7a34498cf9c18e9935a4848ff8e470068ae2363a4a594ca

chainBlockhash (revealed): EAcZpEkwp7jYsgQYU2ZNtB1y52DdUGQ1aRFzYssoZnKZ

chainSlot: 457879175

Rapid Firecancelled

serverSeedHash: 0x85e00f782c37f6f377496ab1976f28094736b84402b6cbfd52679628da7fc6ea

clientSeed: 0x51275d4258c2cc6612e7fe5ba4e7769777bcf5cefc23f3b04374cabc1bd88202

serverSeed (revealed): 0xe21c57f3c4bba9c7df259ef3c9b1bd25a3f2ba60c4e5da0e743bb6090be840f1

chainBlockhash (revealed): BBC4hNhf8Wt1V9xasvkxjQe9zmCVvFArVZsTWeKDfLke

chainSlot: 457877796

Rapid Firecancelled

serverSeedHash: 0x24676c029889b5bcae9e355d7a4378712c3b9f4823100411dba18b4dc8eded3c

clientSeed: 0xc8190133366d3a9d325aed313e672c8ffd78347d7cb3202e58ee63e943fd6a9f

serverSeed (revealed): 0x7755e97cd5b68bbcdff7320944fd29840469ea9759436d0a0f09a81f89c05332

chainBlockhash (revealed): CcXMhU3nFuiJWKbjBbtaqa6fvnmSq7KUPZk1FN65Lf7H

chainSlot: 457876408

Rapid Firecancelled

serverSeedHash: 0xd961a15aa10002c9185cd89d8015f09bc371c02e7956bf97b259e67bedcd64e5

clientSeed: 0xc2dc801a70057ec25982bc23f09de0fb5955c0d83eab152baa7400a9d7a31ee1

serverSeed (revealed): 0x6ca4212ca23fff0dc341990cd83c6295dd1e1691b2526c54c8fc829a82934590

chainBlockhash (revealed): EWfyimy5kuWhPjyMqM94AKGaXx7Mcgoc1tvgGZnXz1EP

chainSlot: 457875008

Rapid Firecancelled

serverSeedHash: 0xbb67b81150ef90ad0f87c9384da86ee95fd8773c7417e4718b4b51758283ec79

clientSeed: 0xb965077e1b288c189aec0c10d17b2b84437cc415e24ee1103c10f21f318617e9

serverSeed (revealed): 0xddab56946cfcd86571d529cc354498fc7ae8b43b09756631f07b30e3790a6009

chainBlockhash (revealed): EfUpy9425D24m9TSoQjjPhkEs6vW9SC7bzyrZmtqE8cA

chainSlot: 457873607

Rapid Firecancelled

serverSeedHash: 0xd33e7286a54ce2cd91f1c5cf56fdc6e092a7e7cdbef967a2d4e9863918b6af0b

clientSeed: 0xbbf17fc8a40f7e7af54d6050f03de57040add16c52f5c79434b95d9bba2699cf

serverSeed (revealed): 0xd1a4775526ecece334906ffbf0ffc95a1ac417008b60de987023f9cae78bc1dc

chainBlockhash (revealed): 7CVt7JCLPtNmW5HTrn5S5NEgSWcrt31epoNewR7Lmwf6

chainSlot: 457872238

Rapid Firecancelled

serverSeedHash: 0x03670ebbff4c4246a3ab271d6231ff14c1c8d8e2edadd3e33fe29357060e43a2

clientSeed: 0x6130411cd95586b6fc40af905583fb6259c1a0ddc6cef684f0bb89214d7ed373

serverSeed (revealed): 0x9730697c5df3366fbeeeaacf4b29115d7651dccfced3f368ea444b122a2e8136

chainBlockhash (revealed): BNqzSzoxEiHitNF4tiELZppFji7a6a61qoTJZyNsP9Js

chainSlot: 457870834

Rapid Firecancelled

serverSeedHash: 0x8a0e99479190615b3233219373252fb9cec3034a6d6de2b7afe1e8c1aad071ef

clientSeed: 0x8d90313a4ebd72ea992b5c8a3b1eb4a755295f52809926feb8855a292b3f9f14

serverSeed (revealed): 0x6730dc90e2363d4187275345f237ff9da6bc9f3a7a9e8ba12e656c982277877c

chainBlockhash (revealed): 8CyP5AVjPL7YnZCYbbXpRgcaWuYev6SrabjjJ96LMjuu

chainSlot: 457869462

Rapid Firecancelled

serverSeedHash: 0xc21c43e1defa223929f60f0fe29ed1ebdde5b1d8409f97af3df00583e8108b18

clientSeed: 0x112e11851285b6fba3389534042acbe5adb071d5f548ae1da8eaca1794424965

serverSeed (revealed): 0xc5da18b74bfde017d15a22c4d3afb7f89e470be7b0098521f87a4533defe348b

chainBlockhash (revealed): A5Ymut7mzaa8NgxpNoQYdg1Db7kjcPjSC3vPd7DZaaGx

chainSlot: 457868080

Verifier