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

clientSeed: 0x7af963afb2da09178277b726b671dafab63542f38ee6b494c5b6c690f022acb2

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x9a87772e537d71e189ecf9bf88502a1ae1c3f8bd9b9b229213bfe218603a7349

clientSeed: 0x89eb06161b1952c0d421833f28ba216332a3a6dfaca7631bc1e7a2a1a155fa38

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

clientSeed: 0x0751681f2d035b33e66d64051af9071278d3399420c46fc13e5a66e34fd8106d

serverSeed (revealed): 0xb0349abdebca3776ac1b995b474a8572baff549580cff2c2059c060a1fc05250

chainBlockhash (revealed): 25woekxR4A2D85paQnExFYzUR5eDZrznkoxvPURLeLV9

chainSlot: 458527996

Rapid Firecancelled

serverSeedHash: 0x6ddb02f02795f222fdfc5d32ad1a17a69ca5fe4b09259255f57ea90bc71fbacf

clientSeed: 0xc2e9e75423d1b0686f9337669332d715afd713b61a1d1c36f5877f2e33849aa8

serverSeed (revealed): 0x9566ba553847496b95bf79905b7e522a5bb66ba46edaaec7e2f96e192cd6039e

chainBlockhash (revealed): A6C6XEjjGZTdGQRYEE8ZLj4L3B1rDmBfSchRN9sLgTyq

chainSlot: 458526612

serverSeedHash: 0x98885846d08990270c1b30f0bcaea305ac46357eef9890c267c50558ed3607b3

clientSeed: 0xc225205c73013a112a94a4bc3fc7e8f4c9e08c95ce722dc3b4ee1717bf7698ce

serverSeed (revealed): 0xcf3708488a4a583bee6b0b8df786eb6e79fbdc5e26832da68a51397c7cf518b8

chainBlockhash (revealed): GUiKBAHnoaLaqGjaeorKasyWcCrCtTei47Se8tfFDmDw

chainSlot: 458526611

Rapid Firecancelled

serverSeedHash: 0xe5d1978949a4ea072377c29f578021be5cc4f366486baecd2d6e84c99a99e607

clientSeed: 0xc51784e02ccc8eb75f5c73c7b72640fa1feba04267b065210cc3c6b95d97238d

serverSeed (revealed): 0x362b7a392498d9a5ba561172e39f6441996ae1c45851f7d47b87bf4c4a518a50

chainBlockhash (revealed): 3coWjJ157bGZH1wtm6AU8Zsea5Bk5wdT5jJJXk8cKURD

chainSlot: 458525230

Rapid Firecancelled

serverSeedHash: 0xf60c442945139385eec928faeb141c66e3746b0ce7fd11a1f2677732e27ad82d

clientSeed: 0x55d747290e77c2154f3ac965edd6bfbbf0b08da7c67fac1870570c8eb5d33ee0

serverSeed (revealed): 0xaf301c4fc65177e111d037f474103a0d02ee1de97f924c5845d8995a0c3c54e1

chainBlockhash (revealed): 5G3834T7dgGA24WH74d8w4PwDrtxL1pfTaXd728SqUyq

chainSlot: 458523871

Rapid Firecancelled

serverSeedHash: 0x19fb2ba70035a80e38cc8e584e208df5b7c7f2b16ed3dbea59faa37cfcc1254a

clientSeed: 0xfc60cf51badefaea1b8b4d21915691ecdc45cac9204c298bc5992f3aedffad45

serverSeed (revealed): 0xb34d6f6033c91631a96c257f44232aa376dd5a7e5cbf0a33977fb2e61117df64

chainBlockhash (revealed): 84DnwbpA4Cm8v4FNm3hyaNLjhpARoUNrqj4wDHdjva6e

chainSlot: 458522456

Rapid Firecancelled

serverSeedHash: 0x9b97d1bd0a90f48a147f2a73ee48eba157f0536f6889da6d514089f975da9a3d

clientSeed: 0x4b5e59a584fa0e73c586e438e3aca06702b45442cbfda0210eee8af276ee65ee

serverSeed (revealed): 0x3c7cb39c53b5d298c3b9a3e433e58a94ffc137ca3ae888cf2c9a1e3357621344

chainBlockhash (revealed): qJ95pi8EFAgug73JqjGmTAxvPWwki7DQ6xcn6eKEGP1

chainSlot: 458521074

Rapid Firecancelled

serverSeedHash: 0x1d26443871779a836c2116925208c582ab36a35fafe412f98e34b406fc238822

clientSeed: 0xa3fcda7acb5f94921c64ce3b5711c85d0d3677a465955c46c2353e1e77af64ad

serverSeed (revealed): 0xf3974f15d1100ceb56d7d925536608e65c2be2d8bbae75322557f55c3dde51e7

chainBlockhash (revealed): GBDFjdmYgD5VoSgR4nzC5ZxdB8fvuoDuL2aznV34KQsc

chainSlot: 458519699

Rapid Firecancelled

serverSeedHash: 0xf30eff0142f03c10de3aa5b22917afccf8ad3e40f41e70014a266ce861429754

clientSeed: 0x1fa7640328c4f73d3f08b316752be9233eb7fc08e4684b6b3336fb232f8fce14

serverSeed (revealed): 0x280037357dc78da0a6848478bc6f6500b39021bc4772e445d037788394697fd5

chainBlockhash (revealed): 2sjVCUvGNwU5uNyu8sVJA7qEjmnUXjJKCjNApuycapus

chainSlot: 458518312

Rapid Firecancelled

serverSeedHash: 0xcd915edf0264ee5c4e5433e8fa6e3b9f5aba9fc69d970f76441f3108c6080629

clientSeed: 0xd15c85f9ad97ef4ef15af102ec8232d7d022bef9f97f68aee6bc4a262570b4b4

serverSeed (revealed): 0xc2b9d9496e4032222c17b28d917b432b3f7db7daa8ef298fcad55bad30e0df51

chainBlockhash (revealed): 3X7Ukhb5VsFpGARxp5yLkGcNfBfHrbz7LWtCcA65uDEc

chainSlot: 458516928

Rapid Firecancelled

serverSeedHash: 0xc261fd7f502893517760d773b5cab5258ee1a8f71c36293dcde92c8c26598b7e

clientSeed: 0xb02a0af544e73546774a7da1f59d30d85a7b58fddf45164be3a4f638f3499c3c

serverSeed (revealed): 0x04278be207df4a1242feb9838fa715a93eb1f573b6a64267c9f79b8b5da9547f

chainBlockhash (revealed): 7ekH6TrTL22T9HSXAGD3njYSSPFAFkAxoipBuqSy1bJx

chainSlot: 458515544

Rapid Firecancelled

serverSeedHash: 0x14f2b39f42f9e7865ed65ba7cb10f1f3141787b3a94da8daa0508ed1d347d2be

clientSeed: 0x073513d3e5ccfbb8480f8dbfcf688b46aed3c216f22554e637330aa9d82c344f

serverSeed (revealed): 0x44f0e10a8dc8945e517baf84cb6a30f558032519676ea81ec580661521688d45

chainBlockhash (revealed): 8DyiZwHTtmDMPn3rWEG1rBuafbVoCniXmTzV6d94UUKA

chainSlot: 458514161

Verifier