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

clientSeed: 0xb527dcfc073564f697c688a5457405f1f60a7c52cb0be0f53f0c41818ebed2cc

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x758af80fe75d21b32cca03fb7f5eff7eeaeb7a364dc4ea142a1a97568047b73b

clientSeed: 0x42b35d41269c152e85375867a88ba05567128fe766619589a03e3e8865a5b610

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

clientSeed: 0xc2b1391a48eb154165411b06f62148459627700302d4465a52474c372ce925ad

serverSeed (revealed): 0x9fc6e7a977b13d2f311a2d765c3d1c70421ea61ccfd732c530aa2572fe1084a3

chainBlockhash (revealed): 2BCC6xtfVVExowdWfoxVM6cBeUQm4um77RoyDQG8LfSL

chainSlot: 458390959

Rapid Firecancelled

serverSeedHash: 0xc44e2a15e27aa29eaf7986eee38be4bc78fc65140af19426d45a22b8b649020d

clientSeed: 0x23c5178b2cc8ec9f3f0c270917b9ec6a9b9dd9dfe890a029bb753e4cf69eca25

serverSeed (revealed): 0x3ba0081932679073602f4b537df587f4cc4ba235cf526a3e8e82c0c2128689e8

chainBlockhash (revealed): CsszLNKDBYN4vjjTTA92icj1aEgpL1zA8YNf276CsYVj

chainSlot: 458389572

Rapid Firecancelled

serverSeedHash: 0xe0cee7e074f557c63df188d2b92daa298fab23fb03cbe8c3a0a952024e8a48b6

clientSeed: 0x0267c496dc1d90aa29c60828a06e436374a660b4e3d689f0753abf317edc9d05

serverSeed (revealed): 0x01ad1f9bf5d85d0f9b945842f1207c8c7c6875595c13f09f0ca14452a1b17730

chainBlockhash (revealed): DtGyAWXdnYcGsTYETf8VmWMNcqPmQ8uXr1Chii73W4Fy

chainSlot: 458388176

Rapid Firecancelled

serverSeedHash: 0xd8e56faba294ec93518e3f7dd0f2a72e83e0055e12636c03fa9a78bac64c4607

clientSeed: 0xfdcb8a4f93db03eea9543206cee869d57efa19dbe447a53fedb66109cfa1b319

serverSeed (revealed): 0xf77503f8d0458c54043ac367c155e18edd463bc53ed11fda37fb25cc8bcbe22f

chainBlockhash (revealed): HSeU5SLJHTEgFDMjCgWXgTzFvJe27vDT2bnMVJm8RsMi

chainSlot: 458386789

Rapid Firecancelled

serverSeedHash: 0x0fc895073f936512606723a19b972241172ba250bf0b1ba12bb3d256e0a4a7a0

clientSeed: 0xc764d4ecb466007eda6f9e285e7a8090c70267c37d21c24d0c7afcee01a81dc3

serverSeed (revealed): 0x81a2ff49debe4ad223cb61478bf5a91de72b94cae8885bbd51ad7b020f8db10f

chainBlockhash (revealed): DesKYwVTdJwmp81GifVjBbS17sEbZx5pBqTtXYswWhgs

chainSlot: 458385391

Rapid Firecancelled

serverSeedHash: 0xc3bc42e8c43ad16788023d6ea91ca613f612c6a6073e3c5ca7467ce0b9ac4463

clientSeed: 0xfc82bd15aefcbec65cbc1324c9b49e9e19a710fde202974186b88382e35153a5

serverSeed (revealed): 0x37b3303e48b865075b2a37b6deeadcaff87078f5d6df8de17e55e9a8a6c25d9d

chainBlockhash (revealed): 77dLDQXHDMfDY6g97zEHYha6TWVv4BjCHLkyDcSC7dkg

chainSlot: 458384016

Rapid Firecancelled

serverSeedHash: 0xc68c804f2c0d05b10e355ea69dad9bb46562fd55a1c9687d5e7e78c4d70c444c

clientSeed: 0xc69798562a49297f4a6963aaca794358a156a25a79cde64f2e160f83826951ac

serverSeed (revealed): 0xefc4fba5561585fbdffc894b5df8bfa847091bfaa6b4d7e6b264bbcc27bc9158

chainBlockhash (revealed): Fm1bVgxwg9AGDNjbfPr8Jv3mjQts1nmHMEPBRM2gZZuv

chainSlot: 458382628

Rapid Firecancelled

serverSeedHash: 0x9d6e817299bc86679998ab57361b65f271d7218e50cbf2254221a136eb0a10b7

clientSeed: 0x6f3d8e4f1e37b9ecc7d49e7c580c23205841503b6e47a3b9fa0a8eb9b1c24c38

serverSeed (revealed): 0xc11dd55ab99356e62e918b5a9167f9ad81ef07db5b7cf9b3fda83744888ecb84

chainBlockhash (revealed): 8aPYYE6uMxec6vsM986NxMMkV19diXeHNTDdR23KH83t

chainSlot: 458381231

Rapid Firecancelled

serverSeedHash: 0x232065fddf022649e7b37232c5943a3b52d860c30b9b10f7f84f6fb9b1215d12

clientSeed: 0xaff61bb7375d9c3a8df78962e90e9813a3042136b076138382104ec51848570f

serverSeed (revealed): 0x0f004313b9caa95da6c0492097c5cdc77eea4ff975183af01f1d4bd80ede30b6

chainBlockhash (revealed): 3ccxsPUxa23pbPYh1BnUztwtNiSPLmt1f5K2mZNrWdFZ

chainSlot: 458379850

Rapid Firecancelled

serverSeedHash: 0x9b959a2f56a3a5d88075686885620f4c20cb593ef9541b942576e08d128ac9d7

clientSeed: 0x5a2cac286f8be3f25609587098fccc02e2b1136ec1775667846dcadc72074ddf

serverSeed (revealed): 0x3beabbc844988725a26fb4bafe6d1002fa3e07b04ee70938b88b26f81d15b684

chainBlockhash (revealed): 4yGpsVz3vgsV2zNbPmvGtDvtRQpU6zmbv1quJU8TbUCK

chainSlot: 458378452

Rapid Firecancelled

serverSeedHash: 0xedf45c0902057a05fdaaf33ffb605101538c927165bdd5201da8000b92c43a3f

clientSeed: 0x6618130ab6e4c7182767cd573be948a673f3bf8faa9be0c9758d5cbf5d0eb50c

serverSeed (revealed): 0xeda14b367f808b9b053a49477677f4de415ca55a10573ca92c154203b95516e2

chainBlockhash (revealed): 8SKv3jB51Wp1utNfkWjRHUgmKZVBhzSFvN4MaGBV15zH

chainSlot: 458377059

serverSeedHash: 0xf19029d823f49d75012be1f140aa4d5a57b02d7083b2c89bbae211eeada09f70

clientSeed: 0x2a695d46b7759970e38495afb64da46bcf78691dfc64ff3748b49163fc328cab

serverSeed (revealed): 0x307bbc93bb902262d5c7efc6ecb500eab8766add7c4693b7ee7969c666911721

chainBlockhash (revealed): 6MteDi9bQqhYNUGjNqEttchaj5MhE9Nn2htEbC5QS22e

chainSlot: 458377060

Verifier