← Back to lotto

Provably-fair proof

This page reproduces the winner computation from public inputs. You can recompute every step in your browser's DevTools — don't trust our math, verify it.

1. Pre-commit (server_seed_hash)

Published when the draw went live (2026-05-10T05:48:38.531Z).

219ce00ba4f1b1e76fcbb2cad683f70c19a2bef15c94b582c6fb3fb681169036

2. Reveal (server_seed)

Revealed after draw (2026-05-11T05:48:43.733Z).

d2c311a7204fcc0d7f998f3b663989dc474ae4b7811ece6428e1c9471ef18b64

Hash check: ✓ sha256(server_seed) === published hash

3. Client seed inputs (all sold eggs)

#WalletWinner?
1BGDKeT...iukC🎉

4. Derived client_seed

client_seed = sha256(sorted by entry_number, joined as "N:wallet" with '|')

182e87821c464303f9ca547fbdc445ede296b56a2b6764c7686189f7ccf0d562

5. External entropy (Bitcoin block)

Mixed into the HMAC input so the draw depends on a value the operator could not have known when the server seed was committed ( 2026-05-10T05:48:38.531Z). Any Bitcoin block mined after the commit works — we take the tip at draw time.

sourcemempool.spaceheight948,893hash00000000000000000001062a263d1b593446ea4fd079f3217af128b69dcbda96block time2026-05-11T05:48:02.000Z

Cross-check on mempool.space or blockstream.info.

6. Winner computation

HMAC-SHA256(server_seed, "client_seed:lotto_id:source:height:hash"), first 16 hex chars, mod sold_count (1).

hmac = 371496b863f6dbc11decd63b5d7f9ae86f3cc7fd472dbe0e808926c3945ad994

Computed index: 0 → winning egg: #1

7. Independent verification

Show JS snippet (paste into DevTools)
const seed = "d2c311a7204fcc0d7f998f3b663989dc474ae4b7811ece6428e1c9471ef18b64";
const hashStr = "219ce00ba4f1b1e76fcbb2cad683f70c19a2bef15c94b582c6fb3fb681169036";
const clientSeed = "182e87821c464303f9ca547fbdc445ede296b56a2b6764c7686189f7ccf0d562";
const lottoId = "f7d0bc3a-434e-482c-98f8-5483520da22c";
const sold = 1;
const entropy = "mempool.space:948893:00000000000000000001062a263d1b593446ea4fd079f3217af128b69dcbda96";

async function run() {
  const enc = new TextEncoder();
  const seedBytes = enc.encode(seed);
  const hashed = await crypto.subtle.digest("SHA-256", seedBytes);
  const recomputed = [...new Uint8Array(hashed)]
    .map((b) => b.toString(16).padStart(2, "0")).join("");
  console.log("hashOk:", recomputed === hashStr);

  const key = await crypto.subtle.importKey(
    "raw", seedBytes, { name: "HMAC", hash: "SHA-256" }, false, ["sign"]
  );
  const message = entropy
    ? clientSeed + ":" + lottoId + ":" + entropy
    : clientSeed + ":" + lottoId;
  const sig = await crypto.subtle.sign("HMAC", key, enc.encode(message));
  const hex = [...new Uint8Array(sig)]
    .map((b) => b.toString(16).padStart(2, "0")).join("");
  const idx = Number(BigInt("0x" + hex.slice(0, 16)) % BigInt(sold));
  console.log("hmac:", hex);
  console.log("winnerIndex:", idx);
}
run();