Random numbers nobody can rig.
Nightcast gives apps on Midnight random values that arrive with a proof. Anyone can check where a number came from. Nobody, including us, can predict it or change it.
On Midnight Preprod
- Serving committee
- Epoch 6, 3 of 5
- Operators
- 5 active
- Contract calls proved
- 18 of 18
Every number, start to finish
Apps ask. Operators answer. Each value hatches its own creature and swims back to whoever asked, and the fee goes to the operators who answered in time.
A simulation: the requests, values and results here are made up in your browser. The real ones are on the Network page.
A smart contract can't roll dice. Everything on a blockchain is visible and predictable, so a fair random number has to come from outside, from something nobody controls and everybody can check.
How it works
-
Your app asks
It sends a request on Midnight, sealing what the number is for (a draw, a round, a list of entrants) before anyone can know the answer.
-
Operators answer
Each operator holds a share of a secret key. Any three of five combine their answers into the one value the key allows, so no one can pick a result.
-
The proof goes on chain
A zero-knowledge proof shows the value was made correctly, and Midnight's validators check it before it's accepted.
-
Anyone checks
The request, the value and the proof are public. Our SDK or a certificate page confirms them in a second, without trusting us.
Try a fair draw
Put in some names and draw a winner from the value above. Run it again, on any computer, and you get the same winner: the result depends only on the names and the published value.
A demonstration in your browser. In a real draw, the list is sealed on chain before the value exists, so nobody can rearrange it after seeing the answer.
Built for anything that needs chance
-
Games and lotteries
Dice, cards, draws and prize pools whose results players can check for themselves.
-
Giveaways and raffles
A public certificate for every winner, so nobody can say the draw was rigged.
-
AI agents
Fair choices with no person in the loop, through Nightcast's MCP server.
-
Midnight builders
A TypeScript SDK and a Compact module: picks, shuffles, dice and weighted prizes from one value.
Three steps to a fair draw
Seal the list, ask for a value, pick the winners. The SDK turns one value into picks, shuffles, dice or weighted prizes, and anyone can repeat it to check.
Start building Developer guide Source on GitHub @nightcast/sdk on npm
import { listCommitment, pickMany } from '@nightcast/sdk';
const entrants = ['Ava', 'Ben', 'Chloe', 'Dev', 'Ella'];
// 1. Seal the list: its fingerprint is the request's seed.
const seed = listCommitment(entrants);
// 2. Nightcast answers on chain with a value and its proof.
// 3. The same value always gives the same winners.
const winners = pickMany(output, entrants, 2);
Trust spread across stake pools
Nightcast's first oracle answers alone, and its proofs already stop it choosing a result. The threshold network goes further: it is built so that a committee of Cardano stake pool operators makes every value. Any three of five, or four of seven, can produce it, and fewer than half of a committee can neither know a value early nor stop one. On the test network our own operators fill the committee for now.
All of this runs on Midnight's test network and hasn't been audited yet. Mainnet follows an independent security audit.
- The operators run the network by themselves: a new committee opened, seated and keyed, and a request answered, settled and paid, with nobody at the controls.
- A smaller committee forms after a silent operator is stood down. The operator package is built.
- The first committee handover, the first fines for operators who stayed silent, and the last of the contract's 18 calls proved on chain.
- The threshold network's first random value. Its operators are paid.
- Nightcast v1, with request fees and oracle bonds. It answers LunaSpin's spins.
- The first Nightcast oracle passes a 24-hour run on Midnight's test network, answering every request on time.
Run a Nightcast operator
Stake pool operators earn a share of every request's fee. One Docker set-up, a small bond and a signature from your pool; then it answers requests and keeps the network moving by itself.
Get early access
Nightcast is free to try on the test network now. Leave your email and we'll help you set it up, and tell you when Mainnet opens.
We only use your email for Nightcast early access. We don't share it. Privacy