Part of the complete guide: Crypto lottery: the complete guide
The moving parts
| Part | What it does |
|---|---|
| Ticket contract | Sells tickets in a stablecoin and records who bought what |
| Prize pool | Holds the money; may include a seed jackpot or funds from liquidity providers |
| Randomness source | A verifiable random function or beacon that picks the winning ticket |
| Draw logic | Closes sales, requests randomness, selects winners and sets prizes |
| Payout logic | Lets winners claim, or sends prizes directly |
| Front end | The website or app that makes buying easy; the contract works without it |
A draw from start to finish
- 1A round opens. The contract sets a ticket price, often a dollar or a few dollars, and an end time.
- 2Players buy tickets with a stablecoin through their wallet. The contract records each ticket and adds a share of the money to the pool.
- 3At the end time, the contract stops sales so nobody can buy once the result might be known.
- 4The contract requests a random number from a verifiable source, such as Chainlink VRF or a public beacon.
- 5When the number arrives with its proof and passes verification, the contract uses it to pick the winning ticket or tickets.
- 6Prizes are made claimable by the winners, or sent to them, and a new round begins.
Chainlink's documentation describes VRF as generating random values with a cryptographic proof that is verified on-chain before an application can use them, so no single party can tamper with the result.
Where the jackpot comes from
Designs vary. In some, the jackpot is simply a share of ticket sales. In others, liquidity providers deposit funds that back the prize, in exchange for a share of ticket revenue, and take the risk that a large jackpot is paid out of those funds. This allows large advertised prizes with modest ticket sales, but means the economics depend on how liquidity providers are paid and protected. Read each project's documentation to see how prize pools and returns work.
What makes it fair, and what does not
- Verifiable randomness removes the operator's ability to pick winners.
- Tickets that close before randomness is requested remove the ability to buy with knowledge of the result.
- Contract-held funds mean the operator cannot simply take the pool, if there are no admin withdrawal functions.
- Immutable, audited code protects against rule changes and bugs. Upgradeable code needs trust in whoever holds the upgrade key.
- Fairness of the draw does not tell you the odds are good, the payout share is high or the game is legal where you live.
Risks specific to on-chain lotteries
- Smart-contract bugs. Even audited contracts can fail.
- Admin keys. An owner who can upgrade or pause can still hurt players.
- Oracle or randomness failure. The contract needs a safe fallback if randomness does not arrive.
- Stablecoin risk. A depeg changes the value of tickets and prizes.
- Regulation. Operators and sometimes players may face legal limits depending on country.
- Phishing. Fake front ends are common. Verify the contract address from the project's official channels.
A checklist before you play one
- 1Confirm the contract address from the official site and a second source.
- 2Check the code is verified on a block explorer, and read the audit summary.
- 3Find out who holds admin keys and what they can do.
- 4Understand the randomness source and when it is requested.
- 5Check the payout share, fees and how prizes are claimed.
- 6Start with the smallest ticket purchase and keep your wallet budget separate.
- 7Check that it is legal for you to play.
Ready?
A weekly draw you can check yourself.
$5 tickets, a public random value, and every result published with the data to recompute it.
Frequently asked questions
Are on-chain lotteries safer than operator-run ones?
They remove some trust in the operator and add trust in code. Safety depends on audits, key control and randomness design.
Do on-chain lotteries pay winners automatically?
Some pay directly and some require the winner to claim. Check the specific game.
Why use stablecoins for tickets?
They keep the ticket price and prizes steady in dollar terms.
Can I verify an on-chain draw myself?
Usually yes: the ticket purchases, randomness request and result are all on a public block explorer.