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

clientSeed: 0x731e398b308ef52699a5afa797a004b07a7bf150edd846feb9453d51818a8cdb

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x2814cec4f0e60f780dcbf2f8394bbdbb70f9af5346aac7844db9be071a9dbdbe

clientSeed: 0x006114206387934e145fe304a00e9389100aac8d05f4dc55911af6589070dd1b

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

clientSeed: 0x0d1c7c074b8aafc3401b9c87ddc6ca81da6df4ad5ceba0b80cb06df94859c4ff

serverSeed (revealed): 0x613248a8194ab9e81793b952f81be3e22781ba34228ebeadee7d767ebdfdb924

chainBlockhash (revealed): D35xSEDVv9xG3zAJ9cqbisXpWkFgucNvXH7Zac21N353

chainSlot: 457397564

Rapid Firecancelled

serverSeedHash: 0xd3189d1e9545f37cb5d5d9f1de37feb4c2b9b0db21765795ec705fb581880726

clientSeed: 0x780b7c3d63dc3d0d5656b9aaaae71a5976ada95682fe53eaa21c2de46938053c

serverSeed (revealed): 0x7da68217444eb309d6a7ae5cdc194be294375738eebe13be56ecaf4c52f1a3d6

chainBlockhash (revealed): 5JFHkikr7JKZxEy2yMJtCJgckuUtWAQiBWiKRGHPV59m

chainSlot: 457396180

serverSeedHash: 0xf828130cbd6a2ade3f6f23833bf9f72099f4ca8606f87b1b2567869029f80d81

clientSeed: 0x07bde86bb837558370e8f725bfa20b071257201ff3d95a907728c4e3f3e30598

serverSeed (revealed): 0x4aa828c16ee286d8d5a55c915720c11ffacf6ef905c45832c205ecc0a25471bd

chainBlockhash (revealed): vpE57XjQa8DCVX6wE5mijCZWPYJgPQNSC7U3PCZbGUj

chainSlot: 457396177

Rapid Firecancelled

serverSeedHash: 0x0c808af1996fff9a0636a02f9ee9e74f03af1373d6c73d21548223cd1b8ad569

clientSeed: 0xcd3c9103823213d983c4763de0638ed579a3c253a2051876730355c8cd736251

serverSeed (revealed): 0x45eaee31a5f96475b2ab14840f36922c423cbe3f39e92c79b13518797f7620ee

chainBlockhash (revealed): Gsyb3gk5Cnp6trz1WEp2TzPV4rwVrJfMftzXE9aL3BEJ

chainSlot: 457394798

Rapid Firecancelled

serverSeedHash: 0x60ce30471deb7b68d69940c7842242d1e8ce1ac639d85d868d54d00b46f9d125

clientSeed: 0xcc57289139b0c212a2cd2a2bdacd0044b59c776fb5eff1747426da9d6296cf1d

serverSeed (revealed): 0x7874a523bf0e8793b01e5b729c6495ff8d257e0cf0e51c22a76b9975f0f70ed6

chainBlockhash (revealed): 3YSakP6MZVn9PHrKvx8jW6dVHViYm9wT7AX4GWDjL2va

chainSlot: 457393423

Rapid Firecancelled

serverSeedHash: 0x0d8e7a35d2fd38982441961bec3224a01cb32b0efc130e0cf33623b9b1d037a1

clientSeed: 0x4188a919f5e21c77766da51947de77c1fa805be0eb9d78f7054e9e959818e835

serverSeed (revealed): 0x9fc6a6dd950c11d342939761248feb7fb63a2d654233f2a0245b42bf47969152

chainBlockhash (revealed): 6t7iicpvbSKSyZ1tpS3MadfFv73NK7aPrCnxqQL9WX6D

chainSlot: 457392035

Rapid Firecancelled

serverSeedHash: 0x332d0f3a4e07b4abb8326cc4be63a5dbe68b523c91cbc76e014e04c4c994330a

clientSeed: 0x1bcfdd3c27c3624f1417b67f5ad549bbd00986fb141da8050fee46e589e98b64

serverSeed (revealed): 0xb2dcb126b299514887d9e56c71b9f01bf58cc1d8aeffdcbf7a95c885c50062a5

chainBlockhash (revealed): 3q1At5bGY2UWZ6YH7WJUX2NYfaVSRvtqvu5xkg71YtP3

chainSlot: 457390653

Rapid Firecancelled

serverSeedHash: 0x0b71fe9df2c8a5c0a1bc505a71d363e4b04ff09fb06e30f03c4405dd2d3213df

clientSeed: 0x2fd5239b7de4d7f5fa9fb69cce97608b6f85fd009e2a962993733ed4d92b80ca

serverSeed (revealed): 0x29770967c25f9ed943a2caacf33e8522a47c23367ae0578f9854adccac951333

chainBlockhash (revealed): Gr53uVzSnpYe93DnZWzpLqnEPRb63cj1vsercmfaJLGQ

chainSlot: 457389266

Rapid Firecancelled

serverSeedHash: 0x641cf0eac5b2cc1c0e5230de6f0ddc387922c29614f8c030d6c48c35ffe8571c

clientSeed: 0xcad0d310c15253c28c1e1a6181cb14ed6a53f7752b6102a0264b6c8ade989b1b

serverSeed (revealed): 0xb43c815d18ef9fb07a14cacb26200fd839c576cf7e8c3bb20fa7a99bc270ef4b

chainBlockhash (revealed): 4Tc5JBp7uboTfKeJGY9J1TUS1vm6a15oNPuostBxq6hJ

chainSlot: 457387864

Rapid Firecancelled

serverSeedHash: 0xbf3d0cf2692c6ceb08b7c189a1110eaa216b6a9199f1907f6c17e9a8ae3d95e7

clientSeed: 0x6825c10f95a6194037bda4ec16f844134323104558a6e3807a4025fa05255a1b

serverSeed (revealed): 0x51511230bd6dcc0c2c858914edbac9fcbc520da5dd0b97b1d530389befc35719

chainBlockhash (revealed): 3EEqg6Z1V5oW7mjbg82zBHxZXrCFvdgVgF1KciaUKWQT

chainSlot: 457386478

Rapid Firecancelled

serverSeedHash: 0x81aa9edd12ac93fc50b822055bd787d35816e2503c64e77f3f625dad14617dbf

clientSeed: 0x38a8fe9b0b24a1f167de27c4c322119cdfb8b561ee02da7248fb4a7877ab30b4

serverSeed (revealed): 0x2ca2d4d08f1ca542bf52f794f7148d256edc1aa60de88eec242705801606a8ed

chainBlockhash (revealed): Dr49n93acYPUqRYonWYwJmAuHGgodMuAKarn5mUTVMZt

chainSlot: 457385083

Rapid Firecancelled

serverSeedHash: 0xb538c00b3d4749afeca3bc0c77d3f523f8f4daef0727173697574887020bde65

clientSeed: 0xf8eba2bff2843f005e0d85bc1215bc5fe449e6ce97fa3c5c48f04b082909284b

serverSeed (revealed): 0xd2e35c49083fa3f7575cbab47a480c0e0b837ce5c83ca277b1cb6ad50746ad98

chainBlockhash (revealed): CKsxyGAghb2LTCmS6zFD3ZGxoK9jV2EasCQjM89ENPd8

chainSlot: 457383699

Verifier