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

clientSeed: 0x3bd2ac54bc11d749f9fbe9dc329f7296e7b54d7c3ed1d373a8ed14698068f39d

chain entropy: not yet, arrives with the draw

serverSeedHash (commitment): 0x26f1c5d87a21ef0ef0931269e49c0cadcae8dae1733ee4e4a4a03ec1fef1436c

clientSeed: 0xa40de022fc3f703d011f4a05d95d8eea3eb4624087719fe9874a9766eed4f048

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

clientSeed: 0x18112f080c3106ae56ab3809f557367125f3090fcbb46a4af35f1b14333cf979

serverSeed (revealed): 0x095ffc3f892e7e40dd0963c5044631047ff29446f2ad6db72274b3698cdbf24f

chainBlockhash (revealed): FSopbPHiUdvE42fVtz8xzcnYPyr3WgRBk5anMxu1Fwjc

chainSlot: 457863939

Rapid Firecancelled

serverSeedHash: 0xc026cf48810797c9baf9421fd326855807e6947264019603fcd6aed9cd81fa03

clientSeed: 0x5e3eab53dbb50a3a2687ab1399f1ea3201d1d4daf5e91102c2d062038857c30b

serverSeed (revealed): 0x4010b5c7d16e0705d2cbc1f61713af1e53f3f0c176a628c452f287c2bcd18e92

chainBlockhash (revealed): Azw2nK5CgMybnniL1WGUnZZawKztzQmziqnpUsHEdtc4

chainSlot: 457862552

serverSeedHash: 0x0283206ea012650897e2fe9c1f414479cfa76a1b8f74a3fa6bb56f8532d9f55e

clientSeed: 0x104e19baeade51fb3ecb44e3e1cffbdb9564b6536a089a1b94557fc0a7e21851

serverSeed (revealed): 0xcc5a581a700d5efd3d5798ad02690280c0d69497e5585bd2afed10f037d9dbf2

chainBlockhash (revealed): Azw2nK5CgMybnniL1WGUnZZawKztzQmziqnpUsHEdtc4

chainSlot: 457862552

Rapid Firecancelled

serverSeedHash: 0xad70026bed425408d6b828b3e525939aedc8bf5c483c3910c979f581c7ba81cd

clientSeed: 0xb473bab584140858fdef86e55cce66e045798fb23e4071edf59423a0ffb54f70

serverSeed (revealed): 0xe8446dff809b7d156d282bd4d9409a36cbda858f03145be41b655265f60d8ba8

chainBlockhash (revealed): FDma42xRspj4jpqCxv5Di3eb3JySfHSa9phuy4EBWxfy

chainSlot: 457861169

Rapid Firecancelled

serverSeedHash: 0x6980c0f003c4df3783fd2dcd4a8b6d89aa88fb9351ba36858abce98571ae4738

clientSeed: 0xd0fb7414eedcc7c23568f9ae9e69ac7a5898c5c1b9e07b54360116117766b074

serverSeed (revealed): 0xd4d5cb4343f9da0b3f9b2a4e7bc4e2f563dc2afc7abd6163a0fc7b6451e3d9c3

chainBlockhash (revealed): J4tuLvTy2p5bkCrJTQJYq42thJj2h9otiJKhRuV44Cbs

chainSlot: 457859785

Rapid Firecancelled

serverSeedHash: 0xa483e47384a0f04f4d06004209546cd52719ed28a9f512f725036773da4b692c

clientSeed: 0xd423b90c810664b0943156a5f83d617395b1e4380395c0c801171727839a1839

serverSeed (revealed): 0x9a2ddc889b3a4c57424f3063ee1fcb45ceb1ec5ce4e70ba8ab2f8a6d7814ff8d

chainBlockhash (revealed): 5noqemrxcbqAytr53V2CMvu8soUmaCC8nEXyhgXTt74H

chainSlot: 457858391

Rapid Firecancelled

serverSeedHash: 0x99148332baff8a34161268e748396b0cec428eacb31ecec807a39a8897cee254

clientSeed: 0x851aeefe3624d1e3e928f90e27d009515a97ef6721628c1eeea7b360e68ff26f

serverSeed (revealed): 0x7ff6a9f2037f0d2bcff9f19a0191dee967f2edff03cf8e38299d3f75e75f1fd6

chainBlockhash (revealed): CyLN7eHeuxxG51tX7WMtFGyU67BsUCUBjNvbSp1nv7Md

chainSlot: 457857001

Rapid Firecancelled

serverSeedHash: 0x2b3a690569b6466f2e38b3f38a15c294dab47881387086cccaf35c2b306d4b64

clientSeed: 0xb72cf0baf449d01a279e2efe274b9c5d8b6cacbabd2986622c7eaa56c33c1105

serverSeed (revealed): 0x8dc28d19d41265e3ae36417f75e047e48c00060a4b33c5077bf75d3324098063

chainBlockhash (revealed): 76jQajEceVpCRJpVa5GbmXhJ25TVGhmkRTEC61ovZhSh

chainSlot: 457855601

Rapid Firecancelled

serverSeedHash: 0x6faa7b5e451076d040f863860df3ff4de48ab15cf38b5a476047b6ff7c8c1365

clientSeed: 0x7157c25e7fa9df6d0a3f99b268444d5a2e89b0c52891b57b082fd7463a042adb

serverSeed (revealed): 0x1e6926c731f0c9f8ac94e53094fddeb429ecc3835d5e16cb7a3149237046a3e8

chainBlockhash (revealed): GCZoLCH6pMffGiJfn6y1BSGMzNgKVAbKA6f13PXZEx45

chainSlot: 457854211

Rapid Firecancelled

serverSeedHash: 0x696e4ef0c089310f0351b99a62256575f8f11fd5e3a759ccea3c7055ab06cc21

clientSeed: 0x333dcededdcffaa1f7dbf802d5e86bba43a9bb1a2f3ae67deaf757c0f0c216fa

serverSeed (revealed): 0xf35f6767101551dc9454ab28603f6570c514a9b851ec68d27e64ef0d805d203e

chainBlockhash (revealed): 44aeMuQaogHgbtSYcBiDte71hERtXNYzLmHwUBH7nUdW

chainSlot: 457852828

Rapid Firecancelled

serverSeedHash: 0xdca2e495d550eb311c97098bbef66126cbbdbddbb3339306cd9b7ca5db42225d

clientSeed: 0x859b35a0fcb5cbb2ce1c8190a2e906c7a719e63daad1f794edd036a70bb0fc01

serverSeed (revealed): 0x045397b8bfe7c3f0952a3edc59507185230b3d2508b4733cf2d1f8ffc85ac7ab

chainBlockhash (revealed): DWAh6K3RFyD6sExvcqwZ9USrdjiWBhWLshzeBNbVFXkT

chainSlot: 457851429

Rapid Firecancelled

serverSeedHash: 0xbb558094bdcb33e566333926a118bb3f76e9580bee5a22f3129cd072b70c2b2c

clientSeed: 0x7bdad9140a3d19fed105ab0543c38f6f792b5eb62cf2b62f9df3fc44da8e7a30

serverSeed (revealed): 0x688ea8193c5550cfcb5a00d1d8c4d2f9fc41eb9072b0a00bf2d3bbee2851391b

chainBlockhash (revealed): 5t2m42KDijakZBtwpkCstVCVMboHptfme42F3QeBRMct

chainSlot: 457850059

Verifier