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

clientSeed: 0xb18afa469ac7755979913e1ea26c351f8ea0db99ba64fc7335cfc8f343897a43

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x71f502bb32569cba6c909d4d97eade6bed7a6182307c9349a636e2705920ded4

clientSeed: 0x77c3cdae831d602b70e58033be6ef1d301ac9d9d912e031cbeceb3544d272c42

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: 0x6026a109b6623db2fb94127648abe670ee91a4b696730757a169e703194f813d

clientSeed: 0x3915f6922fb420113b75ddb75df45008ec0ac7ad22e8d2391ac02ccd110850ad

serverSeed (revealed): 0x7916343706673d934776b7d0eddaf812d90bd54c6088629931ab9f847a978273

chainBlockhash (revealed): JAF3uNx46VjLTLSReaHjjMHPNcXzvRzSVj5NBF2Zcvj5

chainSlot: 458008008

Rapid Firecancelled

serverSeedHash: 0xd1cf1021388d91feab58238b6583009dfeca20e79f1618a5b6806145196ee186

clientSeed: 0x7f4f714111917bd59cfe3ec41e1b0e5b9ed0c820e8aba67159d46d8af9214c7f

serverSeed (revealed): 0x730f60ebbebdfeeee20c49395891b6e9264654c4c418dc4109da067786850dfe

chainBlockhash (revealed): 7hx3r5teabEWfPo1F46xAFqEkdrwxgJaWFgg3FUJTL12

chainSlot: 458006633

Rapid Firecancelled

serverSeedHash: 0x51055b622a23c7746cbb803c9679c4a7352b107ab76243afb822bb217a16ba3f

clientSeed: 0x6f50168008396f72177fe3d9f6d550901c63a7b5a6ea6faf181829d61b380e12

serverSeed (revealed): 0xa7d2bb7a32ef86d1c2886ecd1f1d1670bbea79bb107d71ff2eb02bc558126929

chainBlockhash (revealed): BqCsYkJYuwrpku2kJ7nFynvx9oJdJKCvicqXNU6CfiDb

chainSlot: 458005252

Rapid Firecancelled

serverSeedHash: 0x62f9a864779ccd1ef0b01e78d4df150f7d0d397b60022cf5c32210a0e3401392

clientSeed: 0x37eef34d10ae145f9790a7be0047c0a3f2cc27acfcfda3efb751c6df5675c045

serverSeed (revealed): 0x55bc0c64ec4b5d569ab384def3238a6b00544cc02ccd2ab502baf368b6a6f698

chainBlockhash (revealed): J68a9icZJnBMjnjyAGghET5TPVQeSnPgmFKPNbFNRJgj

chainSlot: 458003849

Rapid Firecancelled

serverSeedHash: 0x83cc31670f45d681da9e985b31f56471f9379b021e8b6039ec159ee98d5c3a81

clientSeed: 0x7ceadf292e2ce61cc79b8acb49481c2060a044fcf758b97cedd0f6ee6283bb30

serverSeed (revealed): 0x179cc028bc1885465e3057993c697f0d3d4dfcd4f04b7dd4d9a9604894387ba8

chainBlockhash (revealed): CYgYx6RcJSUHJrGnAy1Zict57NsD21LFgRbCZpKR4jPi

chainSlot: 458002462

Rapid Firecancelled

serverSeedHash: 0x98c67d6b41cf200adc409e0a5fdbda2b81c1fb452f9fd7456b8f826869e56493

clientSeed: 0xb3012e86f22e54a9e3fe88854659d2f955556d36693f109ef9dd02a9b791b20f

serverSeed (revealed): 0x8a98d1297f41cac55be424ac09470560a276813ccd88dce88a8f50cbe50c7b38

chainBlockhash (revealed): mtfxioXgndc9aJid31d1nwtbtkEPYn518uF21r9bCj9

chainSlot: 458001075

Rapid Firecancelled

serverSeedHash: 0xfe3cd94418fcf5c2d36555f94bc378b27e8a769cc0d428ec0b23c887b7cec60c

clientSeed: 0x07a52a7173c541a5ffe900f1064921ba2b3cc0ef5089dbddc8d9f31a11a1a6df

serverSeed (revealed): 0xc88df8a12220d0d8f608426752802a7024396ff81ef7e28656dfe3d2dacd140a

chainBlockhash (revealed): HHqjvA38GCXCyL5mbfdotw2mbNxkhRLTL6FhJAwWGjjM

chainSlot: 457999688

Rapid Firecancelled

serverSeedHash: 0x8ed245faac2301550884edf2af80a6eb9fc83474fe63b02a4cffbd7724faa14d

clientSeed: 0x75c9300703e0bacf5040d4616fc450230644bd40d97d5527bae53d782309d66d

serverSeed (revealed): 0xf7d476f79f372d2899d39f42b41ad255949ec370ce0074a6078830dcef02c410

chainBlockhash (revealed): oH1kfCcSN8uWbBiWz4LaVkZKHzggLQjesAH4ESxjQTm

chainSlot: 457998302

Rapid Firecancelled

serverSeedHash: 0xa57b3fa63074b47420b9d7151743e40c460e8be2b3fb4fac0f74fd50c22e70e9

clientSeed: 0xb8974bef0d3c6d79c31601533b7288c5b1b13f2a8d1ee898c200e2ded4afd2ca

serverSeed (revealed): 0xd7c9dd8b87b672956bdfbc15eab04bb3861eb9839c3377a254526dcabcf79414

chainBlockhash (revealed): DV5rvnCrFaMp4BNpV5RdecJN75C4FWD7fNtM6g1QtZA4

chainSlot: 457996927

Rapid Firecancelled

serverSeedHash: 0x095a80f2e9230e204b3376272b000932d128b1e27ba6aea4bd61f73743fc71ad

clientSeed: 0xc368609772787587448d93dee182a2e34dbeefc924f5e312ade8e5a9e8f9d6f6

serverSeed (revealed): 0x1f46b37bb6debcc316e3aa60de0f81ba8da64f9661c1cff32bcb046d319c46c4

chainBlockhash (revealed): AnDp4uvU9B2vcYrbXL9MnJXoXVContc8k98sT44yozw2

chainSlot: 457995552

serverSeedHash: 0xa8b32724de44b23f6f0b4fef0790df45a228304e268f63057adde4444c8d8fb2

clientSeed: 0x5301815281079302d18d8a1defacac9b4fd9f00b6928e87373e580ae8a9cd144

serverSeed (revealed): 0x7407d729bd6d2b62bd82f7e0fc2cadbb449b3ed3e6815d5c568381acef47a539

chainBlockhash (revealed): AnDp4uvU9B2vcYrbXL9MnJXoXVContc8k98sT44yozw2

chainSlot: 457995552

Rapid Firecancelled

serverSeedHash: 0x3771d90755ca610df411e98d6c194f547c5899ab0b7184e4ae446eecc4f2028d

clientSeed: 0xb5e88039f72c630c3df1deb92d7b1a9d80759f92b86727e7a990f8842b39c575

serverSeed (revealed): 0xd9344016d6e170efe3e65202e74c022d4a4ff8c9c64d20ce12ab3faf2e9dc603

chainBlockhash (revealed): C3XgxptpEKGKS1sgLsfmkgQwoGcouphhuyK9UTr1awxg

chainSlot: 457994168

Verifier