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

clientSeed: 0x637d4929d934180049cef8c85dc025d469e8e7804bab766b3d7d6a02c15dcb94

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xa32ba74698f8cf87c8c3971a5f0c402934d59b5114bf67944501bc856da33632

clientSeed: 0x136587334e463662598c556ed71fe12492b13868b31b2dde4af97d4b413df5a4

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xd449f4dc8f4994cc7c58d5ee3451cc40a65f0076a822926c1139ddd40bea0bb3

clientSeed: 0x784fc8db8aa524dc91467d096b5b9c554b245854bd8a025f940d258928a9b57f

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x1de14308e3055e32d9036594b402fa7d4b23e064f19f926e2e66b8e23301aa1a

clientSeed: 0x19af35baedda7731037af3be6faf601530cecb36afc236f3791b09e792b82184

chain entropy: not yet, arrives with the draw

Rapid Firecancelled

serverSeedHash: 0x32fab88aa099c004d531e0353f1d8f43cbf412a51d62d41f3770ab7a830343c7

clientSeed: 0x2dafe971fbf4405582463b9fd5bc0aa62710e0c3a27d212d04fac720c16051b3

serverSeed (revealed): 0x70e1be66960c994500d6b6c9c75cce19cfae21e7b194ac9396c2c712cf2483b5

chainBlockhash (revealed): 2qvU3cntMQ915wTYgxVKifdM7N98uFASJPgcn61hUoBw

chainSlot: 458550080

Rapid Firecancelled

serverSeedHash: 0x66db044d8e1d9a30f678fe92c2209d084e299feab78c6d61562d94bcf04bcea6

clientSeed: 0x7cd6a923928e306a0babfd2db54c26c69de3b386b31877dbbb26ec2f247bef34

serverSeed (revealed): 0xc8183a9cded92af42ce735fa4478f546d2d4ea783e3cc7c9821979f529177a60

chainBlockhash (revealed): B3VDB9nWEn9yH6SHyqreq4arJ8naXF6g65fLEVaikSgj

chainSlot: 458548689

Rapid Firecancelled

serverSeedHash: 0xd24c8f16571a8dc16b2772beb0c0871fa6e1ebd552fde612a0c9973137f00c7d

clientSeed: 0xf6f198cd5da8426a80d0d30d398fb21e2a3814988b67734581d109cfea0e3d14

serverSeed (revealed): 0xe5a00848c597efcc2ea85d0b4629885e40aeb38545b19b5b59dcdaeba3a17dbf

chainBlockhash (revealed): 79RL8sbTyLFiAwy1rFHTocWGkE8GgkGr41RuE72raQ5n

chainSlot: 458547296

Rapid Firecancelled

serverSeedHash: 0xbc760e87d90d29c9918e30736889741a6d303d2b61b77f84f8c7c60506987e33

clientSeed: 0x23f839f4e59725df4c85272678a06cfc1c9b7f4ad5f11be4232054b3fd69ac76

serverSeed (revealed): 0x2a5f0ede879fc05d84503ae89e5b8ff91c636e5141b7b914b23940576c7701e1

chainBlockhash (revealed): 7NVcHAYGgTWmV9ckLEzVsZvigzZGxT5yEUtSfJmqdvos

chainSlot: 458545931

Rapid Firecancelled

serverSeedHash: 0xfba25005fc1e90db5f7839fb2afebb6b415b84f9755c0d2db9b4626f48ad9580

clientSeed: 0x925d5d8e78c30d829a49ca19700566a9a35de50463f622978cd1d6c301b7400d

serverSeed (revealed): 0x32de4df6de0590dfb5f16fca6ff87a66ae608daec5e9e2776561c8caaff03330

chainBlockhash (revealed): 9NWbMHeCeVLhLgUWjwYeDeEVKFgGQgqtTj4DZX5qYHHY

chainSlot: 458544551

serverSeedHash: 0x9a87772e537d71e189ecf9bf88502a1ae1c3f8bd9b9b229213bfe218603a7349

