How fairness works
This page describes what the code does today (v0.42) — not a promise. Storm devnet, test tokens with no money value. Where something is not guaranteed yet, it says so.
Two kinds of tables, two proofs
| Tables vs house bots (in your browser) | Multiplayer & REAL tables (table server) | |
|---|---|---|
| Who shuffles | Your browser | The table server |
| Randomness | Storm beacon + table entropy | Storm beacon of a future block + server secret + a secret for every seated player |
| On Storm | The finished hand record's SHA-256 (LIONESS/v1|hash) in a Storm tx, seconds after the hand | HAND_OPEN (commitments) before the deal, HAND_CLOSE (reveals + full action log) right after — status below |
| Verify | The Proof button in your hand history | The Verify a hand tool on this page, or realtime/verify.cjs |
Table-server hands: the protocol (LIONESS/v2, "level 1")
1. Commit serverSecret = 32 random bytes serverCommit = SHA-256(serverSecret)
for every seated player p: secret_p commit_p = SHA-256(secret_p)
root = SHA-256(canonical sorted list of all commits)
2. HAND_OPEN tx on Storm (before any card exists):
LIONESS/v2|open|table|handNo|root|targetHeight|{serverCommit, commits, roster, button, cfg}
targetHeight = (latest Storm height when committing) + 8 blocks (~1.6 s at 200 ms/block)
The server deals ONLY if the HAND_OPEN tx was included in a block BELOW targetHeight; otherwise the
hand is void (nothing dealt) and a new one is opened. Roster/button changes while waiting → void.
3. Beacon R = Storm beacon value at targetHeight (a threshold-BLS signature of the validators)
4. Deal seed = SHA-256( R | serverSecret | sorted(player secrets) joined by '|' )
deck = Fisher–Yates over 2s 2h 2d 2c … As Ah Ad Ac, j = word mod (i+1), words from the chain
h₁ = SHA-256(seed), h₂ = SHA-256(h₁), … (eight 32-bit words per hash)
5. HAND_CLOSE tx right after the hand:
LIONESS/v2|close|table|handNo|{serverSecret, clientSecrets, seed, deckHash, actionsHash,
resultsHash, results, actions}
6. Verify anyone: commitments match the secrets, open block < targetHeight, seed from the real beacon,
deck → replay every action with the game engine → same cards, pots and stacks; chips conserved.
What is guaranteed
- ✓ Nobody — not the house, not a player — can pick or predict the deck before the deal. The secrets are fixed on Storm (HAND_OPEN) before the beacon value at
targetHeightexists. The deck depends on that value, which no single party can choose or know in advance (with the caveat about today's devnet validators below). - ✓ The server can't "re-roll": changing the server secret after the commit fails the commitment check; skipping a hand it doesn't like leaves a public orphan HAND_OPEN without a close.
- ✓ Every hand is replayable after it ends: cards, board, every action, pots, rake, final stacks — recomputed from public Storm data, not from our database.
- ✓ House bots can't cheat with hidden information: each bot decision is derived from
HMAC(serverSecret, hand|seat|n)and only its own cards + public table state; the verifier re-derives every bot decision.
What is NOT guaranteed (yet) — honestly
- ✗ The house could see hole cards during the hand. It cannot pick them. In this level-1 design the server computes the deck to deal it, so the server knows every card while the hand is played. A dishonest operator could in principle use that knowledge (e.g. tell a player). The cards themselves are still fixed by the beacon and fully auditable afterwards.
- ✗ Player secrets are currently generated by the server. The protocol accepts a secret from each player's browser (
secretmessage, committed in HAND_OPEN), but today's site does not send one yet, so the server creates the per-player secrets. The beacon alone already makes the deck unpredictable to everyone; player-supplied secrets are an extra layer that is not active yet. - ✗ Beacon trust on devnet. Storm's own RNG guide: "The guarantee that nobody can know Rx early depends on the validator set: on today's devnet 2, whose 7 validators are run by one operator, that operator could." That operator is Storm, not Lioness. Production needs Storm's independent validator set.
- ✗ Liveness is not enforced by a contract. If the server stops mid-hand there is no on-chain penalty; REAL chips are protected by the cashier contract and recovery, not by the fairness log.
- ✗ Beacon signature check in your browser. The verifier below reads the beacon value from Storm's API; it does not yet check the BLS signature against the pinned group key (Storm's guide describes that check).
LIONESS/v3 — hands that don't wait for Storm (PLAY tables; REAL and tournament tables stay on v2 for now)
When a table server runs v3, the verifier below shows "LIONESS/v3" and the claim "seed committed on Storm before the deal" does not apply to those hands. Instead:
- ✓ Server randomness is fixed in advance: per day the server commits to 65,536-step hash chains (one per table slot); the Merkle root of the chain heads is published on Storm. Hand k uses the k-th chain value, revealed after the hand; anyone checks it walks back to the published head. The server cannot pick or re-roll it.
- ✓ Your browser adds its own secret before every deal and gets a signed acknowledgement; the hand must contain it (omission is provable with the ack your browser keeps). No reveal round, so withholding is impossible.
- ✓ Signed deal receipt at the deal, then every hand is sealed on Storm inside a sequence-linked Merkle batch (≤ 64 hands or 20 s). Badge: ✓ sealed · ⏳ sealing · ⚠ provisional (epoch root not yet on Storm).
- ✓ Latest Storm block mixed in: at the deal the server also mixes the hash of the newest Storm block it already knows (number + hash are in the hand record and in the signed deal receipt; your verifier re-reads that block from Storm). The block is public extra entropy — it ties every hand to a moment on the chain and gives the server one less thing it controls, but it is not what makes the deal unpredictable: that comes from the secret, pre-committed hash chain plus your browser secret. The deal never waits for a block; if Storm is slow the last known block is used (marked "stale") or none.
- ✗ What is lost vs v2: no public future beacon in the seed. A player who sends a secret is protected as before; hands without any player secret (e.g. bot-only) rely on the server's pre-commitment alone. A hand is final on Storm up to ~60 s after it ends (longer during a Storm outage); REAL cash-outs wait for their hands to be sealed (max 10 min, then proceed and are flagged for review). Unchanged: the server knows the cards during the hand (level 1).
Level 2 — roadmap
- Browser secrets on: every client sends
secretbefore each hand (protocol already supports it). - Mental poker: the deck is encrypted and shuffled by every player in turn (commutative encryption + zero-knowledge shuffle proofs); each hole card is opened only with the owner's key, so the server never sees your cards.
- Beacon BLS verification in the browser and in
verify.cjsagainst Storm's pinned group key. - On-chain liveness: a timeout/claim path so an abandoned hand settles from its last proven state.
Storm's randomness beacon
Storm produces a public random value Rh in every block (~200 ms): a threshold BLS signature by the validator set over (chainId, h, Rh−1), with Rh = SHA-256("STORM-BEACON-R|" ‖ σh). Blocks are final when produced (no reorgs). API: GET /v1/beacon/{height} (404 "not yet formed" for future heights). Sources: Storm RNG protocol & developer guide, Storm documentation. Lioness uses the beacon directly (its own commit-reveal above), not Storm's StormRngAnchor ticket protocol.
Verify a hand
Paste a hand id from your history (table#handNo, e.g. usdt-cub-6#42) — or the HAND_OPEN and HAND_CLOSE tx hashes. Everything is recomputed in this browser from Storm data.
Hands vs house bots: open your hand history → Proof (record hash in a Storm tx + in-browser replay).
Storm devnet · test tokens only · no real-money value