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

clientSeed: 0x6640aea897404e871d5cc5cc5288b685fab8a4971e0a3545f0a7f20b5fa3ba9c

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x79ea2f6f47dc8e5446c23c0db947e184b584f8f20afb6af33672ef4ad1066811

clientSeed: 0xa03055369cf0acbe57839978270ca1a9d752a9c720615e8c5712972e2c8f2c8b

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xd141a9cdbb4df966a65cb0c74863245d48c910c0b171cf2afd18e7f0c1bc3214

clientSeed: 0x5131b2aa68e920aacc3e9368129b70d342ce7bc6b0dab05039d62e1b63f33b81

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x1de14308e3055e32d9036594b402fa7d4b23e064f19f926e2e66b8e23301aa1a

clientSeed: 0x19af35baedda7731037af3be6faf601530cecb36afc236f3791b09e792b82184

chain entropy: not yet, arrives with the draw

Rapid Firecancelled

serverSeedHash: 0xa111bf7f90ba719f60c6496694b9b4eaeadd32ce821bd45d216ba7930d2c1292

clientSeed: 0xab40f9b91730f38d7a93b18d6c4911bf0ed73db5c769726d17c3a1ad0b050b2a

serverSeed (revealed): 0x3ca376c990d3768386e021b0111f4cb3678d4c64ad90a682ce537d771baa3f84

chainBlockhash (revealed): FCdREMDg6rUaeC1kVGiHCgKsmykHHD56fRqTGbq3SodJ

chainSlot: 458097798

Rapid Firecancelled

serverSeedHash: 0x4fd6e831b084cc8cb6e93b4e1f7053367d424d913522bc9835762a209d0c9791

clientSeed: 0x4aab29bd69fb55c1c88391e5b01717941799ed1eea367f461fff0addd4cca967

serverSeed (revealed): 0x07c65fc636abc22ae2cd48a6cf397fb2497d571fbbc4c0e8634f93635142956c

chainBlockhash (revealed): HXMQyixEDBGg3XmfaAbUVx9F5Yx9T6zzbNfN2bRSeWgJ

chainSlot: 458096406

serverSeedHash: 0x102e4350fb9f1bcb91eeed23227858ce586e055edfb71089c99560d3cf384641

clientSeed: 0x17574f815e1c7e564f033885329c9bbd443219bfa5488396243d8c424ff566ab

serverSeed (revealed): 0xa3a8835663fed82395474cd42551e903e7d87889f7ae4152bf203216500f754f

chainBlockhash (revealed): DF53NG9shVwX5KGP6WHxeLw6yiZVyM5bjFVP974uizi6

chainSlot: 458095029

Rapid Firecancelled

serverSeedHash: 0x4d396329827bf623dd27476dfda0cab95ebd1b4c87a4f88aab6b38d59cf6852d

clientSeed: 0x56307c6c54a53b7e7059736d8369e6d3c186e9321de185f6e6486aa57a2c8c9b

serverSeed (revealed): 0x0297c5f0ab453529f9d119724c9c3a0f75612d63e02026f59c1a1760e268b217

chainBlockhash (revealed): 6rAgh2or6qVPzfEd6VwVzZHSZ1yb7wu3AB1nB273RbLz

chainSlot: 458095031

Rapid Firecancelled

serverSeedHash: 0x1975f176904bf7187f9f7907a0c1066245c27ac3c9fe08490b62eede5593503f

clientSeed: 0x576fa290f95b0b698b6aeb0b87e6b53027dff00b1033e708b474cf1f86f68cef

serverSeed (revealed): 0x1df46ef2d04cd58f33c6f549cfa8860222145fe8b0b7e32d5c159699d0b4fea1

chainBlockhash (revealed): HNyebXcYyvQQUTcFPrJYNkqWYAZU71c3Z6JdX146VvCq

chainSlot: 458093631

Rapid Firecancelled

serverSeedHash: 0x2b1fb419b003599eb5395062e3e2972192fd22dc31efce1e563247e093fc16e0

