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

clientSeed: 0xb0f1ce7c8975a4995059665ff0eab34b734b07cde39b97f295a3521fb6f9393f

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xf7f57cb6e8d89537f2fabc0fb967c34db5078a1a87fbe4352bb965865fde5186

clientSeed: 0x8d9c3afbde38c757d567643fd96b7950ba978384afb03eb619a2e432e5137ce9

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): n/a

clientSeed: 0xc7232ae2d71047eab03ff5d11ac53807851945f1f3754091bbb5f13cee458411

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0xd141a9cdbb4df966a65cb0c74863245d48c910c0b171cf2afd18e7f0c1bc3214

clientSeed: 0x5131b2aa68e920aacc3e9368129b70d342ce7bc6b0dab05039d62e1b63f33b81

chain entropy: not yet, arrives with the draw

Rapid Firecancelled

serverSeedHash: 0xd9ddbe4c0c6dfcb10c490973f9325c0cabf61ab3678d32ad18643c933984d0c2

clientSeed: 0x091c17f14132846552121fc6e46fb67367876e6663da0fa1f43e9a894b37ed65

serverSeed (revealed): 0x5f950cccbaad6849f1d2c8996b13c71ae91ae0a2f86bf78f7185e4949f87e127

chainBlockhash (revealed): 3PQ4fn9MfKUPL4zNYMWgUZ8vcA3jPTE16kbpWxirf4hE

chainSlot: 457909665

Rapid Firecancelled

serverSeedHash: 0xa84e7623387f5883645e55370be57c2c474610c2f3b0e9fab3082d62e5ed0e07

clientSeed: 0xd26b4c941c22e00343b3c6fcbf89c5bd83011d176e7d980879f754c9dbe54734

serverSeed (revealed): 0x2f44e5d33d0a194bb5df68328db97e8d0548f4c16986979cca040fa8889f0820

chainBlockhash (revealed): 3nXHFQER45mfK18iMC7vyzXLuRHKgrCP81RsKnZz4wtT

chainSlot: 457908277

Rapid Firecancelled

serverSeedHash: 0x13087ed130931221cae6f0c1d3112e07bd4f248f423380b9aaea91dade7ed80f

clientSeed: 0x4012210275ba4c9a6ab2ba37a6729710bbdc031cdcdf730db8f3937a674aa2c9

serverSeed (revealed): 0xc84d87139e95085a39f64f3688fee7e4240cbc514d7753e8217a52364ddcfc3d

chainBlockhash (revealed): Ge83iMinFEjbjEe3iQGntWdw9eSKAqLMKcoK9QuVoL8f

chainSlot: 457906879

Rapid Firecancelled

serverSeedHash: 0x249e3ca1c7d3feb7300ebef9b646b82f33be39d9aa834a08ccbf78efc8a5d5eb

clientSeed: 0x3d57d65f8383d7028860b58fb0ec90608dc500b6ce8b0ce83f5d54b63f52a7c2

serverSeed (revealed): 0xbe52f5dca2531d0d4e0001aaa96506153d0f3751e80c222f5f54353358cc8ea4

chainBlockhash (revealed): 4vbLXoK6HvL2ovuhMmUJymngDoxDEzQeSLMiNCZx6hi3

chainSlot: 457905488

Rapid Firecancelled

serverSeedHash: 0x3d332d11c58481c6ee3a3411086e36ec8211334abcb87d18bf3e657abe1842a8

clientSeed: 0x921b3b40d64abd5b552417ce313b69afb86e1117a479cefb7f5396be8c76f402

serverSeed (revealed): 0xf2acf6c9c39bf72d10db805b01edd46aa5b1cc8d40378d1a8aa177905e91ecfc

chainBlockhash (revealed): CjmgwX8dy9ZEmaqChPGBC6S66oB25nDDkn3Tz7zoK9tg

chainSlot: 457904113

Rapid Firecancelled

serverSeedHash: 0x4731931f174a91ed6b7b28dfc46888682cb1caa9970f90f99710acbbf9ed9a5b