clientSeed: 0x89eb06161b1952c0d421833f28ba216332a3a6dfaca7631bc1e7a2a1a155fa38

serverSeed (revealed): 0x3d7e60086aeefeeb7ae990f1e976390654a835f371f55a7d37791cc0c587ab52

chainBlockhash (revealed): FPe93aat2Vw82Qod3V1E5pnzZe8zT91HzQbV2ee2h9gD

chainSlot: 458543157

Rapid Firecancelled

serverSeedHash: 0xce60ffe466a454db9ab1a0ec51a736e91d164bf1bedec38e4a39d947fff6e764

clientSeed: 0xf028b8ecc40857136d8429e190077cc64ba9d39a0b3e16bd7ea4064762f7b02f

serverSeed (revealed): 0xc497059848c001a8251c78d4ede36cc593583ffc96b112f522ab5e513958299b

chainBlockhash (revealed): 26DoxFVKnLj9Ps57vzYqTozbnrC4wCE8Tw4eDvtMDLVh

chainSlot: 458543159

Rapid Firecancelled

serverSeedHash: 0xcab5986745df2eb3a225c551c03c1781ff5ff3077dde03bc0df1455f86c0b88f

clientSeed: 0x52d3bcabb26c6051b7e3fe0b53ce007f83d8f0336c7ea3c35ad535fcc47fa903

serverSeed (revealed): 0xeb4dd12e376451eb96bb55c76b4e9ae6e6ebc93d9ffbd60e31802fa927278e3c

chainBlockhash (revealed): BTBGWTPJyVLHx4a9NGftmGp3DHLss7r1vy7xs7x533Qe

chainSlot: 458541776

Rapid Firecancelled

serverSeedHash: 0xc77f9c97abb4e3c3c3c8cadb18c376e5f5d89c5db1fddab5691b788e6bf8962b

clientSeed: 0xe5f38c0925c07fc670913d6629f0a312d66c697906f50c166a1a011a2f83b35f

serverSeed (revealed): 0x543c0d14a3fdb16f655dbf186b73e86c37682ddfb0f24876f1dc99643d28cbf1

chainBlockhash (revealed): 13K1Db1hApPjpeuJazfUDcWVHbXsGU2eTHrcdKMQrRo2

chainSlot: 458540403

Rapid Firecancelled

serverSeedHash: 0xb9b140d7a06a9d073255a7386135e162d39ad95cacab2fda4c58b6b99564a921

clientSeed: 0x2db797d4dfbde28c9a52a36382dd819a71a44b5bff50e581984ddaeae22486d1

serverSeed (revealed): 0xa4140fd0c5ad4d1a2ea30c6738e65265296326ac651bedbe43a07363a2f45bbd

chainBlockhash (revealed): 5xNH8p6KoNqZwmtzafzGthQJn6XPVeEYnGyTDsh97Spd

chainSlot: 458539027

Rapid Firecancelled

serverSeedHash: 0x62f6205303bf48404771e8c0c8306fc4e7a58b2348fa455cb46bf8555efb5321

clientSeed: 0x5656055a20bd65808ea46978ce76f6df2e5da87a5142f747ea1cc8369a240e9f

serverSeed (revealed): 0x890af8a935fccd00704e444196c14518122f304736cc1d1d5d35e928302791c8

chainBlockhash (revealed): EFUEoUusFcUZtpgThNodmGsyqCExbx9DrjxXofnqYNjF

chainSlot: 458537654

Rapid Firecancelled

serverSeedHash: 0x68afc0de41ebc496c818e98440fc12d5a40523e7086aaf46ef0a317bc0db81fe

clientSeed: 0x0435dd8ef8fe5d162f0db71d57d47b51286876d24791ae8f463c1d96437e1375

serverSeed (revealed): 0xd5ff8d8d626ea28d31a424bfdca4c79a17aea433c0a97e3dc61feb7261d6e927

chainBlockhash (revealed): H5d7ieYQ2gBZW3o5SKHCw2x2VCKbtQkZbiHZmhNDT5Um

chainSlot: 458536271

Verifier