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

clientSeed: 0x37dd45eb2d136a388ce290f97a8ec427b0dfb7348505d3303272d256f9d17ab0

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xa9f63ed7ea79085369d7af301a7d15071ca7609fed6ca916d67e3505b0d11ad6

clientSeed: 0x57d7b156c552eeeb49766f92d4a1ca748e1c1506564008d007723c1451b67cf2

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

clientSeed: 0x286f92ae59399213eaf5d65d346a21165ae68645ae083302b96bf324065619d7

serverSeed (revealed): 0xe2ab13e3f66fecf8329ce84b471cc8bd5336ea94f3e632121edf493e7018bce4

chainBlockhash (revealed): Cg2jTY5GNNV4UWmvCsNqzaE15C3ZTGxaLbrxnZsgFWBM

chainSlot: 457417070

Rapid Firecancelled

serverSeedHash: 0x1303b5cf0986d53751d6118c1ac3f31ad279ea51058fbbc66897219e418a5785

clientSeed: 0x502698d7a1c5032d63734fadb4aacdad73aa4121d6c46b4b1665335f35f9e6b0

serverSeed (revealed): 0x4c14b93dd473e9d8ce934040b6ef79492d607a3269f7f21ec523bd159d67d38b

chainBlockhash (revealed): 7zETzdGfzKrySS7endbdt5MZnTrpCUX1PHnKFGSENxbc

chainSlot: 457415670

Rapid Firecancelled

serverSeedHash: 0xd64f828704ed2e3f930247c1f2da6e2ed228a6e4a60d38d65919b80367420a4b

clientSeed: 0x60a387b2d5d0715539b37dcbbcd96ae900d2a7bd4dfdd5b58ddc5ee8ae339718

serverSeed (revealed): 0x303eddfede22feef24b082f55625c79eb113389725a985e10525491f344a321c

chainBlockhash (revealed): 6eKYNrnkkMuLtrutWxdf1LX77ZrfhNg7sNxBUjw5qnaw

chainSlot: 457414284

serverSeedHash: 0x2814cec4f0e60f780dcbf2f8394bbdbb70f9af5346aac7844db9be071a9dbdbe

clientSeed: 0x006114206387934e145fe304a00e9389100aac8d05f4dc55911af6589070dd1b

serverSeed (revealed): 0x733cb90e0f91fc7b30620c589d817eea052bc9404b3a0da7d30aa932cdd160d5

chainBlockhash (revealed): JjQ2qD5Xw2Lf8V3CJKT5E67r5mWYRcVXi8vtsaR4n8k

chainSlot: 457412890

Rapid Firecancelled

serverSeedHash: 0xc7b9614c82ec3528a13422ec2a073f6ae31ff0f3c3648058b6d5a81613f26c20

clientSeed: 0xcfc7dca6c8173907a3279ee318b923e352348f06abd35f97e104ee055a18d3fa

serverSeed (revealed): 0x98a599ad847241ee5efe4c3b153b1bd4d0dfec88e1861410bd4e3aef313d7a99

chainBlockhash (revealed): 3hGnCYmjiM2AN4z4jnUsertAuGkeAEGAk9YfBifUKa5v

chainSlot: 457412891

Rapid Firecancelled

serverSeedHash: 0xcbe8091cd4af0959ccf2f818979f43ab944ac1827e918c0ff0671eeb98c2bef5

clientSeed: 0x87466b371732ab51fd7a8c577c440bc623b2a6558944dac79ce174210d50c9fb

serverSeed (revealed): 0x2b5188662552fef0e7c6b8ad2301146f9fac26b93eaeb32b00b71de9e651e0e6

chainBlockhash (revealed): HqrBUGuNyRFae3QPLDR5AeYj1kBpbj5MS9U4RT9HepC2

chainSlot: 457411482

Rapid Firecancelled

serverSeedHash: 0x87c63f825a347d2e1673649e6ec4d1fc5b452f54d54b76b9100b042a2dad6299

clientSeed: 0x0f9c19bb897460a46414f53bfbecbbd8f2e56eab5463dad89e680711baa32df9

serverSeed (revealed): 0x7e35aa0d6d136bc05cc96824f107f6e592a0796ef9b329cb98977ba1475b2c1f

chainBlockhash (revealed): 3SSP5WDKcvE1n85AW3DE8ds2wTCSVpDDQ9AEFHh9MFi7

chainSlot: 457410095

Rapid Firecancelled

serverSeedHash: 0x7178be7cd9a29c9e6bc4be0086573cfb1ade98bcf346544d3af54caad35b0367

clientSeed: 0x19b30161b431195cd9adef28e22edcfdaeae6f29d58af41d29e6ba61cf214139

serverSeed (revealed): 0x42761ef47d4cb0c066238b64f6b9930a9c602917bd4b296f265ad9bb868ead0e

chainBlockhash (revealed): 7MF8tofCtSN2BCB9WB7yRWhdxA9NM3y3AZMc2gqUbpof

chainSlot: 457408696

Rapid Firecancelled

serverSeedHash: 0x667ad754de8432766fdc34498bb0080b7343ca869210b71b8f221450f1e998aa

clientSeed: 0xb45d4b7a6840a979053f8cee9a9be213f8f99c59796b1a45ceb3e034bb9d6e5b

serverSeed (revealed): 0x8e853ba600d7419b3586ffffdb71943cef5f301a6bcfc0be7bb09869168227f7

chainBlockhash (revealed): 2JWHcVTYP8eYZBZia5wL3Phs5K4fh4gkwc6jsusvwEEi

chainSlot: 457407300

Rapid Firecancelled

serverSeedHash: 0x64586aa24ab8bf8a0247aa23c832f1254b3d1e94f98e3c5cd709ad89d56b7a8d

clientSeed: 0x9a37f64639c8b7cc203b11fcd91aaa05cefd77eb92f78e06e16bf64b64476745

serverSeed (revealed): 0x3136306d5523c6480d6fa0d4ccea5dcca803b01ecb819fc15db843adb0f19894

chainBlockhash (revealed): GzZzwgyF353f4sRTHQmZfcBSsTjunAABa7scaGf5kCgf

chainSlot: 457405906

Rapid Firecancelled

serverSeedHash: 0xc7324c1cc7b3944e78f463d303911ae8f639556fbcba95c6bd7d5d3cbae30cdf

clientSeed: 0xa0ffdd562ce3902edf30eaa66b21b95ffb02307013cb39e8d7e2f4f6d8e0a358

serverSeed (revealed): 0x5ededaf8993bca0a5c0b485e7fcb6c46b40765e438294d4672deb3746e937825

chainBlockhash (revealed): F3ZQJkQgG3u3D4F5x6EpTw24bCRvG3GzMGvszkdDhtM8

chainSlot: 457404518

Rapid Firecancelled

serverSeedHash: 0x235a4cb59dfe232799e7ad4184a2ffd5c12bda550e5b08d5712a7377055efe95

clientSeed: 0x7e6aa667191f102212c30b3f4205288d7ff931061897656c80f8df9742f05115

serverSeed (revealed): 0x38a94aac85408b4857dcec47578f2a3f2b22d13f2be8843a56b0f396769b5fd8

chainBlockhash (revealed): 2ZgoPW1MQsvUvDRiUh4TKMEYexZTKoyExrA37m96fxPH

chainSlot: 457403127

Verifier