clientSeed: 0x6236cc700f02cb04ed8318b1c346ad38f32119ae84bf5104f106cf1029454e77

serverSeed (revealed): 0xdb65dedda324fa74da04c42b6e2636fe096c8889e15d4701ee0e3ffeb2191f7d

chainBlockhash (revealed): 5p5HtBAHnTFcFMRnQZNevCTwcQbEWCkStpM7kd83nEws

chainSlot: 457902724

Rapid Firecancelled

serverSeedHash: 0xdd5730368c32d55ef00cfab9b5efc2418f29371ecfec422dbb2750b168972886

clientSeed: 0xfb57607cd524770fbde5c0f5af41d6387c1731a5c2271a8fbe93325231b77336

serverSeed (revealed): 0xa90ca48d0625e4ba07faf77d0f97226baa90d98dc5384cf909e531359327cb84

chainBlockhash (revealed): AwPZaivsB5ZPtvtfzrcYkY2eVFyDTPu4mtjokPysWHqg

chainSlot: 457901332

Rapid Firecancelled

serverSeedHash: 0x327224ff9d6b2302f23ab39dc973f8d7594bb4acc5b192606d91c2d34e9ae78c

clientSeed: 0xf7b91d8bef4d223702c7bc4348c1b095eaf990e620cdcbdefce5e7fd0623a430

serverSeed (revealed): 0xf51413ebb8570b7cf6dc1ecdcc632ecbc29fd4d036499729239660bb71ac6e05

chainBlockhash (revealed): FdJapwtXzNbR76H9c9UxkQPLzUbRZ9BK3cTiCrPjKaHN

chainSlot: 457899955

Rapid Firecancelled

serverSeedHash: 0xabc327a256ca6decbb24445e6f9cb4d5637834891324628f40048ec0c611b344

clientSeed: 0x61c5f9b9c7a33c08eb2d966fc89ac766f3c14f4dfebbc7daf4e90fc1e22d04bb

serverSeed (revealed): 0xd3d1b02ccd981eff7f416476c485bb925573cc606303a2b8db4d3480c4ed1764

chainBlockhash (revealed): 51FP5T1VYnEeWd14CN1n6FQenoVyDPzHCFRVmFG9KpVR

chainSlot: 457898574

Rapid Firecancelled

serverSeedHash: 0x313e733188d0b56af729189a42b82c32d9d88c54781c811c0787a7dc3396ac2d

clientSeed: 0xa457d9e2cccbadbfbface769b860451aef3180f92e58db040fb34aaf704adb1a

serverSeed (revealed): 0x19f29e6c946072e77cd28e180a91d0c417cb17d108c7de040bb7d3d063382f96

chainBlockhash (revealed): 4BTk1FJhU5p2if872focbHfPvgmKxZeDNvvdHWCzA5JD

chainSlot: 457897182

serverSeedHash: 0x9a469debf4a8c94ab0f3d13ca691f783aaaba10560ebcdba9a0122e441b8bcda

clientSeed: 0x360e40dc5fe803f70beb56a4f68de71924b80c187ac3900b753b07982f6d3df0

serverSeed (revealed): 0xd3981793a75fb5f3c855266148bb5fe3fda7fe3ba7f1fcf72dd736c2bade3aec

chainBlockhash (revealed): 5d76oWqgMDHh8d7z8ViyQPUnL64EZRYzqnhmmFpQDXD1

chainSlot: 457895797

Rapid Firecancelled

serverSeedHash: 0xf77bce72ece7b8650d5660359a6cd707b478e2fa1de0624e3e2389165725964a

clientSeed: 0xf5acfdadb3b3841f96106cc137a144d69f3af66b1f6d8babfe1aa68891426d2d

serverSeed (revealed): 0x7fe9ccdbe47a882f97a18cf363e5fd249c28c3829b99134484b6f6f394fde3b3

chainBlockhash (revealed): 5d76oWqgMDHh8d7z8ViyQPUnL64EZRYzqnhmmFpQDXD1

chainSlot: 457895797

Verifier