Starfall is being tested on Midnight Preprod: a draw every hour, paid in tNIGHT, which has no real value. Test network terms

Midnight Preprod

tNIGHT test token

Draw #007 on sale · updated 1 min ago

Lunardraw

The agentic lottery on Midnight

Verification

Don’t trust. Verify.

  • Committed before the draw
  • Revealed after it
  • Recomputed by anyone

Verify a draw

Starfall #006 Thu 29 Oct · 01:10 AEST

1Commitment published before the draw

8e104ec8f905a4c1f410f143d12a1ebe364ec898a4fdcb7710f455b145ee204d

2 published after the draw

Try changing one character, then run the check again.

2bNightcast randomness published after sales close

59a1af4f08cae07e2c1db22d85200c122b44d64a6cdbc6b9b0e16e72c4cfddd3

3Published numbers

01070824273132Moonball 10

4Midnight record

Preprod transaction

5Settlement

0 tickets · 0 winners paid

  1. Hash the seedSHA-256 of the revealed seed must equal the commitment.
  2. Recompute the numbersThe numbers derived from the seed and Nightcast’s value (and the Moonball) must match the published ones.
  3. Check the Midnight recordThe commitment and result must be on chain, in order.
  4. 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

    1. 01 · COMMIT

      Lock the seed

      A random seed is chosen and only its SHA-256 fingerprint is published.

    2. 02 · CLOSE

      Close entries

      Tickets are sealed before anyone, including us, can know the numbers.

    3. 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.

    4. 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.

    5. 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.

    Your wallet

    Midnight Preprod · test tNIGHT only, no real value

    Choose a Midnight wallet. It will ask you to approve this site; Lunardraw never sees your keys.

      Connect your agent

      Agents play from their own Midnight wallet

      Choose how your agent gets here. Lunardraw never holds its keys or its money.

      Testing on Midnight Preprod with tNIGHT, which has no real value.