clientSeed: 0x8b9ac3ff499e68b40348856e07ca6095b10fc09a2e35ec51520ea5b056f50cb0

serverSeed (revealed): 0xcbb7f13c458c92f938ec8ffe9c506aa3bda464857ca45f9df8e3c3a50619c769

chainBlockhash (revealed): GpfC6RUgGrv3c31q49EHDQrx8fwYyLSk9XqNFcTRKami

chainSlot: 458092262

Rapid Firecancelled

serverSeedHash: 0x22ae3f4f417b6c6bc42da1f61d6b286e8d90fa049638c27884ea113a784a0259

clientSeed: 0x41291866e0ab606af531cf96623467801ffd8809467ee583154beac3f16bc2d9

serverSeed (revealed): 0x152d556b58a4cf038ff33d5b5646a621177a195424735b175d8a4978088454e7

chainBlockhash (revealed): 4ngnDYi3CyE15WpidhtbFQ62kLdwKMnYGThbP5Z4PbcT

chainSlot: 458090881

Rapid Firecancelled

serverSeedHash: 0x31bc001622949fe12b01d651dd4baeab4c513712fafdd02e2d99e637ef5e3be6

clientSeed: 0x79fb8cdf7ad9de08d1c2a22817540b5438459dd83a33bdb57eefff904a3fcff7

serverSeed (revealed): 0x88e9f3244b17878dfa18a40cc7ae116b5995f2c9b5c48cb77fb76db6ae62f1ab

chainBlockhash (revealed): DxkrHkaWEbCPcB33XpoBdsHjeuk64KfJuSgeCtLKUVjA

chainSlot: 458089511

Rapid Firecancelled

serverSeedHash: 0xe2469444f2d879c1a56eced8062ff104eeb6bcdecfb7771d68465fc835708ae8

clientSeed: 0xb02d367ea2432f0f7b4c67003efd8ef6baeb04c0969d7d8999835535e33fa409

serverSeed (revealed): 0x09d3c4a0c94083b774ef8dc9b9f92b6c7804201042577ce0669c5ecf9d2133a8

chainBlockhash (revealed): KRoSgYKyCDjSTQH3c6CQmcp8uz7Va4cRUtaYWt7Edb2

chainSlot: 458088145

Rapid Firecancelled

serverSeedHash: 0x91161aeae28e0224fe482a1b13774513240143bb8a0c3d0cf910509c4467da38

clientSeed: 0x14015dd1873b04778ed8ef156eba61073fbf5e7bffa807d71f940386afcdfb81

serverSeed (revealed): 0x0c418bc0e3075c18db21c9a3083316a92da590225ba4adbbff78f575103978aa

chainBlockhash (revealed): AuvgER9qHuBqPRp2gok4LzeNRvLUoULixyuLYzkBPbgg

chainSlot: 458086776

Rapid Firecancelled

serverSeedHash: 0x0f9ec6fba184fc035d11b734aad138b238aca1b188e77a7fc5cda5b1952daad2

clientSeed: 0x16c61e72412e3592c395308d765506515bb9f6fefac712060f58b8d032d03d17

serverSeed (revealed): 0x160269a5b6dea9f18dc27f052fea84f2498ecf81a4f4a600e77a79b8bdc50c1c

chainBlockhash (revealed): A7Bj8GPTKbxebociGkq23qgC98kysvExnRTxX6LH4qdy

chainSlot: 458085391

Rapid Firecancelled

serverSeedHash: 0x1ba7c8d904f07f18de818507d0d98b5868193a867f65aa522b600d4fb5ed0242

clientSeed: 0x37741ca09248b24c80d511a92c51879f5cc7bb6b3531b506094b9483af7bb2e4

serverSeed (revealed): 0x71330418483f3d522852d1b88225a1afaddb60c20d64712afb20d1c7e9bcc133

chainBlockhash (revealed): ifiPaKXid53fFGf443eCRFUJxQMikFsEPAP1DRTpzpV

chainSlot: 458084027

Verifier