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

clientSeed: 0x321ffd1d8a444d5ac70ab54813b764fed68f0a48e292db3153340542312fd92d

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x0ddbd914a6c4ac982c32c12de079b96554e7ed93ca466203ec2d8b749caa0674

clientSeed: 0x8a1bbefe967cdab60af77a509fbf0ee753c3c753ff9bc3e5f4bbb81d7f7c66e4

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

clientSeed: 0x78b3ae21d03ebe0852d8f8f5305c865af847d6a228355ab3b2c36c304018e4d4

serverSeed (revealed): 0xc26943e9f80f1a549c623c03382b15b93c05b8c7cdbf5c7fed07da08d42712a9

chainBlockhash (revealed): 2JjZZtkgXHnsWUKz366CHrVtTWwGCX7inLGhLBFZBFqS

chainSlot: 457501555

Rapid Firecancelled

serverSeedHash: 0x7e941666f19455dd1ac7fc83497494042fc3cd6423311330dfd15d34dc66508c

clientSeed: 0x2d887a81803045ee44229e4f74b75fa0c82fc66e15c705f28c93acc2fa1312d4

serverSeed (revealed): 0x9636fe7010fb7fe4742876274c9b35e7eaf0396854824e439105220c1e00856a

chainBlockhash (revealed): BXHmLmZfC9cmRySB1BxY2uAyytYji4cT6Sf17WtFx7jw

chainSlot: 457500169

Rapid Firecancelled

serverSeedHash: 0x9f0dd0da8ebafbb4d1f05d7675c8255952f87f8316f2ad92b5a56885f6d7e917

clientSeed: 0x832c2a07b3647276cf43958c5df78db85cd56a7278c2002ef4bab81381e3e8e8

serverSeed (revealed): 0x6568bfa780b523c08163dc726ed170df6eee4a844fab4808b3b9cb425c789b33

chainBlockhash (revealed): 2xaBjWJ5KbFa7VRk4WycH2GMHQvgwsYPMAM3ye6TZHWE

chainSlot: 457498767

Rapid Firecancelled

serverSeedHash: 0x3f31e96a96ff748eba7572167f848c7f1156088e173d97e8dfb9b92a07b230ea

clientSeed: 0x79f835c83f0807210d9d49304c273800a6bd71614be642d51273774cd29963e6

serverSeed (revealed): 0x57eed8c636787e877fcabcbc1bbc8a710d6fa9884d2feb6e59660c43c0f2a81d

chainBlockhash (revealed): HKVW2dzxHb53dzduPf2TJBvt1Nyu8yFAtXLQwTP84nrW

chainSlot: 457497379

Rapid Firecancelled

serverSeedHash: 0xf74b14804f1989a333c8088e3de921b6a5ead179bd704554465d4422ebfb279b

clientSeed: 0xe47e758dab902e92175a2abb0830d2e965f6c1fd7e98164b2c85a84a1df9dd56

serverSeed (revealed): 0xca873d665fd197f5fd4570f396716a4d5e4d4fc10cb1b0dc26f1cd0d3482e937

chainBlockhash (revealed): 3Nvt4xjWHXVRUpwbEHiPhqavxwaQjrtrm3JqjPXp5tTK

chainSlot: 457495993

serverSeedHash: 0x097cd5122ddce5afeec6d5b82c78b9ecfd4d4ff9daea0f44187c223d61f54a2d

clientSeed: 0x68b1d0d02f2382247cc3e18980fa40ceb9eeb6d1b50b25616950f3b6cfa42c0d

serverSeed (revealed): 0x46a60b497a170b2bbc0a112b4e2f3a412e0f1e39925d4980ab35b407c5fc04c2

chainBlockhash (revealed): 9mmCPxb5r4pKJtJ5rUoCqCZ4RRdbdvqA2Rbad4hHTXjA

chainSlot: 457495992

Rapid Firecancelled

serverSeedHash: 0x5ba078d9ec93e481e21c79f8d0e824f60b2b590da6a668c45e574edff0e3ebe1

clientSeed: 0x0b73d8be43e791406b708803dde0064ba3599285f992841868741c210e7a0789

serverSeed (revealed): 0x88fbe5fbbc7ab21ea9326a6e604e26c559f2be0a1464686305ebdcb927f6507a

chainBlockhash (revealed): FvYcLWmcQHjJVVBJToXtxZyDUzNqWtYuXfxyXKFaHMsD

chainSlot: 457494610

Rapid Firecancelled

serverSeedHash: 0x6a0e79236bddf201ebd43329def6b24b13305b5a9155a4f6a50068d9e4bf9936

clientSeed: 0x8f9f5aee7a11507ac9a03e6f3a63813176d334bd16b1b8a598fbd24bd075126b

serverSeed (revealed): 0x4f55628b8fd43d5764f6e0b73568d61786524417769e2628250c2352a1d932f6

chainBlockhash (revealed): 6uNM8j4Fij8mbk1i6zwDzPgzudmEXftHwmtwFVaiGZa6

chainSlot: 457493211

Rapid Firecancelled

serverSeedHash: 0xc6b8bcd9741e7a11589b1386d55b3b62366f19db498ae58722dc356c0559e6bb

clientSeed: 0x23e7d2e63e98fd2a1ca2a57f5e55621ef9447c75e4470b524b14e0624cb6f093

serverSeed (revealed): 0x4a5952d386f6b41d8b8972e5cf453835b89042ff281712a7982cf556ce9f8f5f

chainBlockhash (revealed): 9feRe8J8gYikGgzP46e9qo6wNJ9U5d4fFaBeHezxRZKr

chainSlot: 457491821

Rapid Firecancelled

serverSeedHash: 0x9dc236893d8dc89392996b01271ccc959496c0d9111c667cfb14f508863ba5c3

clientSeed: 0x3cdc3f39c61c17640d25b85cde7754fe55ff58fcdfccee6b45578e42a7983271

serverSeed (revealed): 0x41c5cea46b0b025b988f116976fa38ce0d6fac7e45f0852276bc7df31de3b5c6

chainBlockhash (revealed): DEKDAtyiAwspLJRpnzSfBqjvWVdN7G3S6nxfr1Q2J9bZ

chainSlot: 457490435

Rapid Firecancelled

serverSeedHash: 0x2ddc90121f6277ab4e2c55841c0e81cba97dc5d9ca72211d482d7de5efae1434

clientSeed: 0xf83e7fc3dac00f877e4df309de7cfeefafab9e3b6ef7405f6651afd08dc86ab2

serverSeed (revealed): 0x77c5a7190f38e70af3f82ce2d68a142c159442942e7cde6edd7aea8ac64e5175

chainBlockhash (revealed): Ewst2km2xw5FHY8zN4hHXeb9o3KvojXeYHRBis4Xm1rx

chainSlot: 457489042

Rapid Firecancelled

serverSeedHash: 0xf72137fc2801eeaa3caeb9623443ab7d6e579c3c8165aaee5e721b24ae519ceb

clientSeed: 0xa3a037f056e70e57fe6ee93f7e1c46f407c817a7c934704971064b4ed7f1b74b

serverSeed (revealed): 0xb0e9814f4d3f7891cc5641253e3784fa28dba90dc8f6e56f46f2b228a4497ab8

chainBlockhash (revealed): 9FJhdvPKqqqsSRnyDiW7e2FAU3RfTdM5YHDE2nDhcRk1

chainSlot: 457487658

Verifier