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

clientSeed: 0x136587334e463662598c556ed71fe12492b13868b31b2dde4af97d4b413df5a4

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x9c62215d6ba1e23bb9028fddf8422cb79d95cdb0661650b901e7f300599cd79f

clientSeed: 0xcc0c0108700a97baecbd1fa9010a18cd5788854e0d3d4164c37327a9239b01de

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

clientSeed: 0x645b8feb7a1d97bbb020be68fdbc2ed5113abd8e150115619abb618b8a7a83e4

serverSeed (revealed): 0x4f9e0a29f6b108d02aee9b9a3006d5f211486cc88cd727c0ed8084f56534c599

chainBlockhash (revealed): GWMyw8fgnsDk85rBmioTr7jHmTv6GJF8aRP1mPiAA4ma

chainSlot: 458558352

Rapid Firecancelled

serverSeedHash: 0xf2275e5b4554640a9242419e596fd3d802c6d9c1f34d2a4e8339fd3d240157b7

clientSeed: 0x7962a339a72ec3c994939e16a8991ddd152b6d7147fb7d5cd080813ae422a703

serverSeed (revealed): 0xb756460f6a31489ddb9385f3b67efdb0dd2a8d0970d807cd4963739b99b701c0

chainBlockhash (revealed): FnZwCGB27CvpJhE8HRdSbiAtbavFyVmvdN1WS6rv7mE

chainSlot: 458556978

Rapid Firecancelled

serverSeedHash: 0xdfe4fe1d74c372023ebf3aaf65216fa2c48ce919aab4cfc18d1d0a9b751cf9d2

clientSeed: 0x7f84f2909d1455d58cef680d43be4f44ec325d3c99d5039810a0affb273fb7c4

serverSeed (revealed): 0xfb7610d4f1e09d29a177acdf519351074f2969b581efe1ac36f481afe5531aaa

chainBlockhash (revealed): 8vdJzpjBnrBEHmWyPGFsb8FTqA3Tkt4C22jTc1L9NFAc

chainSlot: 458555605

Rapid Firecancelled

serverSeedHash: 0x3f60e922d33f69fe2752b74aed6ea6168f5b47d09d674f77b91ea613cd53a11c

clientSeed: 0xf8916fe4692fede820d28ce79592096fd8cd23c569473db1ffd58922acff0a6a

serverSeed (revealed): 0x6267810f704a26b92554e6f1db1690a0401d5ead597c1d0b396f1947ca08b8e9

chainBlockhash (revealed): BZHwejrFbwxzKrJ5VExaXg4MLrP5LGTvgysRtPKPiU2

chainSlot: 458554242

Rapid Firecancelled

serverSeedHash: 0x67030b75b069c2dcd134127cb2d1b5af89fd37cd1679530e859aadfae080e06b

clientSeed: 0xc3aa165b2ffb89868d2c538acaa60881dd16b1c24e3d434ea86f7b067dfafebb

serverSeed (revealed): 0x2c1ab4a80253c0262ed692b2bb698ac26a0975ef7d7033d956b86bfe0b90bff3

chainBlockhash (revealed): 4GiCJitrkR5C8SqRPQPu2KK6SgGRjWTyTcU267MDLcFt

chainSlot: 458552839

Rapid Firecancelled

serverSeedHash: 0xf8fbb0bbee91950e4ee9bf7605d588bb2742d87e3a3232c1b5bc999eb88d2674

clientSeed: 0x637d4929d934180049cef8c85dc025d469e8e7804bab766b3d7d6a02c15dcb94

serverSeed (revealed): 0xf509873bf1dda9353544fb6c643161b965c70a48c339b335a90f6b36fab12d8e

chainBlockhash (revealed): 9UiHpFb9DbZLTyCri4arshvSK5AQzWCxUFph91KEnDRX

chainSlot: 458551461

Rapid Firecancelled

serverSeedHash: 0x32fab88aa099c004d531e0353f1d8f43cbf412a51d62d41f3770ab7a830343c7

clientSeed: 0x2dafe971fbf4405582463b9fd5bc0aa62710e0c3a27d212d04fac720c16051b3

serverSeed (revealed): 0x70e1be66960c994500d6b6c9c75cce19cfae21e7b194ac9396c2c712cf2483b5

chainBlockhash (revealed): 2qvU3cntMQ915wTYgxVKifdM7N98uFASJPgcn61hUoBw

chainSlot: 458550080

Rapid Firecancelled

serverSeedHash: 0x66db044d8e1d9a30f678fe92c2209d084e299feab78c6d61562d94bcf04bcea6

clientSeed: 0x7cd6a923928e306a0babfd2db54c26c69de3b386b31877dbbb26ec2f247bef34

serverSeed (revealed): 0xc8183a9cded92af42ce735fa4478f546d2d4ea783e3cc7c9821979f529177a60

chainBlockhash (revealed): B3VDB9nWEn9yH6SHyqreq4arJ8naXF6g65fLEVaikSgj

chainSlot: 458548689

Rapid Firecancelled

serverSeedHash: 0xd24c8f16571a8dc16b2772beb0c0871fa6e1ebd552fde612a0c9973137f00c7d

clientSeed: 0xf6f198cd5da8426a80d0d30d398fb21e2a3814988b67734581d109cfea0e3d14

serverSeed (revealed): 0xe5a00848c597efcc2ea85d0b4629885e40aeb38545b19b5b59dcdaeba3a17dbf

chainBlockhash (revealed): 79RL8sbTyLFiAwy1rFHTocWGkE8GgkGr41RuE72raQ5n

chainSlot: 458547296

Rapid Firecancelled

serverSeedHash: 0xbc760e87d90d29c9918e30736889741a6d303d2b61b77f84f8c7c60506987e33

clientSeed: 0x23f839f4e59725df4c85272678a06cfc1c9b7f4ad5f11be4232054b3fd69ac76

serverSeed (revealed): 0x2a5f0ede879fc05d84503ae89e5b8ff91c636e5141b7b914b23940576c7701e1

chainBlockhash (revealed): 7NVcHAYGgTWmV9ckLEzVsZvigzZGxT5yEUtSfJmqdvos

chainSlot: 458545931

Rapid Firecancelled

serverSeedHash: 0xfba25005fc1e90db5f7839fb2afebb6b415b84f9755c0d2db9b4626f48ad9580

clientSeed: 0x925d5d8e78c30d829a49ca19700566a9a35de50463f622978cd1d6c301b7400d

serverSeed (revealed): 0x32de4df6de0590dfb5f16fca6ff87a66ae608daec5e9e2776561c8caaff03330

chainBlockhash (revealed): 9NWbMHeCeVLhLgUWjwYeDeEVKFgGQgqtTj4DZX5qYHHY

chainSlot: 458544551

serverSeedHash: 0x9a87772e537d71e189ecf9bf88502a1ae1c3f8bd9b9b229213bfe218603a7349

clientSeed: 0x89eb06161b1952c0d421833f28ba216332a3a6dfaca7631bc1e7a2a1a155fa38

serverSeed (revealed): 0x3d7e60086aeefeeb7ae990f1e976390654a835f371f55a7d37791cc0c587ab52

chainBlockhash (revealed): FPe93aat2Vw82Qod3V1E5pnzZe8zT91HzQbV2ee2h9gD

chainSlot: 458543157

Verifier