You can check any past dice bet once the server seed has been revealed. There are two checks: that the seed matches the hash you were shown, and that the seed, your client seed and the nonce produce the roll you got. This page walks through both with real numbers. You can follow along in the Woyale dice verifier.
This page assumes you know the terms in seeds and nonces.
What you need
- The hashed server seed shown before you bet (note it down at the time).
- The revealed server seed, available after you rotate.
- Your client seed, exactly as it was during the bets.
- The nonce for the bet you want to check.
- The roll the site reported for that bet.
The formula
The Woyale verifier uses this method:
- Compute HMAC-SHA256 with the server seed as the key and the text
clientSeed:nonce:0as the message. This gives 32 bytes. - Take the first four bytes, b0 to b3.
- Compute f = b0/256 + b1/256² + b2/256³ + b3/256⁴. This is a number from 0 up to, but not including, 1.
- Roll = floor(f × 10001) / 100.
Multiplying by 10001 gives 10,001 equally likely outcomes, 0.00 to 100.00 in steps of 0.01. HMAC is specified in RFC 2104 and SHA-256 in NIST FIPS 180-4.
Worked example
These are demonstration values, not from any real site.
- Server seed:
woyale-demo-server-seed-0001 - Client seed:
my-own-client-seed - Nonce: 1
Step 1: Check the commitment
Hash the server seed with SHA-256. The result is:
d43760ee103126a1c9e5c6806eb10e766aeaea9086380844f0b231c7325699ab
Compare it with the hashed server seed the site showed you before betting. If they differ in even one character, stop: the site did not use the seed it committed to.
Step 2: Build the message
The message is the client seed, a colon, the nonce, a colon and the cursor 0:
my-own-client-seed:1:0
Step 3: Compute the HMAC
HMAC-SHA256 with the server seed as key over that message gives:
40e6f3933984464b009a5c6e1904517b03a3b4a3643b71ae9eb2b4054cf4859c
Step 4: Convert the first four bytes
The first four bytes are 40 e6 f3 93. In decimal: 64, 230, 243, 147.
| Byte | Value | Divided by | Contribution |
|---|---|---|---|
| b0 | 64 | 256 | 0.25000000 |
| b1 | 230 | 65,536 | 0.00350952 |
| b2 | 243 | 16,777,216 | 0.00001448 |
| b3 | 147 | 4,294,967,296 | 0.00000003 |
Sum: f = 0.25352404 (to eight places).
Step 5: Get the roll
f × 10001 = 2535.49. Take the floor, 2535, and divide by 100. The roll is 25.35.
If the site reported 25.35 for your first bet, it matches. For reference, the next two nonces with the same seeds give:
| Nonce | HMAC, first four bytes | Roll |
|---|---|---|
| 1 | 40e6f393 | 25.35 |
| 2 | 38d25fb7 | 22.19 |
| 3 | a6b8d4e0 | 65.13 |
Paste the same three values into the dice verifier and it should show these figures. If you change my-own-client-seed by one letter, the roll changes completely.
Why two checks, not one
The roll check alone proves little. A dishonest site could pick a fresh seed after your bet and show you a roll that matches it. The commitment check in step 1 closes that gap, because the hash was in your hands before you played. Do step 1 first, every time, and keep a screenshot or note of the hashed seed from before you bet. If you only look at the hash after the fact, you are trusting the site’s word on what it showed earlier.
Check it in code
If you want a second opinion that does not rely on a web page, this Python snippet reproduces step 3 to step 5 using only the standard library:
import hmac, hashlib, math
server, client, nonce = "woyale-demo-server-seed-0001", "my-own-client-seed", 1
digest = hmac.new(server.encode(), f"{client}:{nonce}:0".encode(), hashlib.sha256).digest()
f = sum(digest[i] / 256 ** (i + 1) for i in range(4))
print(math.floor(f * 10001) / 100) # 25.35
When the numbers do not match
Work through these in order:
- Copy the seeds again. A stray space or a different capital letter changes everything.
- Check the nonce base. Some sites count from 0, others from 1.
- Make sure you used the client seed that was active at the time of that bet, not the one you set later.
- Read the site’s fairness page. Sites use variants: a different separator, a prefix, more bytes, a different multiplier, or a different map from number to result. The formula above is one common version, and it will not match every site.
If you have checked all of those and the result still differs, take screenshots of the bet, the seeds and the site’s documented method, and contact the site. Offshore sites are unlicensed in the US, so there is no state regulator to escalate to. See are offshore sportsbooks legal.
Common questions
Do I have to verify every bet?
No. Checking a sample is enough to confirm the site follows its stated method. Always verify the commitment (step 1) for the seed pair, then a few bets, including any large wins.
Why can’t I verify a bet right away?
The server seed is secret until you rotate. Rotate, then verify. See the rotation section in seeds and nonces.
Does a matching roll mean the site is trustworthy?
It means that roll was calculated as documented. It does not show that payouts, withdrawals or odds are honest. Read what provably fair doesn’t prove.
