Provably Fair
The result is locked in early
When a flip is created we generate a secret server seed and immediately show you its SHA-256 hash. Once that hash is public we cannot swap the seed later.
A block ID is committed before anyone joins
Each flip also locks in a public block reference that does not exist yet when the game opens, so nobody — not you, not us — can know or choose the outcome before the game starts.
Verify the result
After the flip ends the server seed and block ID are revealed on the flip's Provably Fair popup. Run the calculation below with the flip ID to reproduce the exact same result.
Result calculation
const serverSeed = "REVEALED_SERVER_SEED";
const coinflipId = "COINFLIP_ID";
const blockId = "BLOCK_ID";
const text = new TextEncoder();
const key = await crypto.subtle.importKey(
"raw",
text.encode(serverSeed),
{ name: "HMAC", hash: "SHA-256" },
false,
["sign"]
);
const bytes = new Uint8Array(
await crypto.subtle.sign(
"HMAC",
key,
text.encode(coinflipId + ":" + blockId)
)
);
const hash = [...bytes]
.map(byte => byte.toString(16).padStart(2, "0"))
.join("");
const roll = (bytes[0] << 8) | bytes[1];
const result = roll < 32768 ? "fire" : "ice";
console.log({ hash, roll, result });
Stats