PROVABLY FAIR
Verify every game outcome mathematically using cryptographic HMAC-SHA256
100% Verifiable
Fairness Calculator & Verifier
Verify On 3rd-Party Tools & Scripts
You do not need to take our word for it. Every outcome on our platform can be independently verified on any external cryptographic platform (such as CyberChef, Python, Node.js, or Replit) using the standard industry formulas below:
The Mathematical Formula
1. Hash Verification: SHA256(serverSeed) == serverSeedHash
2. HMAC String: HMAC-SHA256(key = serverSeed, msg = "client_seed_donut:1:0")
3. Provable Float: parseInt(HMAC[0..8], 16) / 2^32
Python Script (Run Locally or in Browser)
import hmac
import hashlib
server_seed = "4a2b9f87e6d5c4b3a291807f6e5d4c3b2a109876543210fedcba9876543210ab"
client_seed = "client_seed_donut"
nonce = 1
sub_index = 0
# Step 1: Verify SHA-256 Hash of Server Seed
server_seed_hash = hashlib.sha256(server_seed.encode()).hexdigest()
print(f"Verified Server Seed Hash: {server_seed_hash}")
# Step 2: HMAC-SHA256 Outcome Generation (matches Stake / DonutFlip)
msg = f"{client_seed}:{nonce}:{sub_index}".encode()
hmac_digest = hmac.new(server_seed.encode(), msg, hashlib.sha256).hexdigest()
# Step 3: First 32 bits (8 hex characters) divided by 2^32
int_val = int(hmac_digest[:8], 16)
float_val = int_val / 4294967296.0
print(f"HMAC Digest: {hmac_digest}")
print(f"Provable Float [0, 1): {float_val:.8f}")
# Example game outcome (Dice):
dice_roll = int(float_val * 10000) / 100.0
print(f"Dice Result: {dice_roll:.2f}")
Node.js / JavaScript (Terminal)
const crypto = require('crypto');
const serverSeed = '4a2b9f87e6d5c4b3a291807f6e5d4c3b2a109876543210fedcba9876543210ab';
const clientSeed = 'client_seed_donut';
const nonce = 1;
const subIndex = 0;
// 1. Verify SHA-256 Hash
const serverSeedHash = crypto.createHash('sha256').update(serverSeed).digest('hex');
console.log('Server Seed Hash:', serverSeedHash);
// 2. Compute HMAC-SHA256
const hmac = crypto.createHmac('sha256', serverSeed);
hmac.update(`${clientSeed}:${nonce}:${subIndex}`);
const digest = hmac.digest('hex');
// 3. Convert first 4 bytes to float in [0, 1)
const intVal = parseInt(digest.substring(0, 8), 16);
const floatVal = intVal / 4294967296;
console.log('Provable Float:', floatVal);
console.log('Dice Outcome:', Math.floor(floatVal * 10000) / 100);