← All tools

Dice Verifier

Online crypto dice is the ultimate pure probability game. This Dice Verifier shows you how to take your server seed, client seed, and nonce, and reproduce your exact rolls to confirm the game was 100% fair.

Dice Verifier

Roll is a float in [0, 100). Bet type "over X" wins if roll > X; "under X" wins if roll < X.
Roll
Multiplier @ this win chance

How crypto dice seeds are generated

Online dice games use simple, elegant seed structures to determine outcomes. When you click “Roll,” you aren’t spinning a real wheel; you are triggering a cryptographic hashing function. The casino pre-commits to a server seed, you provide a client seed, and the nonce tracks how many bets you have placed.

By merging these three inputs, the game outputs a hash that is mathematically converted into a number between 0.00 and 99.99. Because the server seed’s hash is displayed before you roll, the casino cannot alter the result after seeing your bet sizing.

The 4-Byte Standard: Almost all major crypto platforms (like Stake or Primedice) use a standard 4-byte chunk of your HMAC stream to generate dice rolls. This ensures the output is uniform, unbiased, and completely independent of previous wagers.

The math: From HMAC to a dice roll

Here is the exact step-by-step process used by the verifier to reproduce your roll:

1. Generating the HMAC-SHA256 string

The game combines your seeds and nonce to create a secure cryptographic stream:

HMAC_Stream = HMAC_SHA256(Server_Seed, "Client_Seed:Nonce:0")

This outputs a 64-character hexadecimal string representing a massive number.

2. Extracting the 4-byte float

The verifier extracts the first 8 characters (4 bytes) of the hex stream and converts them into a 32-bit integer:

Byte_Value = Hex_To_Decimal(First_8_Chars)

3. The float conversion

To turn this integer into a fraction between 0 and 1, we divide it by the maximum possible value of 4 bytes ($2^{32}$ or 4,294,967,296):

Float_Value = Byte_Value / 4294967296

4. The final roll scale

To scale this fraction to a standard dice range (between 0.00 and 99.99), we multiply it by 100:

Dice_Roll = Floor(Float_Value * 10000) / 100

If the first 4 bytes of your hash yield a decimal float of 0.485293, your roll is exactly 48.52.

Data Sandwich: Auditing a 98.00 roll

Let’s perform a manual check. You roll “Over 50.00” on Stake. The game results in a roll of 98.12, winning your bet. To double-check that the casino did not manufacture this result, you rotate your seeds and paste your details into this verifier:

  • Server Seed: 7d25e019c...
  • Client Seed: my_lucky_seed
  • Nonce: 42

The verifier runs the HMAC-SHA256 hash. The first 4 bytes yield the hex string fb2d45a2.

Converting this to decimal gives 4,214,048,162.

Dividing by 4,294,967,296 yields 0.981159.

Multiplying by 100 and flooring gives exactly 98.11 (or 98.12 depending on the site’s rounding rules). The math matches perfectly. Your win is cryptographically validated.

Frequently asked questions

Can the casino predict my next roll?

Only if you use their default client seed. If you do not customize your client seed, the casino knows the server seed and client seed in advance, meaning they could calculate your outcomes. Always enter your own client seed phrase to break their predictability.

What is the optimal over/under bet?

Mathematically, the expected value is exactly the same whether you bet Over 50.00 or Under 10.00—both lose exactly the house edge percentage. The only difference is the payout variance. To optimize your risk levels, explore our Dice Multiplier Explorer and read our comprehensive Dice strategy guide.

Why do dice rolls use 4 bytes?

Using 4 bytes provides $2^{32}$ (over 4.2 billion) unique combinations, ensuring the resulting decimal number has an extremely high precision and is distributed perfectly uniformly between 0.00 and 99.99.