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

clientSeed: 0x674e172e1291d8b9400bccb3e440ac57db344dbbe6e897e1bcbfe9bb8f86ddcc

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x744bb78e13202940dd4f98f6fe06fee318308787ed41eca1f77c54abd4f91069

clientSeed: 0x0151d3bf0f8761060d40fcd0b198f13b1b0162160c0e71e06ba68f3c129ddd49

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

clientSeed: 0x76ec4590ca759886f576df9e81163b8ed511db33db0b3260b1de3f472274c292

serverSeed (revealed): 0x39c6bdcea5534f9b2006b29b42a0c0d78e92da43b9200005a4c13edab23d84fc

chainBlockhash (revealed): DVWvX24mruNRbneXHWvJimDFmfucLQcAcnadhVk66wU6

chainSlot: 457808440

Rapid Firecancelled

serverSeedHash: 0x21f7f00bca773a069eebf87f783936fd23ead8e6d35c56c700f3f1200a0eabb9

clientSeed: 0x7c7205b3d9c3341a8a28870e76b8f5662fa4ed953633f57549967b2b936374a0

serverSeed (revealed): 0xb4f1a67fb6f51319ac3c89aacd8d6f5c586d023e04604eadaec16c6f556b072c

chainBlockhash (revealed): 8AM2dXeA9UsKB3fTpjW3i2QGFuustLUM4SQB67nwCKst

chainSlot: 457807071

Rapid Firecancelled

serverSeedHash: 0x8a844a09df3c05f9542f5f9e218fa6c20fc5624d63244172a7f8fd3d1da0b6b9

clientSeed: 0xb79b7e19fe3b8f6c9a56c36c87dd99b18f6fbb7180ce7481f4fa6c9ec1ebfe09

serverSeed (revealed): 0xf2c925ac4eb4ed1f7ee47ce22a9b270670441cda151d8650f6b874a1891c3cf8

chainBlockhash (revealed): H1tGq6jYdcPNq3RPtJnUtxqRJ9dN1wWCfbXJcFQd9ZqG

chainSlot: 457805688

Rapid Firecancelled

serverSeedHash: 0x8f0487226b171bc76bb630d1c045909f416dd95665b314d769f99202c59a347a

clientSeed: 0x7a47a920f6ae693e918326f64bf3d99c12247ae06336e326f33463b0c09d70e7

serverSeed (revealed): 0xd13f3391446c4a8921763b9473a4063f2bad933dd141bdb590362fff05d558ea

chainBlockhash (revealed): 5GU1SGxvG9gvmc8S6qHDEAirVrNM3SBKCaTK89AJr7j

chainSlot: 457804302

Rapid Firecancelled

serverSeedHash: 0x0b86dc366befb09570c0e546ec5d019fe7f32787247ce5132853bdb5026aa2d5

clientSeed: 0x3e83238a1d2ee7d36fcc2306b5820f39a701c58406ae1d204f2abcc3cfae73b5

serverSeed (revealed): 0x3b398c13f0a0268a7f3076aa66e313ce2023c7bac386ed94a52cc48f91147d7a

chainBlockhash (revealed): DBSAwAfxJ8q3UAj186pAJjXWNSqZRLfcTpwDFbnAxsxL

chainSlot: 457802924

Rapid Firecancelled

serverSeedHash: 0xec293f13e4a292af2909c34bb74a86e309696a0426f964ec465646e1d200130a

clientSeed: 0x8cc9b7e751405ee1331e5e71c0aa5b2aa68c6d5bc34d9a713f602ac531c2c6b4

serverSeed (revealed): 0x933f8e31e5e2184ef7fbe5dd95e37869a08b5a358a2f5cbcb08b990ae259e5a5

chainBlockhash (revealed): B2Qthxcc6mnEnainfGuTRTnVgXEZQh6CnzrxndxxArpj

chainSlot: 457801553

Rapid Firecancelled

serverSeedHash: 0x472efc9c04ca7b3bce0b8bdba4b435faa3979277abecb80532ae26702129d8c9

clientSeed: 0x4e1703634bf4338e3387b8b874eecc2a77ed98c5c55b365aaa6102c6feded349

serverSeed (revealed): 0xa6edb71d18e0d8c2b83fbbc9fe0f1c691d00ce1cf725d1d1cc5e435664690df0

chainBlockhash (revealed): 5a9MZWoLpqg94tQgYzSRV6Vp883JZJ3bFYTMwi7UUZZK

chainSlot: 457800151

Rapid Firecancelled

serverSeedHash: 0xbf10701b4f319ab4cc44bab30dcfbbeb5e19c33101cbf6658a075b9f300b025a

clientSeed: 0x5046d129f40fa2b361055ec8728e278e9bd6bfa739ccdc4ed24bb07689b2dfd0

serverSeed (revealed): 0xe4c413014478cc9b69cad3aa50cf6b623a300f34d9b9009c4f7f70f153d50c51

chainBlockhash (revealed): 6VC4dB3ofvZo2ZaJToLq4jkXGYeFXvWNwhGAeXqJbnSi

chainSlot: 457798760

Rapid Firecancelled

serverSeedHash: 0x4021b8a379b0f073d05500f2d439cc6e8d8fb9fae77f5c323a358fdd2d95259c

clientSeed: 0xfea36f452598fe33580db8a9c4477c4eba7e523ed1b2f4320504fbcecfe29127

serverSeed (revealed): 0x649083d48cdfaa328bf54acbd1e02ae0eee972241c58ee72ed9e2080ae2c1dc2

chainBlockhash (revealed): CT4NqEs27c6upfgRqTZXbKnQyPfZSPQgZsDHmjMQvwwj

chainSlot: 457797384

serverSeedHash: 0xa2edb5444ee334cd6b4e0b85ed20b8472bd72b400d649c7d86008a68504a97d5

clientSeed: 0xdbad2eefeff028cf49d917a1c8318a00718b0839792d01a168a439b966cb4357

serverSeed (revealed): 0x9fdc1c4168bbe864939bd91835b6955f09a44b9ee1d571c4998722833ee57c07

chainBlockhash (revealed): B2gQgxs6E2mq2h7qxs6xGBJajJQUq5QSEuChRNWjTvfL

chainSlot: 457796005

Rapid Firecancelled

serverSeedHash: 0x5fe81d29aa445bd16b2ab23228cafe3f7ade93e20c33857678b8b399b60d21e9

clientSeed: 0xa1ce36ca83b4b1c864cccc2d6dd7c11a816d6d378964ece71a62566d887bc201

serverSeed (revealed): 0x4cafde8fbf1702d69ba0c3bafb6d29f8585322d21499844b6d0fa35116858b29

chainBlockhash (revealed): 9J7CpqBxvyLtX3MPhzS2XiZue7btMgdKKe8gRVmwDZrN

chainSlot: 457796006

Rapid Firecancelled

serverSeedHash: 0x723061211e87e0023afb72ea2b0650a5e05518f4067394e3d963f7d9aedfd0a7

clientSeed: 0xb290292c3fdd661b5a861c0ca28d9f36867848be9098405d1854ee0ade03c8ce

serverSeed (revealed): 0xb3adf0a4eef2cdbb02df31d034991efe1a39d12492223ad95fa8b5c580359d57

chainBlockhash (revealed): 5w6Xxrz1b4TWcnry7xgJRT15wWZ4Scm74gTdqKgYpz7a

chainSlot: 457794598

Verifier