Play now

How to verify your bet is provably fair: step by step

Published Updated X3NA teamHow we count6 min

TL;DR
  • You need 4 values: the server seed hash from before the bet, the revealed server seed, your client seed and the nonce.
  • Two checks: SHA-256(server seed) equals the hash you saw, and the recomputed result equals your bet history.
  • Test vector: server seed def, client seed abc, nonce 1 gives k = 1,849,153,629 and a Dice roll of 43.05. Any HMAC calculator returns the same.

What do you need to verify a bet?

To verify a provably fair bet you need 4 values and about two minutes: the hash of the server seed shown before the bet, the server seed itself once it is revealed, your client seed and the nonce. With those four you can recompute the round on your own device.

ValueWhere it comes fromWhen you see it
Server seed hashThe server's commit: SHA-256 of its seedBefore the bet
Client seedYours; you can change itBefore the bet
NonceThe bet counter within the current seed pairWith each bet
Server seedThe server's secretAfter you rotate the seed pair

The order is the whole point. The hash is fixed before you bet, so the server cannot swap the seed later. Your client seed is mixed in, so the server cannot pick a seed that suits it in advance.

How do you verify a bet in five steps?

  1. Save the hash before you play. Open the fairness panel of the game and copy the server seed hash: 64 hex characters.
  2. Play, then note the bet. From the bet history take the client seed, the nonce and the result.
  3. Rotate the seed pair. The server reveals the old server seed and commits to a new one. Bets made with the old pair can now be checked.
  4. Open the verifier. Pick the game and paste the server seed, its hash, the client seed and the nonce. Add the result from your history to check that too.
  5. Read the answer. The verifier shows the outcome and every step of the calculation.
X3NA verifier with the Dice test vector filled in and the result: round is fair

The verifier runs in your browser and sends nothing to a server. You can disconnect from the internet after the page loads and it still works.

What does the result mean?

The verifier saysWhat it means
Round is fairThe seed matches the hash and the result matches your history
Seed matches the hashThe commit holds; add the result from your history to check it too
Server seed does not match the hashThe seed is not the one committed. Check for a typo first
Result differs from your historyThe recomputed outcome is different. Check the nonce and the game mode

A mismatch is most often a typo or a nonce off by one. If every field is right and it still fails, that is a real finding: save the values and write to support.

Can you check the maths without our verifier?

Yes, and you should be able to. The functions are standard: SHA-256 and HMAC-SHA256. Take the public test vector:

StepValue
Server seeddef
SHA-256(server seed), the commitcb8379ac…f96c5b34
Client seed, nonceabc, 1
Messageabc:1:0
HMAC-SHA256(key def, message), first 4 bytes6e37d85d
k, those bytes as a number1,849,153,629
Dice: ⌊k × 10,000 / 2³²⌋ / 10043.05

Paste def as the key and abc:1:0 as the message into any independent HMAC-SHA256 calculator. The output starts with 6e37d85d. Convert it from hex to decimal and you get the same k. The Dice roll, the Limbo result and the Storm Vault outcome all come from that one number; the formulas are on the provably fair page.

What differs from game to game?

  • Crash has no client seed and no nonce, because one round is shared by all players. The result comes from SHA-256 of the server seed and the round id, and the seed is revealed as soon as the round ends. Take the round id from the Crash round history.
  • Nonce start. In Plinko and Lucky Wheel the nonce counts from 1; in the other games from 0.
  • Extra fields. Plinko needs the mode, Lucky Wheel the mode and the number of segments, Dice the direction and chance, slots the bet mode and maths version. They are shown with the bet.

Checking a round proves the result was not changed after your bet. It does not change the RTP: a fair game still keeps its house edge.

FAQ

Why can't I see the server seed right away?

If you knew it before betting, you could compute every result in advance. You see its hash first and the seed after you rotate the pair.

Do I have to check every bet?

No. The point is that you can check any bet, and the server does not know which one you will pick.

Should I change the client seed?

You can at any time. A seed you typed yourself is the simplest proof that the server did not choose it for you.

Can a predictor use this to guess the next round?

No. Before the round only the hash is public, and a hash cannot be turned back into the seed.

Check a round of your own

Play a few rounds in the demo, then recompute one.

Start with Dice: one number per roll, the easiest result to recompute by hand.

Sources

Updated X3NA team18+Play responsibly