Skip to content
Testnet

On Rialo testnet

Fair raffles, built on Rialo.

Drawbook draws raffle winners from secrets every ticket holder commits and then reveals, so the result is randomized and anyone can check it.

Every ticket in the sample raffles112 tickets

One block per ticket across the 5 sample raffles, fixed demonstration data rather than accounts on chain. Filled is sold, a light foot is a published secret, and the two lit blocks are sample 0004’s winners. Open a band and those blocks become the page.

What is Drawbook?

Drawbook is an on-chain raffle where the winners come out of a commit-reveal draw over secrets the ticket holders publish, rather than being chosen by whoever runs it.

Its raffle program runs on Rialo testnet. Deploying a raffle, buying a ticket, revealing, drawing and claiming are real signed transactions from a burner wallet held in your browser. Testnet only, and testnet can be reset.

Program EQGb5xL2bgRuEFxY2FN25eFrgKDhTpZjRUbEQtYmoLLR

  1. 01

    Transparent

    Every ticket, commitment and reveal sits in the raffle's account, where anyone can read it while the raffle is open.

  2. 02

    Verifiable

    Anyone can recompute a drawn raffle from data its account holds, and its page does that in your browser.

  3. 03

    Open to anyone

    Anyone can press Draw once every ticket is revealed, and when reveals close, Rialo's Subscriber program sends it by itself.

How a Drawbook raffle works

  1. 01

    Commit

    Buy a ticket and commit a secret, paying the ticket price plus a bond. The secret is bound to your address, this raffle and this exact ticket, and nobody, the creator included, can read it.

  2. 02

    Reveal

    When the sale closes, publish your secret to become eligible. The program checks it against what you committed and hands your bond back. Stay silent and your bond goes into the pool.

  3. 03

    Draw

    When reveals close, Rialo sends the draw by itself, and anyone can run it sooner once every ticket is revealed. The winners come out of every published secret at once, in sorted order, plus one value the chain adds last. Winners collect with Claim.

Nothing in the sequence asks you to trust a shuffle. Each step is only safe because of the one before it.

Try a live raffle.

Raffles deployed on Rialo testnet are listed at the top of the raffle board, and anyone can deploy one. Buying, revealing, drawing and claiming there are real signed transactions.

Sample raffles · not on chain55 of 80 tickets gone · 33.05 RLO in the open pools

These 5 raffles are fixed demonstration data kept in this site’s code, so every draw in them can be recomputed. Nothing done on them is signed or sent. Their clocks start from a pinned instant, 30 Jul 2026 09:00 UTC, and add the time this tab has been open.

The sample record1 settled · 1 void · 6.10 RLO paid to winners · 1.65 RLO returned

Sample raffles
5
Tickets
112
Sold
80
In the open pools
33.05 RLO
Paid to winners
6.10 RLO
Returned
1.65 RLO
Settled
1
Void
1

Every figure in this section and the two after it is read out of the sample record in lib/mock-raffles.ts at render time, and its settled raffles are settled by a real call to drawRaffle. None of it is on chain. The only thing on this page read from a node is the network chip in the masthead.

Don’t trust the result. Verify it.

See how a winner is drawn.

Sample raffle 0004 is fixed demonstration data, not on chain. This is its draw, recomputed in your browser with the same winner selection a live raffle’s page uses to check its own.

Sample raffle 0004 · not on chain

No spin, no near miss, no acceleration into a result. The pool shrank from 18 to 17 between the two picks, which is why the second winner could not be the first. Replay it below.

Sample raffle 0004, settled 26 Jul 2026 09:00 UTCThe recordAbout 9 seconds. No spin, no near miss, no acceleration.

Sample raffle 0004 is settled. It is fixed demonstration data, not an account on chain. 20 tickets sold, 18 revealed, 2 bonds forfeited into a pool of 6.10 RLO. Tickets 17 and 10 won 3.05 RLO each, drawn from a seed anyone holding the public reveals can recompute. The replay walks exactly this and invents nothing.

1. the 18 revealed nonces, sorted

0abc33365cc2cf974aed9b034beb1b98
0e741e3f41fffc446344128d31fc7844
0e977be2a4b0df521a849a9af409f10c
12a41f3aaaf0eb7b2154c03f22185a6a
176ffea89f96d48bfad125047e0fbd44
2277cc6a1c200e600d0e1cc88eb12a8a
2a5bd4b71e5f99fd605511d132023c23
2c6abaf65356b1604833713d16f51dd8
5392fd2d41b8b04b1bc6377ec8f92c11
70dd6f89af6db762171e03dac3ef59c3
9bf9c3972e4a964787a22b5d43fae6f5
b185263834ec207839c358cbda37664f
be988e5f2e750c20f5747251cfd4d6b3
c61d666f06069ad22a98b28354b8723b
c9427a0ee843f425caa27b8be163dbaf
d5da60e8959c5d9d3e9f11d18c2b6735
f2c9f8b64a081670fd0e72448e04432a
f943b0cbfe6fb7ef06b67854950cf207

Sorted, because hashing them in the order they arrived would pay whoever reveals last.

2. the preimage as bytes, chain value last

