Campaign
A campaign is one scheduled draw: hourly, daily, weekly or monthly, at a time in its own time zone. It has a prize table, a number of winners per drawing, a payout wallet and an optional guarantee. It’s addressed by its slug, the last part of its public page address.
Drawing
Each run of the schedule is a drawing. Drawings are created about two days ahead. Each has:
drawAt: when the draw happens.
cutoffAt: the deadline for the winner list. Each campaign sets how long before drawAt its cutoff falls, from minutes to days.
number: its place in the campaign, 1, 2, 3 with no gaps. It’s given when the random value is requested, so an open drawing has none yet.
Winner
A winner is a string you choose, up to 200 characters, such as an id for the user. It can carry a display name and avatar for the campaign page. Those are shown only and are never part of the proof.
Winner ids are public in each draw’s proof. Use an id that can’t be guessed or linked back to a person: an HMAC of your user id with a secret key, or a random id you store. A plain hash of a sequential or public user id can be reversed by trying ids. Keep the key fixed for the life of the campaign, so the same user always maps to the same id, and never use emails or usernames.
Cutoff
Until the cutoff you can replace the list. At the cutoff it locks and its fingerprint is recorded. A drawing with no winners by its cutoff is flagged and waits until the cutoff is extended and the list arrives.
Prize table
A prize table splits a fixed number of rolls, such as 100,000, between prizes. Each winner rolls once, and the roll picks the prize. See Prize tables.
Guarantee
A campaign can guarantee at least one prize of a set size each period, for example $100 every 30 days. When a period ends without one, you pick which of that period’s winners gets it. See Guarantees.
Payouts
After each draw, the prizes below the campaign’s large-prize threshold go to your payout wallet as one USDC transfer on Base. Prizes at or above it are held, and Prizerail staff send them to the same wallet by hand after a check. Either way the money comes to you, and you pay your winners however your app does it: a transfer, in-app credit, or anything else.