What the draw must deliver

For any slot and any lottery channel, every validator independently and identically decides which declared notes won, by a bit-reproducible computation whose inputs none of the prospective winners can write at the moment of use. The decision is made at L1, in universal operation validation, from L1 state alone, with no zone knowledge and no proof object. The protocol lead’s standing instruction governs the whole document: define the type of every input, and make every procedure precise enough that an implementer in any language gets the identical result.

The freezing claim, at its true width: every input a prospective winner can choose is frozen at the eligibility snapshot, 4.5 days before the epoch nonce is determined (MERGED timing, Cryptarchia). The nonce itself is consensus-written and in principle biasable by L1 leaders; that residue is an assumption, disclosed in the Inputs table, not a property.

The ticket

Canonical serialisation (PROPOSED). All conventions inherit from the merged transaction encoding (MERGED, transaction encoding: “All multi-byte integers use little-endian encoding”; UINT64 = 8BYTE; FieldElement = 32BYTE (little-endian)); the ticket introduces no new serialisation rule. The preimage is the concatenation of five fields, 119 bytes total; || means byte concatenation, no separators, no length prefixes; every field is fixed-width, so framing is unambiguous.

# Field Type Width Encoding Source of the value
1 domain_tag ASCII bytes 15 the exact bytes CHANNEL_LEAD_V1, no padding, no terminator this specification (PROPOSED)
2 eta FieldElement 32 little-endian, per the merged FieldElement rule the L1 epoch nonce for the draw’s epoch; a Poseidon2 output, hence a BN254 field element (MERGED, Cryptarchia: the nonce chain is zkHASH under domain separator EPOCH_NONCE_V1)
3 slot UINT64 8 little-endian the absolute L1 slot index being drawn for; the same u64 slot the block header carries (MERGED, Cryptarchia)
4 channel_id 32 bytes 32 verbatim, as stored the channel identifier (MERGED channel object, Mantle)
5 note_id FieldElement 32 little-endian the declared note’s identifier; note identifiers are zkHASH outputs, hence field elements (MERGED, Mantle)
ticket := BLAKE2b-256( domain_tag || eta || slot || channel_id || note_id )

The ticket is read as one unsigned integer: int_le(ticket) interprets the 32 output bytes as a little-endian unsigned 256-bit integer, defined here once; every later comparison uses it. Variants listed and killed: hashing the channel tip (written by the previous slot winner, so the draw’s inputs would intersect the elected set: the exact feedback loop the design exists to avoid), and a derived per-channel nonce (same information, same writers; channel_id already separates channels).

Hash choice. BLAKE2b-256, per the merged convention (MERGED, common cryptographic components): Poseidon2 “for arithmetic-oriented handwritten circuits”, BLAKE2b “for cryptographic hashing outside of zk-circuits”. The ticket is verified by native recomputation, never proven in a circuit, exactly as the merged derive_op_id is flagged “a classic hash not a zkhash” (MERGED, Mantle). BLAKE2b also emits a uniform 256-bit string matching the threshold scale and consumes the byte string above directly; Poseidon2 would force a field-order scale or rejection sampling, plus a canonical field embedding for every preimage field. Not a speed argument: every node computes Poseidon2 natively too.

One scale. The scale is 2^256, and no modular reduction exists anywhere in the pipeline. Reducing tickets modulo the BN254 field order inflates every win probability by about 13%, because 2^256 / p is about 5.29; scaling thresholds by the field order errs by the same factor. One sample space, one scale. This guardrail travels with the test vectors, because the reference implementation currently violates it; the conformance note below records the defect.

Test vectors are owed, matching the platform’s own byte-level vectors (MERGED, transaction encoding): (a) preimage bytes and ticket for a fixed (eta, slot, channel_id, note_id); (b) threshold values for each enumerated rate at several (v, D) pairs including v = D and v = 1; (c) a win/lose verdict per vector. None exist yet. A conformance defect, stated plainly: a reference implementation exists, and it draws tickets modulo the BN254 field order and scales its threshold by the field order. It is internally consistent (rejection-sampled uniform tickets against a field-order scale give unbiased probabilities, which is why its measured rates stand), but it implements a different rule from the one specified here; the specified rule has not been executed in any language, and aligning the implementation is owed with the vectors.

The threshold

The win condition in the reals is int_le(ticket) < 2^256 * (1 - (1-f)^(v/D)): PoL’s own win function, where f is the channel’s target rate, v the note’s declared value, and D the channel’s registered denominator; a note wins a slot with probability 1-(1-f)^(v/D). Since (1-f)^(v/D) is irrational in general, something must be normative, and the decision (PROPOSED) is to adopt the base layer’s own approximation, rescaled to 2^256.

The canonical procedure (PROPOSED, normative). All arithmetic is arbitrary-precision integer arithmetic; // is floor division; all named constants are unsigned integers. Shipped in the specification per enumerated rate f, computed once, offline, in high-precision real arithmetic:

A_f := floor( 2^256 * ( -ln(1 - f) ) )
B_f := floor( 2^256 * ( ln(1 - f)^2 / 2 ) )

Computed once per channel per epoch from the frozen denominator D (the channel’s total declared aged value, frozen at the eligibility snapshot; its ledger home and computer are specified inPCS X: Eligibility and Weight ; this section only consumes it):