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

clientSeed: 0xcbf7fb964ea6d6ce3d1caebd6b9c0f52fa506904fa9be070980995276158fdff

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x24d5e14176236ff7fcb2d4db69870149192d8369adf799313bff22ad8d10f7ef

clientSeed: 0xe7ee2dd6d3bc1b68ccb2f80429ab27cbe9d8c0870cb67e94d0f69f68444a4120

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x8a3fc52019c8886b9c1863afe09c8ac1d8151ef4ad7789a13062d1ce6a4fb708

clientSeed: 0x104763734b4dd810537ee7ddb29fa08a802df4afa9ff533c2db80b32bbf3fda8

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

clientSeed: 0xc9aeb9e956ebc7db20fb06519d3ea8d7f794f61ab6ce76afa66e7e61ea4f470b

serverSeed (revealed): 0xf0af9899f77bc46939a567a64490c2fba850523c6b50197f778b639dea0e66cc

chainBlockhash (revealed): 42SgNQQ5Q8WK6zXDkHN1wqGBFhCTduz82dL7pZZhhueK

chainSlot: 457766816

Rapid Firecancelled

serverSeedHash: 0x70e0dbf06e18e0271c1dc92622216fa5f247b1cde8088b103e9ae4f648a43f52

clientSeed: 0x526fd6fb9de7a5d3249caca1538597d4b62c1f0e0ae742a88310386f254260b4

serverSeed (revealed): 0x2a2989edf73536030ee056e466e8f2866bcbcd99b8b374cb07713635e3612452

chainBlockhash (revealed): 7pQ8baWNrggsjkHgSS3kbnWDVnKdCvb5VL9gN4SrQ5Kf

chainSlot: 457765444

Rapid Firecancelled

serverSeedHash: 0x9314e2d54f56ee4d18607722444f5f4d7cf54d4d83c8d930ab0065f9f6570781

clientSeed: 0x6b38aa218d497db72eef091a6ec101a9d7d882983ef14f64cd5db9913fb752b7

serverSeed (revealed): 0x3c3460973fa6b869746d51d954998f7a2260577bbdd837f23ab5d4de228097bb

chainBlockhash (revealed): HDKXVnmpd9JHxhCHX6C9cB5amNfSZAC3PNPbjPSkXXcF

chainSlot: 457764053

serverSeedHash: 0x9577c54dd639fe00a61365c2f0070d3718d159d72cbe94b6675704a7a51d32f4

clientSeed: 0xf12e999ddc0d6b452fd395c61c06135286b1ed5ba3cdd4e3d8e197cb128ca6a9

serverSeed (revealed): 0x7593400c2a55064d13665ec919cd41478221f790ff88a70221b40ea89dd23766

chainBlockhash (revealed): AwY8rL8neKqyUTc6u7as3oWK4ViSMvNDgNZX7tLybtGv

chainSlot: 457762649

Rapid Firecancelled

serverSeedHash: 0xe426a10ed9e59a868034747688fb21ac24335cf5e13565ca895d79a640b283b1

clientSeed: 0x0a4f16402624fcf0d02b79c594fd7ecdc10801da7e37999f001d3fb829022d0d

serverSeed (revealed): 0xd5c1c2a7af81b26c888364e0ebba5d43246904e45149950fe3382157b1ed95b9

chainBlockhash (revealed): B7JVBWoqQ77CtUySGKHihDKBQkDNc5mmTUK8Bpxv3utf

chainSlot: 457762650

Rapid Firecancelled

serverSeedHash: 0xf4120a1e766e08a2abf1c2bb346db9ef967ff240470237971db5b2b4731147c9

clientSeed: 0x4da2a45bf4dcffd4dd334928681dab8e9c3ddb39e030c270b35176a29d8b423f

serverSeed (revealed): 0x8e6e2ff5f7cb24736870c7474265e29e6450785e891a92d3cb2f0f371d97b5fc

chainBlockhash (revealed): PgEher9EpzhcDHXpMiMakfpcL1cFUKstJ7N79FNx1AJ

chainSlot: 457761260

Rapid Firecancelled

serverSeedHash: 0x247784c61c2c85f8adf6390820e20dcece1ff86bef05045a1b96555926faf63f

clientSeed: 0xc118e629ac399fde6c63c655ba2f2d5fcb504a313a0a5978ff5261598f9409ce

serverSeed (revealed): 0xb0d6d492353824a5af7b5a97694a5e84f2104955cfe51d2ae18b4fe70bfcf7ab

chainBlockhash (revealed): 2uSU6EyUvmq6Ta8xVuWzPWVmzUqtpwhZmAQdtAZNs9Pp

chainSlot: 457759918

Rapid Firecancelled

serverSeedHash: 0xc40c8e734e171ed2212e08af416f7757892842d49f52518bb9e1c10881b9f4ac

clientSeed: 0xef68b6861f4559a1ddcd703454f5e9010b1ab7a3c4dee8affd31081c737c38fd

serverSeed (revealed): 0xe1a0bc6119f4502f6443a7a70153f6b5273cccb0541d1da61e196a5dc1578a59

chainBlockhash (revealed): C4U2M4dfyoZ5h46Eif19L9ckhZARHc2ZYLbu7vneTw4a

chainSlot: 457758503

Rapid Firecancelled

serverSeedHash: 0xf4d90843768f0096211e34421bcc31b9538acc01a476d3bcb9282a77dfe904df

clientSeed: 0xb02489c4c98a3eb2625f41e338cecfa246191e0176272411e6fe11981dbd9b0f

serverSeed (revealed): 0x0b094cfb565af4b277d04f607db7c3ad432807bfd002b01397294df510205572

chainBlockhash (revealed): 9d9Vknhor2CVaCPnv4LPPKyetVTf1c1q1NhWer3WxbLx

chainSlot: 457757103

Rapid Firecancelled

serverSeedHash: 0x0d1a6a2b2fbe2cc20a4c919b760195afca08897a8e1abdbdf30dfcc219aab19b

clientSeed: 0xf05e8d1dd810a1e2f14a90167a3eccde62b7cf1a6dae5aaa3bcf3273f3276a24

serverSeed (revealed): 0x441a68307b1d5e730fba80904669fbc12f34f92dd9976eb6614d1cc2d0fd9483

chainBlockhash (revealed): 64hNoUcrMLj2qU4S4Qc5yQEiJuR5wURAGsthRbCRNCGz

chainSlot: 457755722

Rapid Firecancelled

serverSeedHash: 0x207579e05fda38f1b98f21f9940931e07799f9cc8c7801fefc7dabae1386f141

clientSeed: 0xe086974fd89b5470853dc3842c8bca3e56577717b947392c96686a03e603d27c

serverSeed (revealed): 0x93eb340fb0008f373376c5e3ebc434ebf8bcb5575cb56098ddbaf2e38a42d572

chainBlockhash (revealed): GrtgZDPZDC16zkKQCcW7qTsN1ET4x8aKysrWpGYjndPj

chainSlot: 457754342

Rapid Firecancelled

serverSeedHash: 0xc33b9f0bee1d8ef650e7bb0edf4590c78691858044925625a443267c625e5b5c

clientSeed: 0xb8c8332d08b5616c0490147064b45371d422143399f61ce507f2e26ba578c576

serverSeed (revealed): 0xf787a90d0005e8903de7e12396588a5452734073d236e86a22318bc1c8fb0a25

chainBlockhash (revealed): JD76oXAW4j5cLtrq62pq4eqg6xksetyfMxJ8roE1k71E

chainSlot: 457752951

Verifier