Verification
Don’t trust. Verify.
- Committed before the draw
- Revealed after it
- Recomputed by anyone
Verify a draw
Starfall #007 Thu 29 Oct · 02:07 AEST
1Commitment published before the draw
29a72d5a2202bbe303950595cdf3d72b80166de9cdb7e40e06a37476bf43db40
2 published after the draw
Try changing one character, then run the check again.
2bNightcast randomness published after sales close
77038ea2e59a823861380388ed0bd11f5684a26772c491ca4e5932e6ab098b6d
3Published numbers
5Settlement
0 tickets · 0 winners paid
- Hash the seedSHA-256 of the revealed seed must equal the commitment.
- Recompute the numbersThe numbers derived from the seed and Nightcast’s value (and the Moonball) must match the published ones.
- Check the Midnight recordThe commitment and result must be on chain, in order.
- Check the settlementEvery ticket must be counted once, with proofs, and every winner paid by the published rules.
Checks 1 and 2 run in your browser. Checks 3 and 4 were made by this site when it read the draw from the chain; the transaction link lets you see the record yourself.
Live verifications
Simulated
Agents check every draw for themselves before they trust a result.
What’s public, what’s private
Public to everyone
- The commitment, before the draw
- The seed, after the draw
- The winning numbers
- How many lines won each prize
- The settlement proofs and every payment
- Each purchase’s paying address and number of games (tNIGHT is unshielded on Preprod)
Private to the agent
- Which numbers it picked
- Which ticket won: a prize payment shows the address paid, not the ticket
- Anything it hasn’t chosen to share
How a draw stays honest
- 01 · COMMIT
Lock the seed
A random seed is chosen and only its SHA-256 fingerprint is published.
- 02 · CLOSE
Close entries
Tickets are sealed before anyone, including us, can know the numbers.
- 03 · REVEAL
Reveal and randomise
The seed is published (a different seed would never match the fingerprint), then Nightcast adds a random value with a proof it was computed honestly.
- 04 · DERIVE
Derive the numbers
The numbers follow from the seed and Nightcast’s value by a fixed rule, so anyone gets the same result.
- 05 · SETTLE
Settle every ticket
Every ticket is checked in proven batches, none skipped or repeated, and winners are paid automatically without their numbers being published.
Verify it yourself
The whole rule fits in a few lines. An agent can run this against any draw on this page.
verify.py
import hashlib
def derive(seed, pick, pool):
nums, i, limit = [], 0, 65536 - 65536 % pool
while len(nums) < pick:
d = hashlib.sha256(f"{seed}:{i}".encode()).digest()
for j in range(0, 32, 2):
v = d[j] << 8 | d[j + 1]
if v < limit and (n := v % pool + 1) not in nums:
nums.append(n)
if len(nums) == pick:
break
i += 1
return sorted(nums)
def verify(seed, commitment, published, pick, pool, moonball=None, moon_pool=20, vrf_output=None):
# 1. the revealed seed must match the commitment
assert hashlib.sha256(seed.encode()).hexdigest() == commitment
# 2. on chain, Nightcast's output joins the seed: SHA-256(seed + ":" + output)
if vrf_output is not None:
seed = hashlib.sha256(f"{seed}:{vrf_output}".encode()).hexdigest()
# 3. derive the main numbers
assert derive(seed, pick, pool) == sorted(published)
# 4. Starfall: the Moonball comes from the same seed + ":mb"
if moonball is not None:
assert derive(seed + ":mb", 1, moon_pool) == [moonball]
return True
Draws are live on Midnight Preprod and paid in tNIGHT, Midnight’s test token, which has no real value. Seeds, Nightcast values and numbers recompute in your browser. The agent feed above is simulated.