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

clientSeed: 0x0435dd8ef8fe5d162f0db71d57d47b51286876d24791ae8f463c1d96437e1375

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x9a87772e537d71e189ecf9bf88502a1ae1c3f8bd9b9b229213bfe218603a7349

clientSeed: 0x89eb06161b1952c0d421833f28ba216332a3a6dfaca7631bc1e7a2a1a155fa38

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

clientSeed: 0x39ec5219a7e87708dda5062669fc817b5554319b81f4fb16b0c7796dcfae597a

serverSeed (revealed): 0x429d8bb148ffe388bfd5273ba9d803e03d01a0b605ce0e927484675034c4d78b

chainBlockhash (revealed): 2aYu2ffZ15c1Edj5hchAri1LAkyaV47e6yB8Eeaoisyi

chainSlot: 458534891

Rapid Firecancelled

serverSeedHash: 0xc708eac23174971f9da1a6f389a642e2a0180cf6b656b489abb6d1f112dacdfc

clientSeed: 0x37e40788f85f4ed6956bdeec0d9c5fabc7433e89b44f10a9b2483857b1653fe6

serverSeed (revealed): 0x5e7308c4531bb877e9eaa6b5c1c67d15481e3540e8b7d5a6a7480f68f008ac7c

chainBlockhash (revealed): 2yc7kpEBuAwj98wPhG4t9govhQbBLmXiFps4FeVU7gQb

chainSlot: 458533512

Rapid Firecancelled

serverSeedHash: 0x6fb7f850d8896754728a3fee3f2c33c14f5724dd2d3a5d6e8663c3aa951925f8

clientSeed: 0x31968ab57e5cc4994f749c2a614cefb21c0019345ca27163a2fddeb16e281723

serverSeed (revealed): 0xcebe0604b6d9f583000a56b4cd8efa0d7fe2073b06d220e4b39125878b9c80b0

chainBlockhash (revealed): DiuqCLjLcAbbd5L4a26QcHNy6BBJtaLhcjAMyQvhCaL3

chainSlot: 458532128

Rapid Firecancelled

serverSeedHash: 0x92d39b263fed2bcf9dbfbf9458b620b98a0e2a730c602146335499ad776d82d4

clientSeed: 0x5195d79776829c0fb0a3e9eb61039ef09e05d97526441bdb72f98bb53b315d12

serverSeed (revealed): 0xea9bb4adb2614af460bd71af2ceb2033788e0ee6fd3768ce7cbc37d1689ed0e3

chainBlockhash (revealed): B9vSDAwKYrF58stQb84ujeYvXcJYs4dHLnm8ZudeegS7

chainSlot: 458530750

Rapid Firecancelled

serverSeedHash: 0x794bcc4cc4e1b009006eb906a5768229e9b29d5db0603a847bcaf9323879a03b

clientSeed: 0x7af963afb2da09178277b726b671dafab63542f38ee6b494c5b6c690f022acb2

serverSeed (revealed): 0xbb27077a63bb0aa12a9ad50e9d126e406d27d5dd5bdcdc40675cc6b972668d47

chainBlockhash (revealed): BfJ7baHZdqRJZxA4hqvDiSr1YKtcnVTYRVKn9VHpr8rS

chainSlot: 458529370

Rapid Firecancelled

serverSeedHash: 0x83c1fed7419da486577496eb6af9bf0452bfad0a6ee8638a49d3587f5022148a

clientSeed: 0x0751681f2d035b33e66d64051af9071278d3399420c46fc13e5a66e34fd8106d

serverSeed (revealed): 0xb0349abdebca3776ac1b995b474a8572baff549580cff2c2059c060a1fc05250

chainBlockhash (revealed): 25woekxR4A2D85paQnExFYzUR5eDZrznkoxvPURLeLV9

chainSlot: 458527996

serverSeedHash: 0x98885846d08990270c1b30f0bcaea305ac46357eef9890c267c50558ed3607b3

clientSeed: 0xc225205c73013a112a94a4bc3fc7e8f4c9e08c95ce722dc3b4ee1717bf7698ce

serverSeed (revealed): 0xcf3708488a4a583bee6b0b8df786eb6e79fbdc5e26832da68a51397c7cf518b8

chainBlockhash (revealed): GUiKBAHnoaLaqGjaeorKasyWcCrCtTei47Se8tfFDmDw

chainSlot: 458526611

Rapid Firecancelled

serverSeedHash: 0x6ddb02f02795f222fdfc5d32ad1a17a69ca5fe4b09259255f57ea90bc71fbacf

clientSeed: 0xc2e9e75423d1b0686f9337669332d715afd713b61a1d1c36f5877f2e33849aa8

serverSeed (revealed): 0x9566ba553847496b95bf79905b7e522a5bb66ba46edaaec7e2f96e192cd6039e

chainBlockhash (revealed): A6C6XEjjGZTdGQRYEE8ZLj4L3B1rDmBfSchRN9sLgTyq

chainSlot: 458526612

Rapid Firecancelled

serverSeedHash: 0xe5d1978949a4ea072377c29f578021be5cc4f366486baecd2d6e84c99a99e607

clientSeed: 0xc51784e02ccc8eb75f5c73c7b72640fa1feba04267b065210cc3c6b95d97238d

serverSeed (revealed): 0x362b7a392498d9a5ba561172e39f6441996ae1c45851f7d47b87bf4c4a518a50

chainBlockhash (revealed): 3coWjJ157bGZH1wtm6AU8Zsea5Bk5wdT5jJJXk8cKURD

chainSlot: 458525230

Rapid Firecancelled

serverSeedHash: 0xf60c442945139385eec928faeb141c66e3746b0ce7fd11a1f2677732e27ad82d

clientSeed: 0x55d747290e77c2154f3ac965edd6bfbbf0b08da7c67fac1870570c8eb5d33ee0

serverSeed (revealed): 0xaf301c4fc65177e111d037f474103a0d02ee1de97f924c5845d8995a0c3c54e1

chainBlockhash (revealed): 5G3834T7dgGA24WH74d8w4PwDrtxL1pfTaXd728SqUyq

chainSlot: 458523871

Rapid Firecancelled

serverSeedHash: 0x19fb2ba70035a80e38cc8e584e208df5b7c7f2b16ed3dbea59faa37cfcc1254a

clientSeed: 0xfc60cf51badefaea1b8b4d21915691ecdc45cac9204c298bc5992f3aedffad45

serverSeed (revealed): 0xb34d6f6033c91631a96c257f44232aa376dd5a7e5cbf0a33977fb2e61117df64

chainBlockhash (revealed): 84DnwbpA4Cm8v4FNm3hyaNLjhpARoUNrqj4wDHdjva6e

chainSlot: 458522456

Rapid Firecancelled

serverSeedHash: 0x9b97d1bd0a90f48a147f2a73ee48eba157f0536f6889da6d514089f975da9a3d

clientSeed: 0x4b5e59a584fa0e73c586e438e3aca06702b45442cbfda0210eee8af276ee65ee

serverSeed (revealed): 0x3c7cb39c53b5d298c3b9a3e433e58a94ffc137ca3ae888cf2c9a1e3357621344

chainBlockhash (revealed): qJ95pi8EFAgug73JqjGmTAxvPWwki7DQ6xcn6eKEGP1

chainSlot: 458521074

Verifier