← 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-19T19:38:41.575Z).

3ac8a78ff7fa8fddb8d9a102f9feafc805fcd0d8f505c98d729449f743511984

2. Reveal (server_seed)

Revealed after draw (2026-05-20T19:39:31.609Z).

c5bedaacb5533501a67f115c93fb1e3bd9bedfe3150c224ca5768c1ed9c9aa07

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

3. Client seed inputs (all sold eggs)

#WalletWinner?
2BGDKeT...iukC
5BGDKeT...iukC🎉

4. Derived client_seed

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

78899620a8a7bd6f06a4dd9ab0ddae45c769aefc075d818c6dd0d500e7ddffad

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-19T19:38:41.575Z). Any Bitcoin block mined after the commit works — we take the tip at draw time.

sourcemempool.spaceheight950,276hash00000000000000000001aed886f2edb5274a5b0615b1a173122b4f2b0c351bdablock time2026-05-20T19:34:50.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 (2).

hmac = 869cd7e8e50b018b85c529133207ac53b8314ed71dffc3130f4b5aa7deb336f2

Computed index: 1 → winning egg: #5

7. Independent verification

Show JS snippet (paste into DevTools)
const seed = "c5bedaacb5533501a67f115c93fb1e3bd9bedfe3150c224ca5768c1ed9c9aa07";
const hashStr = "3ac8a78ff7fa8fddb8d9a102f9feafc805fcd0d8f505c98d729449f743511984";
const clientSeed = "78899620a8a7bd6f06a4dd9ab0ddae45c769aefc075d818c6dd0d500e7ddffad";
const lottoId = "0b898f0e-0717-4dd8-991d-9a0ee6353917";
const sold = 2;
const entropy = "mempool.space:950276:00000000000000000001aed886f2edb5274a5b0615b1a173122b4f2b0c351bda";

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();