The operator cannot bias which holder wins. The server seed is committed before the window closes; the roll is HMAC-SHA-256 of the resolved slot hash keyed by that seed, walked over the weighted holder snapshot. Recompute it here and check the winner yourself — we never ask you to trust our outcome flag.
The widget re-runs the same HMAC-SHA-256 the worker ran, confirms the revealed seed hashes to the pre-window commit, and compares the published roll. If our published roll diverges from what your browser computes, the badge turns red.
14 cards worth $4,308 opened this window — BoJb…bwy6 held 0.90% of the eligible snapshot and won the pot.
import { createHmac } from 'node:crypto';
// Mirrors the draw-runner's roll derivation.
export function raffleRoll(
serverSeedHex: string,
slotHashHex: string,
drawId: number,
): string {
const mac = createHmac('sha256', Buffer.from(serverSeedHex, 'hex'));
mac.update(Buffer.from(slotHashHex, 'hex'));
mac.update(Buffer.from(String(drawId), 'utf8'));
return '0x' + mac.digest('hex');
}
// Map the roll into [0,1), then walk the holder snapshot's weight
// prefix-sum (sorted by address, Merkle-committed) — the first holder
// whose cumulative slice covers the offset wins the whole pot.Node ≥ 20 · no dependencies · same output as the browser widget.