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

clientSeed: 0xadbc973f70648eb29f345c29c62ee6039ea1d78e5e8d3f1def17376bfffd0f09

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x1cdc6be09db284bb5085c68231f97ac94286989cd0c440a38f778518a802073a

clientSeed: 0x52c5c7d36f003b658061323ee60dc33bb60aafe64552b45dc3ea0d04b92ddd02

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

clientSeed: 0x2a8148e61490718b74e656c5677b999ddc60c1f4fe7fb31cd937650f59d4beae

serverSeed (revealed): 0xeaea9eb5d420141644415d5ba3810cfd48e96cadd0e50f40bf2b926e2393fd37

chainBlockhash (revealed): Fi2M516GKAUKbHRsjvEsV7ZXRScKYNi2GwqJRfeaPyCM

chainSlot: 458451860

Rapid Firecancelled

serverSeedHash: 0xf6d6018ba8f1282a8a285a0496650ae80afe119caec65f120889f92f1164b58b

clientSeed: 0x572b7cf6f31750a538161ff9e6501a9ef65e17931f839c2aecbd9853b1633efb

serverSeed (revealed): 0xb39d60c9fd7ab4d825d2c125d9d7a9716d38f1ef860a6a609e55025dce78f081

chainBlockhash (revealed): CEpNWAzphHWHppoV9RmvAYyzBZsFY2CXUFjCkQgXc1ge

chainSlot: 458450471

Rapid Firecancelled

serverSeedHash: 0x7c54f4d26d33f856f31b02efd19773ed1a465ca01ad9e5b52c082bde55f7dfc6

clientSeed: 0x1a4e19c1547395503001acb6f6d2706d0875b786c0462ddfc3c0e788fe126188

serverSeed (revealed): 0x8dabb0278d9fca8a14ceffab04d180ed3103f0291aca9828f586993cddd217ad

chainBlockhash (revealed): DmkfHpyo9uuLXG5vMBR9DREFp7rY4q8hph4yv18W1qt5

chainSlot: 458449088

Rapid Firecancelled

serverSeedHash: 0x5f3c0e2e262838d11752c3832d4c3312c1d839f2f725c55db616731771f6a6d3

clientSeed: 0x51f74e9d739620116aed2960620bc942a4b3527a2b173bd2957b6a198137045d

serverSeed (revealed): 0x2c30e10a5e71b9f68f90a44a578d9f37c7ef139f214ee9ec12b13b468c91d2f4

chainBlockhash (revealed): hkSeZvaUHwcUt8Vqsvz4Bxz4j8thqmCB4AzSU2EUzas

chainSlot: 458447703

Rapid Firecancelled

serverSeedHash: 0xee2a1f02754b314c8620e0404d160e0aaa471e63c794c5e7f2bc3bd5b9d1d5d9

clientSeed: 0x3eb8a6fad159d0f71affe2da5d70c579ac85abfc519a2042a32b79a69a7f553b

serverSeed (revealed): 0x17cb184fe4f856c72fc44612ba0bc8571332751bdc02914b3bec90d7b6306d77

chainBlockhash (revealed): HPQF6eQwZkjEHGfcFCcfbckqjVNV3R1J4WscunVVud1f

chainSlot: 458446322

Rapid Firecancelled

serverSeedHash: 0xaa8e15a00d1d62aadb341cec472ce00880325f13fb8da4fa8e74eaba4ea5084d

clientSeed: 0x677897768ae34d3ef8a1441854624381f314a85fafb488c33b9542908b634ce2

serverSeed (revealed): 0xc33f3af6a2901bd69c31f0b4f742a29c7d275cddaadb6a595fd3949e07075e2f

chainBlockhash (revealed): HEdCKYFZSNkbNuE5zYfJvPERNqUKkQE3kQFvSawaycMS

chainSlot: 458444949

serverSeedHash: 0x7393f9d471b9905683320b13a34f5ef8ff8c92ec380bafc2b623399e5d8cc304

clientSeed: 0x12e41d21069310d913f67821c95a0ecbe3a74788d63db0a6a3853f9c3670f3f0

serverSeed (revealed): 0x13e738354f14c346cbb623ebc6d8e89095b6e5d7a0696863333c4e9577789eca

chainBlockhash (revealed): 872om5DEcSCNPPC23SGoF2t4NSFvGoVxeeXjew4xHmf5

chainSlot: 458443543

Rapid Firecancelled

serverSeedHash: 0x5363264bb11e3a0f71b30993eb754970c3f6fca6b89b0159ec22e2a4a8585d1a

clientSeed: 0x98517b324cf212947061892d0268c2b4568e2e3de9108d2f8752d1b9faaba08c

serverSeed (revealed): 0x6554b86cdacead1e7e7c82754db3cf9d0cf7c1e0eb49d7de931995bd8b74e71a

chainBlockhash (revealed): FRt6QqTQfXbi1TCAc2MASibG8PWe7K1iwyMnSxhwrjJe

chainSlot: 458443546

Rapid Firecancelled

serverSeedHash: 0xb7d1cebd7568f9e038359fde111689774f6f8dc12417b6e85c561f2c2b4fab17

clientSeed: 0x370b07f1ed79bcc42cc7300b0bba0dfa1602f241753f2c86d848dcba5f345520

serverSeed (revealed): 0x5c538ef3f8529fd56ac764e339ebcaf8c393808f0c98f6d9ed46e0fa02cecfa5

chainBlockhash (revealed): AmekybDx1XUGWq6n4sut6WsYBYLocTKVAewesz6DeCJ8

chainSlot: 458442166

Rapid Firecancelled

serverSeedHash: 0x2dc3529c9443e839210cf3ee2fce9144d6d03857df2fc074d28d4c9b03baf9ad

clientSeed: 0xe7446acdb8343b25c775aefbc9df710286f7810fed5d0cadc0846c39bd892d9c

serverSeed (revealed): 0x61972795ccd6eef9df638c94f1f3033094580b4c19975e0947ad05a53f9c2294

chainBlockhash (revealed): 8pybRAKEXkzkbYFNKpU23vUZYfcA5q4kTsh27nVfunuu

chainSlot: 458440775

Rapid Firecancelled

serverSeedHash: 0x9d3b3ee1d2ae6ddd2763cb87e4f6c2c1a614187bd7edfa46c3d6367523a23826

clientSeed: 0xd4a672d1ab296f7dc934db86263028700e9e0454301f1aabd4d54e6a5a2e69b0

serverSeed (revealed): 0x6709c33fab3b67e3beaaa0478f3f41205890a54fa9d975d17bc2ee53cb648cac

chainBlockhash (revealed): FHSm5RkLxLD2nwVJocxkxxF2M5RWyidw7y3tUihPDxXC

chainSlot: 458439395

Rapid Firecancelled

serverSeedHash: 0xfa90b986a22bb2269ad842c5bf619607afb2fd3f924877c56c089833507733cb

clientSeed: 0x7f20b8d8a49e83536afc433085ceb4a381bfb1a180dbad9ac61919a0710aff2d

serverSeed (revealed): 0x0f31e83476c9ec2ebe164162aa9a1c28e800c45fb69bafdf8230bbc8102deef7

chainBlockhash (revealed): 17rvs3yxgjHRprUF2hSPJSZGag5HqHJyyEa7GNWf5gK

chainSlot: 458438020

Verifier