Provably Fair
Every BC Originals result can be checked with the server seed, the client seed and the nonce. Pick a game to see how its result is calculated.
Hash Dice
ValidateIs HashDice a fair game?
We are a fair and transparent betting platform, aiming to eliminate all unfair factors and let players have fun, provides HashDice with provable and verified system that allows each game fair in encrypted way.
In order to allow players to verify their bets, a pair of Server Seed and Client Seed is used to calculate a roll number.
Knowing Server Seed, Client Seed and Nonce it's possible to calculate bet result. To prevent a player from result prediction, Server Seed is hidden, and a SHA-256 hash of the seed is shown instead. After next randomization, previous Server Seed is revealed and a player is able to verify the bet. Also, players can make sure that Server Seed wasn't changed by comparing their hashes before and after randomization.
How is the data calculated?
To generate a roll number between 0 and 99,999:
- First we calculate the hash value of the combination with HMAC_SHA512. This gives us a 64-character hexadecimal string: hash = HMAC_SHA512 (clientSeed:nonce, serverSeed).
- We then take the first 5 characters of that hash and convert them to a decimal number ranging from 0 to 1,048,575 (16 ^ 5 - 1). If it is less than 1 million, we divide it by 100,000 and use it as your roll outcome. Otherwise, we repeat using the next five characters. We are able to repeat the process up to 25 times.
- In the very rare case ((48,576 / 1,000,000) ^ 25) that none of the 25 trials are lower than 1 million when converted to decimal, we use the remaining 3 characters and convert them to your roll number.
Code Example
The following code example can be used to verify a bet:
function getRoll (serverSeed, clientSeed, nonce) {
var hash = hmac_sha512(clientSeed:nonce, serverSeed);
var index = 0;
do {
var lucky = parseInt(hash.substr(index, 5), 16);
index += 5;
} while (lucky >= 1000000);
return lucky % 100000;
}Please also check our online bet verify .
Tip: A new seed must be set to verify the previous data (the server seed is encrypted).