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

clientSeed: 0x1112047972dba5dbef6fa103efce6f81e9764e49921af38d5e7292df2709b58f

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x81b43adb287e03f56236f7feb8e0ed6da460baee4260037871d21284413e776e

clientSeed: 0xc88dd9cfc5d2e98c9bf329ea4dd486c40a9da124a39813e27633eef09ab1cef8

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

clientSeed: 0x90f7f411b6effbaedba34de446993826173fc96eee7f971bda087210a297af98

serverSeed (revealed): 0x78ce6c08deb5764226166c181201279b372f0904d38b17010ada819b2a024574

chainBlockhash (revealed): 9G7C7HSETD7iroAZhMpjZYogQ9osjnevBMysDcssmLGm

chainSlot: 457543290

Rapid Firecancelled

serverSeedHash: 0x9fc755bc1f456601595c01a685d9640c92204ecaff1d7d0d5133c0ab4cd33dae

clientSeed: 0x9b717459dff5b4e00ddd85a17e35500ee65a933f6f099f49071420ba756907c2

serverSeed (revealed): 0x7e13deb522add30ae0d18217f2bc788fe4be5c3ad54f89d3eb6e1db8928239f5

chainBlockhash (revealed): BM7LzJ1WJSf7DGRAWUuXfQu1ujHeQpmKvz5G341mF8gs

chainSlot: 457541898

Rapid Firecancelled

serverSeedHash: 0x4ea59b3eb60c14a1bbe322140c1350c1a28128facd19fab9e8cd4d9289cbab77

clientSeed: 0x4dc2f9f3ac9a546715993b7c90c61f4df69bb6f5ae9e1f83eb8e8593284913e4

serverSeed (revealed): 0x28a059b2f9bfee4a6a49eef21df29bc0e8af6b86169e460a479e59b56a30fb63

chainBlockhash (revealed): CMSFLRBP2uPBVNBRz1UL7fSocog6pXhCkxH2mvZvY1nV

chainSlot: 457540499

Rapid Firecancelled

serverSeedHash: 0x07c0ff829486d828fe9f3da85f10db68e21f1b8c447f17ed7fcc261812726b49

clientSeed: 0x4c725c91580781fa9f1ee954cb17026a00c9b1f09be941aee33fab73696da078

serverSeed (revealed): 0xa3a562f8971e68fcf258c4f261179a9df446dee9710265195b62f0bc32270f46

chainBlockhash (revealed): DQjvLZbSxooUHEENi9A4LxBzki3Bgjuz8himsA2S48Hh

chainSlot: 457539114

Rapid Firecancelled

serverSeedHash: 0xff5c82a8e06e21f007e79e2cbcc3b2708597db1148a5d332529a2d10d8b0c57f

clientSeed: 0x2d84dbcc786f6d39f1f91a8fc98961c04bff2b6f15dd31bcb21382bc6cec2cf5

serverSeed (revealed): 0x85128b8663d72e0a9eedbe34c34a09b20a8cb094397fee7d6636add65ed341c0

chainBlockhash (revealed): 7YZ2Hzqhpf3Ke6F1UfvJPxt9QuBQmRaoeKKardvYHu1B

chainSlot: 457537714

Rapid Firecancelled

serverSeedHash: 0x92b13e9b04f8fe3d00d6213e20a6d82a9f9f905b5ab506415b2c60169c84edcf

clientSeed: 0xf89f2fa2c9d24874a3d2fb749dd6ae7fd52f9f0a1c889fd68e1bb542f311a738

serverSeed (revealed): 0xdfbb6ba13440d2c84b64099fd34b667e9e35a1162f9c6ce7311c3bd6dc5dda16

chainBlockhash (revealed): 6294cYC6tHQg8yn3ANotgPcTXA6KSSGx5hProGzv2H6B

chainSlot: 457536330

Rapid Firecancelled

serverSeedHash: 0x6fc3477572511869691383580c37a519bab36d7e291f72461f6cd1c8ead12ac0

clientSeed: 0x352c5e7655951aaa3621f50016c7bc27258444efbaf2e78702b1248a98beafc1

serverSeed (revealed): 0xb20bbc8e00b1a95e9a83a162fa12426fad4a1b9b063c7f8a37bd08be85e88978

chainBlockhash (revealed): 6SD6BHiZUj8r7NXzBMcPjQuM9xcC6vLELpSED3RAxet8

chainSlot: 457534915

Rapid Firecancelled

serverSeedHash: 0xb3652fbb3eb01a178158ea4eceac7b42722d5dddbbdcfc969f47de4c61977fca

clientSeed: 0xb327eb25a6ca70322d202f6f717085ddb3fb000bc56be3ce602051c2689b1bb3

serverSeed (revealed): 0x3b43d6a543826156e71243601250efab2d11933c74b13e84a6984f5ea7487e8d

chainBlockhash (revealed): GYvszjdntaiCwk57QV6gkXaWDBhdfhXabmH91fFZABdx

chainSlot: 457533522

Rapid Firecancelled

serverSeedHash: 0xdf12ff71fc3a864799749bf629bed37a68ea2058598d39e66b7747a1fa243335

clientSeed: 0xf6ca80533cfa53af0d380aa011ecf4c0dcd4238434a9771ba8474cacd7d7055d

serverSeed (revealed): 0x1331e9b6b30aca402869f1b816b074df2ce0f76dea63ba4c75467eacd956ce62

chainBlockhash (revealed): 2L8KBZrCED2ZQMtXGz3rvvLnwgceZcKNbzsQXV98UBj4

chainSlot: 457532133

Rapid Firecancelled

serverSeedHash: 0x1b390d16ba3b13ae9f3235cbbff97850664058af233085195d6233495570f7bb

clientSeed: 0x92c29d4a876a9f8da5f013d7c5c3bd8fa7e5f3d7266a2d4c598730f039b75142

serverSeed (revealed): 0xccb5fb5458726e179e15719357a1b8c1d50587b7a717f24edaa214f781c70958

chainBlockhash (revealed): E9cwtBQgByYYPX8j28rMVQGpZ1s3uQmQJVsZt6kay6eF

chainSlot: 457530734

serverSeedHash: 0xae3acf5452025039062ae4216fe9a6e8e91cdd04cb2acc1e2522a255391c8736

clientSeed: 0x83662ebb635e24f73c0ca56760d385448ab993cdb793d4fe0eac34dfa9960391

serverSeed (revealed): 0xf6539b419ff5e37190a179a977dd39d45a5aad5d0b961dbefbd91ae85ecf2c94

chainBlockhash (revealed): DU4dnwCUYvuF5VtZ6euRfSN7fXNCZhHQjHXizFfdorXJ

chainSlot: 457529340

Rapid Firecancelled

serverSeedHash: 0xe0073dfa11c5938471eec60d497f148b8f6bc4127ee8e8ae145f2a957f07cb38

clientSeed: 0x94538d7480c2c069471ba9901ae76c383e8fc98b3b94c8a285beafa9c77c5a1b

serverSeed (revealed): 0x97e7532b25b2ffa07f910cbdd1c132a58510e5377f9804ca6177178e2bfd80f9

chainBlockhash (revealed): DU4dnwCUYvuF5VtZ6euRfSN7fXNCZhHQjHXizFfdorXJ

chainSlot: 457529340

Verifier