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

clientSeed: 0xd41085afba59ebefbee32fe73ea957f62ca84a7af24274ee3f1484945a0eb72f

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x244999c65b6555f2a8f0ea926cdf555b4ec6607f108c35d4b7db9d31b19982f0

clientSeed: 0x2868f4e76a6bd2dadfb562f4521c202c39384529982b7b6c73d29eceacf85296

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

clientSeed: 0xeca73f4d9938e21c27ab031d3fede927ec1e5725a4b72c13d1697a1fe658110c

serverSeed (revealed): 0xe5db3b98a2159a14df30e61c47eea622e2c720da5e70d0f58c077c7209e13f61

chainBlockhash (revealed): 5qkZy3Pud6hD2mX9uk3HzGXBvmi4M2wuUfEMmcZUpxQN

chainSlot: 457470989

Rapid Firecancelled

serverSeedHash: 0x79d7fe9637a38f95518ca5506f86e423610f5948e437be8716cf6741b147a49c

clientSeed: 0x5c51b5035f72ddd54a6448a3dd8b3e852ab09bc4ad9f15498d96bef9b9277ecf

serverSeed (revealed): 0xef977364647c5a996e92a3e6c0de1fbdc8cef8bf653937c3a3d9cf6b96da97bb

chainBlockhash (revealed): Ae84nZmm1SfJTMPDNQsPe1cSAnto1idUstTGxYcL1YUg

chainSlot: 457469597

Rapid Firecancelled

serverSeedHash: 0xac79f717778a401385eeb517a4387c99cb2a2f4376b40b43b51370bf06818212

clientSeed: 0xd7061f621106693fe6377e0a98275d7acf17222f80e18c11546de2f02844153d

serverSeed (revealed): 0x285ffe54cc8ffe49735c9a332b804a728ff5c00400608318aa1754b4dfcef3b6

chainBlockhash (revealed): 4F5MxzaSuheumsVDKx5DkY2piyzLfTjrNED5JdoJ4is6

chainSlot: 457468212

Rapid Firecancelled

serverSeedHash: 0xd927a9a1ecda08fc42a334e6ac74d8aef41c59ad4db5f0dd95d65f0083da3f8a

clientSeed: 0x6fcf8d8f3153d8a05cda7fbccc481fcdaaba9390d7c45ab5001c8fba1133be82

serverSeed (revealed): 0x7ebb001a297e6dced020dfa9ce5d0777d4e387c21e28f6acd5d83d497aefac6d

chainBlockhash (revealed): F5eZCgBNLXugJcpCPogY4nMJ4kVTxBEcpC8H2NLMXPEH

chainSlot: 457466844

Rapid Firecancelled

serverSeedHash: 0x2e1b3623f8b6ee6d0462f243c67cbb365be6e06723d0b1bc9c1486d3aa5f1c86

clientSeed: 0xf264f184b7ce56fbfdb04ad6fe8e9e8fdf77bffdc21a40496af653a1b1ae4f96

serverSeed (revealed): 0x7b806fccc13b52c0f84b7061e515ff57ef373ad9f981b3890c392f66adf7927c

chainBlockhash (revealed): 4f91AQj8ZCxjEFyvwEQRVhfsv1H8AgFbQhSZ7nhHTqGD

chainSlot: 457465448

Rapid Firecancelled

serverSeedHash: 0x63232bb3e8ef87af2e700261e010a2064d918a82c3e888effa7c70093738185d

clientSeed: 0xee7ea6c3f0235506eab02cd570bb5147c805410421f421ab0c32a8acb3e161f1

serverSeed (revealed): 0x8dfad4015f36d83a6fd33ffec79296debfcb8abb4790bf5cbf39a46c3bff44b5

chainBlockhash (revealed): HPnUDcHDcdg6Hx8xKTg9YpxvQfAcdHCyhtMPDVHtKCqb

chainSlot: 457464082

serverSeedHash: 0xfa5922d1784fddd843929352b0dc5fa9eb5798c7c2778d751b4cfc708bb659a6

clientSeed: 0x4b88ddfd311390ca90c0628cd40a18d35d2eb97b74521ade8deef76ab7691cb4

serverSeed (revealed): 0xd0d41e77b16c1a3af996768b2d84142babab3e813bc495d24cc4805a78e2b09b

chainBlockhash (revealed): 54SSQyDmaveSWthfdArWNbPivqMKKqrNmK8vWdmbe51A

chainSlot: 457462708

Rapid Firecancelled

serverSeedHash: 0x5b12d305650db1fd15f4167378fda7cb3f26ada89c55e75a41b899287d917a27

clientSeed: 0x25f5b38102cd4bbdbe5c631141fb456f493338952ba63e9324feda2a014ac920

serverSeed (revealed): 0x45cb5b3efb00f18c57218cebe214138935587b564faf1d917c1de97a112fb680

chainBlockhash (revealed): 54SSQyDmaveSWthfdArWNbPivqMKKqrNmK8vWdmbe51A

chainSlot: 457462708

Rapid Firecancelled

serverSeedHash: 0x79bb05477a30700323e8807e145f8fc2571c7deeee0d345fed45fdf80aa8e73f

clientSeed: 0x5602bd57e0668bc369634d253cb1b1283a4650f6f80bf3d9ab9affd5ea026a64

serverSeed (revealed): 0xdb028a57fa9f4bd2781ba9512cce998de07d436b67e2e7efb117420d476ad8ed

chainBlockhash (revealed): 8eVQhNK4nf73xsUzzfDRGkuqh85Gr9QKx2xhuJHSgoWv

chainSlot: 457461323

Rapid Firecancelled

serverSeedHash: 0xa36303c990f8717ee9d7553c4541588577dd4fb2940634ab010411c86fa6a2e0

clientSeed: 0x074d0ffdfad4406499b2498eef158779f92a6e8b85307111d8d760f6b3defe35

serverSeed (revealed): 0x2713094b270f357319c4bd39a4c3481c6db00546c07a61778669e655520bb491

chainBlockhash (revealed): 47HXbuv64UP15zoky4vvHHHeivdd5WwDomKm4XahUVGa

chainSlot: 457459935

Rapid Firecancelled

serverSeedHash: 0xf008231f7baf2707bb7eaa6c6ef7c71248dc6d525cbc10e99d34870713c4c660

clientSeed: 0x8b5f959c39901ce62234b5955f598de4e52786be5f3b39157bf53101296bacb3

serverSeed (revealed): 0x5c8985d63f580fc2b0d857f8ed27ea0f477b8ea46541f5160b5d50a89bf9a539

chainBlockhash (revealed): 4cyvJFoJDzJDXyTHxdCnTWz3VL3SNfcVyYy9uCiC7Y9Y

chainSlot: 457458535

Rapid Firecancelled

serverSeedHash: 0x5fa496342808ba0fb9556b3335b197829122035f4e73c4fbd090e8b2790b5a8d

clientSeed: 0x7a980d8af3fbf1308bdd012a5ee8d1394aa35996dc704b66639f73baf75cd79b

serverSeed (revealed): 0x3da5bc2676657b8da149582d483bef6c9a3c1ada0410f9e1a2b5e0742ab4031f

chainBlockhash (revealed): CRPnqZyoMY5vrq3Seq2nmAE566SdSP1gnTPfDaFF5o9T

chainSlot: 457457158

Verifier