lotto draw (read-only)
This page mirrors the original lotto flow but is served behind an Argon2-gated Rust edge. The content is static for now; wire it to the FastAPI endpoints when you are ready to run a live round.
Minimum participants
15
Commit window
21 days
Claim window
7 days
Hash gating
Argon2id (env)
Round status
pending / offline demo
Access
local-only session token
1. Register
Client computes Poseidon commitment & posts to /lotto/commit.
secret = random()
nullifier = Poseidon(secret, "nullify")
C = Poseidon(secret, nullifier)
POST /lotto/commit { commitment: C }
2. Close
Operator signs anchor for sorted Merkle root + drand target.
root R = Merkle(sorted(C_i)) anchor = H(R, N, drand_round_target) signature = Sign_operator(anchor)
3. Draw
Public recomputation with drand beacon.
B = drand(round_target) winner_idx = H(R, B) mod N
4. Claim
Winner reveals material and Merkle proof within claim window.
POST /lotto/claim
{ round_id, commitment, nullifier, leaf_index, merkle_proof[] }
5. Audit
Full transparency: commitments, roots, nullifiers.
GET /lotto/audit/{round_id}
Latest round snapshot
Merkle root: pending
Anchor hash: pending
Entries: 0 (demo)
Winner: pending
When the FastAPI lotto service is wired up, these fields will hydrate from the upstream audit endpoint. Until then, this page is a gated preview only.
Session note: your `/lotto` access token is issued by the Rust gate and stored in an HttpOnly cookie. To clear it, POST to
/lotto/logout or close the browser.