Skip to main content
Every settled game exposes a proof with everything needed to recompute the winner: the commitment, the revealed server seed, the per-player client seeds and weights, and the nonce. Nothing is hidden, and the check below uses only the Python standard library — no Luckie code, no dependencies, no network.

1. Get the proof

Pull the proof JSON from the API:
Or open the human-readable proof page in the app: https://luckie.bet/games/<game_id>/proof.
On Windows, use curl.exe, not curl. In PowerShell, curl is an alias for Invoke-WebRequest, which has different syntax and will error on the URL (A drive with the name 'https' does not exist). curl.exe is the real curl, bundled with Windows 10+. If python isn’t found, try py instead.
It looks like this:
server_seed is null until the game settles. Before settlement you can only see the commitment server_seed_hash — which is the whole point: the outcome is sealed in advance.

2. The verifier

Save this as verify_fairness.py. It’s the exact algorithm Luckie uses, reimplemented with stdlib only so you never have to trust our code:
verify_fairness.py

3. Run it

A passing game prints:
If it ever prints FAIL, that’s cryptographic proof the result didn’t match its committed seed — and we’d want to know immediately.

How it works

1

Commitment check

sha256(server_seed) must equal the server_seed_hash that was published before anyone deposited. This proves the seed wasn’t swapped after the fact.
2

Deterministic outcome

The random integer is HMAC-SHA256(key=server_seed, msg=game_id | nonce | sorted player seeds). Players’ client seeds are mixed in after the server committed, so the server can’t grind a seed to force a winner.
3

Winner selection

Coinflip: players sorted by wallet, winner = outcome % 2. Jackpot: target = outcome % total_weight, then walk players (sorted by wallet) accumulating weight until target falls in a player’s band — so odds are exactly proportional to your buy-in.
The server reveals the seed only after settlement. Before that the outcome is sealed — neither the server nor any player can know or change it.