← 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-08T21:23:23.554Z).

dba223a2bb054b45a1a5409ded791e882189c5d933efef059260480095b01ee6

2. Reveal (server_seed)

Revealed after draw (2026-05-09T21:24:17.812Z).

30f21317bc0dc2e5dd0d31c29c9b1abd14801b206de25f5754e0e4558ae7b2ef

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

3. Client seed inputs (all sold eggs)

#WalletWinner?
198wwHt...VBYQ
2BGDKeT...iukC🎉
398wwHt...VBYQ
498wwHt...VBYQ

4. Derived client_seed

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

1c4157b4de6a4d49b9512e3d27757c8dea86239c1aa9f7ed2de3fa27c53deb05

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-08T21:23:23.554Z). Any Bitcoin block mined after the commit works — we take the tip at draw time.

sourcemempool.spaceheight948,673hash0000000000000000000199137142b9d6e12fea701b99b5d81b888bea69ede88bblock time2026-05-09T21:22:45.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 (4).

hmac = 3f22a7b4fc10cdad8013f121b6f66a6219a4c7659f22a645d957f58b640321d2

Computed index: 1 → winning egg: #2

7. Independent verification

Show JS snippet (paste into DevTools)
const seed = "30f21317bc0dc2e5dd0d31c29c9b1abd14801b206de25f5754e0e4558ae7b2ef";
const hashStr = "dba223a2bb054b45a1a5409ded791e882189c5d933efef059260480095b01ee6";
const clientSeed = "1c4157b4de6a4d49b9512e3d27757c8dea86239c1aa9f7ed2de3fa27c53deb05";
const lottoId = "00cd1fb4-f196-4f57-a38e-56fe8c2f1462";
const sold = 4;
const entropy = "mempool.space:948673:0000000000000000000199137142b9d6e12fea701b99b5d81b888bea69ede88b";

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