← 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 lotto went live (2026-04-16T02:46:11.875Z).

644b7183cd116fa0d24ab639823d181dc8ec729bae1b2cc98de5ecd518af165b

2. Reveal (server_seed)

Revealed after draw (2026-04-16T02:47:49.850Z).

2a6d1f925dfe8e9d07369e121e37098dce8c7357e49471ea852ae217d146b448

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

3. Client seed inputs (all sold tickets)

#WalletWinner?
1did:pr...1fei
2did:pr...1fei🎉
3did:pr...1fei
4did:pr...1fei
5did:pr...1fei
6did:pr...1fei
7did:pr...1fei
8did:pr...1fei
9did:pr...1fei
10did:pr...1fei

4. Derived client_seed

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

d42f066526a5fbd0e754b689f6b14cf29dc110f77566926eeacc0a5925a2031a

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-04-16T02:46:11.875Z). Any Bitcoin block mined after the commit works — we take the tip at draw time.

sourcemempool.spaceheight945,263hash00000000000000000000e43cf6d04fd506e31d88840d83d2ada5ead62c32ec00block time2026-04-16T02:42:42.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 (10).

hmac = 46e8152a90fd4d2feaa1893bc5739ceafebc0d5d38ae4a2bf57d0155f19b4080

Computed index: 1 → winning entry: #2

7. Independent verification

Show JS snippet (paste into DevTools)
const seed = "2a6d1f925dfe8e9d07369e121e37098dce8c7357e49471ea852ae217d146b448";
const hashStr = "644b7183cd116fa0d24ab639823d181dc8ec729bae1b2cc98de5ecd518af165b";
const clientSeed = "d42f066526a5fbd0e754b689f6b14cf29dc110f77566926eeacc0a5925a2031a";
const lottoId = "8f35d60b-83ae-4797-aaff-7fb992d0eff5";
const sold = 10;
const entropy = "mempool.space:945263:00000000000000000000e43cf6d04fd506e31d88840d83d2ada5ead62c32ec00";

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