7269616c6f2d726166666c652d76317c736565647c347c0abc33365cc2cf974aed9b034beb1b987c0e741e3f41fffc446344128d31fc78447c0e977be2a4b0df521a849a9af409f10c7c12a41f3aaaf0eb7b2154c03f22185a6a7c176ffea89f96d48bfad125047e0fbd447c2277cc6a1c200e600d0e1cc88eb12a8a7c2a5bd4b71e5f99fd605511d132023c237c2c6abaf65356b1604833713d16f51dd87c5392fd2d41b8b04b1bc6377ec8f92c117c70dd6f89af6db762171e03dac3ef59c37c9bf9c3972e4a964787a22b5d43fae6f57cb185263834ec207839c358cbda37664f7cbe988e5f2e750c20f5747251cfd4d6b37cc61d666f06069ad22a98b28354b8723b7cc9427a0ee843f425caa27b8be163dbaf7cd5da60e8959c5d9d3e9f11d18c2b67357cf2c9f8b64a081670fd0e72448e04432a7cf943b0cbfe6fb7ef06b67854950cf2077c1abd0e7316cb6176

These are the 337 bytes the seed is the SHA-256 of, written as hex: the text “rialo-raffle-v1|seed|4|” as UTF-8, then each sorted nonce’s 16 bytes followed by one “|” byte (7c), then the chain value’s 8 bytes. Hash them as bytes, decoded from the hex, and you get the seed below; hashing the hex as text gives a different digest. The chain value, the last 16 characters, is read at the draw after every nonce is public, so a holder deciding whether to stay silent cannot know it. Whoever produces the draw block may be able to influence it.

3. the seed

59638a7fd51dc3cce2adc72b95407639c23ddccdb007b84618470a2de98d7ddc

4. the draw, 2 samples without replacement

  1. Sample 1 of 2index 14 of 18 gives ticket 17
  2. Sample 2 of 2index 8 of 17 gives ticket 10

Each sample is 48 bits of a SHA-256 keystream over the seed, reduced modulo the pool that is still standing. The pool shrinks between the samples, which is why the second winner could not be the first. The draw is randomized and checkable, not unbiasable: whoever produces the draw block may be able to try other chain values once every nonce is public, and a holder can withhold a reveal to move the seed at the cost of their bond.

17
Winner 1 of 2
3.05 RLO
CZc2dFYh…GLK9g7zA
Sample holder
10
Winner 2 of 2
3.05 RLO
Xjux5Ctv…Ynh3TQfc

Don’t trust the result. Verify it.

Every settled draw leaves behind the data needed to recompute the result. Below is the whole working of sample raffle 0004, unsummarised. A live raffle’s page prints the same working from its account on chain and checks it in your browser.

Sample raffle 0004 · not on chain
The working, sample raffle 0004

Revealed nonces, sorted

090abc33365cc2cf974aed9b034beb1b98
110e741e3f41fffc446344128d31fc7844
030e977be2a4b0df521a849a9af409f10c
1012a41f3aaaf0eb7b2154c03f22185a6a
19176ffea89f96d48bfad125047e0fbd44
122277cc6a1c200e600d0e1cc88eb12a8a
132a5bd4b71e5f99fd605511d132023c23
142c6abaf65356b1604833713d16f51dd8
065392fd2d41b8b04b1bc6377ec8f92c11
0170dd6f89af6db762171e03dac3ef59c3
029bf9c3972e4a964787a22b5d43fae6f5
07b185263834ec207839c358cbda37664f
18be988e5f2e750c20f5747251cfd4d6b3
04c61d666f06069ad22a98b28354b8723b
20c9427a0ee843f425caa27b8be163dbaf
05d5da60e8959c5d9d3e9f11d18c2b6735
17f2c9f8b64a081670fd0e72448e04432a
16f943b0cbfe6fb7ef06b67854950cf207

Chain value

1abd0e7316cb6176

Seed

59638a7fd51dc3cce2adc72b95407639c23ddccdb007b84618470a2de98d7ddc

Eligible pool

18 tickets, sold and revealed.

Winners

StepPoolIndexTicket
1181417
217810

Recompute runs SHA-256 over the 18 published nonces and the chain value in this tab and draws the winners again. This raffle is a sample, so the record it compares with was made by the same code: the check shows the method and cannot fail. On a live raffle’s page the same check runs against what the chain holds, and there it can fail. The draw is randomized, not unbiasable: whoever produces the draw block may be able to influence the chain value.

Built for automatic execution.

When a raffle is deployed, the same transaction asks Rialo’s Subscriber program to send its draw five seconds after the reveal deadline. Rialo then sends it by itself, with no keeper, cron job or relayer. Anyone can still press Draw sooner, once every sold ticket is revealed. Raffles deployed before Drawbook began scheduling the draw have none; on those, Draw stays a button.

This is randomized and checkable. It is not a claim that the draw cannot be biased. Rialo’s own randomness is a bare 64-bit number with no proof attached, which is why the seed is built out of the participants’ secrets and the chain value is only mixed in on top. Two levers remain. The chain value is read at the draw, after every secret is public, so whoever produces the draw block may be able to try values and keep one they like, with no ticket needed. And a holder can withhold a reveal to move the seed, blind to the chain value still to come, at the cost of their bond.

How Rialo sends the draw
  1. Reveal deadlinean absolute instant, written into the raffle
  2. Condition metfive seconds later, the chain notices, not a server
  3. Reactive transactionDraw is its only instruction
  4. Draw executedno keeper, no cron job, no relayer; winners then Claim

Ready to see it in action?

Live raffles are on Rialo testnet, and a raffle you deploy is a real account there. Your wallet is a burner key held in this browser.