Paul Newman
Me and the Lottery
I've never won anything significant in a lottery. Not once. But that doesn't stop me from trying every now and then (too often...), driven by a mix of hope and mathematical ignorance :P The funny thing is, I have this one core memory from my childhood that keeps pulling me back in: my father winning 500DM in the German "Lotto". Yes, I was already alive when the German Mark was an official currency lol
I remember the exact moment - him checking the numbers while they were drawn on evening TV, the surprise on his face with every number that matched, and how we celebrated that small amount like it was a million. My heart still beats faster writing about it. That memory lives rent-free in my head, and whenever I pass by a lottery booth or see a jackpot announcement, it whispers: "Remember when Dad won? Maybe it's your turn now." Often I can resist but when my mood is good, the sun is shining and I have a full stomach - I buy a ticket, I wait, I check the numbers, and... nothing. Every. Single. Time. Also, once I made the mistake to sign up for a subscription where you buy new tickets automatically, I cancelled too late...
The thing is, traditional lotteries always felt a bit opaque to me, even if the draw was shown on live TV. Often they winners are picked secretly, which is even more opaque - a black box literally. Are these picks fair? How much goes to the operator versus the prize pool? Are there ways to cheat for the operators? I know that lotteries advertise with "We are notarized" but are they really, and could these notaries be paid actors?
These and more questions bothered me, especially after learning about blockchain technology and the transparency they deliver by default. So I thought: what if we could create something better? Something transparent, customizable, and decentralized? What if the operator does not take a cut? So I worked on a transparent lottery contract for the Magi network in the past weeks.
And then @meno and @howo came up with this brilliant idea: What if participating in lotteries could help HIVE by reducing inflation? What if every ticket burned a portion of HIVE, reducing supply while giving everyone a fair chance to win? Suddenly, this wasn't just about fun and gambling anymore - this was about individual action with collective benefit.
We could all contribute to HIVE while having fun and potentially winning prizes. That conversation sparked something, and I immediately added this to my contract as it fits perfectly! And I pushed the release of it forward since it was a very recent discussion and the best moment for a New Year Lottery. Let me introduce:
- Ōkinoko Takara -

A fully decentralized, transparent lottery on the Magi Network where you create custom lotteries, join existing ones, and watch as every single ticket helps burn HIVE. The name? Takara means "treasure" in Japanese. Because that's what we're all looking for, right? :P
You can start joining our big New Year Lottery immediately at:
🎉 START the NEW YEAR with a WIN for EVERYONE! 🎉
To jump-start this launch, I’ve created a New Year Lottery that fully taps into the powerful lottery features available with my most recent smart contract on Magi. This isn't just another draw - it’s a celebration with real impact! Every ticket you buy helps in two meaningful ways:
- 25% of all HIVE spent is burned, reducing supply and strengthening the ecosystem
- Another 25% is donated to a great cause: @hive.helps
@hive.helps uses HBD interest to support charities around the world, turning everyday blockchain activity into real-world help. If you’re curious about the impact, check out their blog and especially their most recent post, where they share details about their latest €1000 donations to international organizations.
🎟️ Join the New Year Lottery, support the HIVE ecosystem, contribute to charity, and give yourself a chance to start the year with a win! Everyone benefits, and you will too.
And now back to the new contract, how it works and how you can buy your tickets in a few simple steps.
Why This Matters: Burning HIVE Together

First let us dive deeper in the already mentioned game-changer: Every single lottery burns a portion of the ticket sales. Not as a fee to me (I don't take anything), but literally burned - sent to @null, removed from circulation forever.
When @meno first mentioned this idea, it clicked immediately. We're not "just" playing transparent lotteries - we're collectively investing in HIVE! Every ticket you buy, every lottery you create, contributes to the whole ecosystem.
Think about it:
- You participate in a fun, transparent lottery
- You have a genuine chance to win prizes
- Even if you don't win, you've contributed to reducing HIVE supply
- The entire ecosystem grows stronger
When you lose in traditional lotteries, only the operator wins. When you lose in Ōkinoko Takara, you've still won by helping your own and everyone's HIVE!
Imagine if enough people participate regularly:
- Thousands of HIVE burned monthly
- Reduced supply pressure on the market
- people having fun and winning prizes
This is how we help HIVE together. Not through complicated DeFi schemes or risky strategies - just through transparent, fair, fun lotteries that benefit everyone involved, winners and holders alike.
Getting Started is Easy

Head over to Okinoko.io where you can:
- Connect your Hive account (Keychain/HiveAuth)
- Browse active lotteries with all parameters visible
- Create your own lottery with custom rules (including optional donations!)
- Join existing lotteries by buying tickets
- Track your participation and potential winnings
- View complete lottery history and results
The interface is designed to be straightforward - no confusion, no hidden options, just clean lottery management. Continue reading to get all the needed details. If you still have any questions - let me know in the comments (:
What You'll Need
- A Hive account (obviously!)
- Some HBD in your Magi wallet for Resource Credits
- HIVE tokens to buy lottery tickets
RC Management: Magi uses Resource Credits like Hive, but it relies on (unstaked) HBD in your Magi wallet. A few HBD gives you plenty of RC for regular contract interactions. Creating a lottery costs about 3 RC, joining costs less than 1 RC, and execution is very dependent on the amount of ticket sales. Usually around 3 RC, but it can go up to 30 and more for 1000+ individual participants. That's where the heavy calculation and state access happen but I will execute lotteries - you can be sure about that :)
If you are still wondering how to actually get HBD/HIVE into your Magi wallet: There are two simple ways, while the official Altera is the recommended one!
Sign in to Altera and deposit HIVE to your Magi account frictionless!
Regulat transfer via your favourite frontend to @vsc.gateway with a very specific memo.How The Contract Actually Works
Ōkinoko Takara is a verified & open source smart contract running on the Magi network. It lets anyone create or join lotteries with completely customizable rules. Every lottery is stored on-chain, making everything transparent and verifiable. No hidden mechanics, no trust required - just pure, deterministic smart contract logic.
Creating Your Own Lottery
Want to run a lottery? Here's what you control:

- Name - Give it personality (1-100 characters)
- Duration - How long until the draw: 1 - 2160 hours (90 days)
- Ticket Price - Set the price in HIVE (minimum 0.001)
- Burn Rate - Choose how much to burn (5-75%)
- Prize Distribution - Single winner? Multiple winners? You decide!
- Donation (Optional) - Support a charity run by a Hive account (0-50%)
- Metadata (Optional) - Add additional data for frontends. Okinoko.io, for example, lets you add announcement post/donation post URLs and a custom description of the lottery.
Example Setup:
- Name: "New Year Mega Draw"
- Duration: 168 hours = 7 days
- Ticket Price: 2 HIVE
- Burn Rate: 20%
- Distribution: Winner takes all (100%)
- Donation: 5% to @diyhub (optional)
Simple, clean, completely customizable. You can even dedicate part of the proceeds to a charity or community project you care about!
The creator of the lottery can always change post URLs and additional description text via the "Metadata" button in the lottery overview.
Joining a Lottery
Browse active lotteries on Okinoko.io, pick one you like, and buy tickets. The more tickets you buy, the better your odds. You can join the same lottery multiple times or buy multiple tickets at once.


Every ticket increases your win probability proportionally. If you buy 2 tickets and there are 10 total, you have a 20% chance of winning. Math that actually makes sense even to me :D
The Draw: Randomly & Verifiable Fair
When a lottery's deadline passes, anyone can execute it (not just the creator - no special privileges). All you need is enough RC - a lottery with 1000 individual participants can take up around 30 RC.
The smart contract then:

- Burns the configured percentage (sent to @null on Layer 1)
- Sends donations if configured to the specified charity/cause
- Selects winners using cryptographic randomness based on transaction data
- Distributes prizes automatically to winners on Magi
- Burns unclaimed prizes if there are fewer participants than the number of winner slots
The Numbers That Matter
Let's walk through a real example so you can see how the economics work:
Simple Burn Lottery
Setup:
- Ticket Price: 10 HIVE
- Burn Rate: 25%
- Winners: 3 (50%, 30%, 20%)
- Participants: 10 Hivers - each one ticket
After Execution:
- Burned to hive:null: 25 HIVE (25%)
- Prize Pool: 75 HIVE
- 1st Place: 37.5 HIVE (50%)
- 2nd Place: 22.5 HIVE (30%)
- 3rd Place: 15 HIVE (20%)
Three happy winners, and 25 HIVE removed from circulation, helping every HIVE holder.
Supporting Good Causes
Want to make your lottery support a charity or community project? Here's how it works:
Setup:
- Ticket Price: 2 HIVE
- Burn Rate: 10%
- Donation: 20% to @diyhub
- Winners: 2 (60%, 40%)
- Participants: 10 people buy tickets → 50 HIVE total
After Execution:
- Burned: 5 HIVE (10%)
- Donated: 10 HIVE (20%) → sent to @diyhub
- Prize Pool: 35 HIVE
- 1st Place: 21 HIVE (60%)
- 2nd Place: 14 HIVE (40%)
Now you're burning HIVE, supporting a good cause, and giving people chances to win. Triple win!
The Transparency You Deserve

Traditional lotteries are black boxes. You buy a ticket, trust the operator, hope they're honest, but still, they take a huge share of the prize pool to make a profit. We can do this better - more fair, fully transparent, verifiable and everything by ourselves!
With Ōkinoko Takara, everything is visible and verifiable:
- All lottery parameters are stored on-chain
- Every ticket purchase is recorded publicly
- Prize distributions happen automatically via smart contract
- Burn transactions are publicly visible on-chain
- Donation transfers are transparent and trackable
- The seed for the winner determination is emitted
All lottery activities emit events that can be tracked by off-chain indexers (like my beta indexer does already): Lottery Created, Participant Joined, Lottery Executed, Prize Payouts, Donations Sent, Burn Transactions
You don't need to trust me. You don't need to trust anyone. The code is the truth, and the blockchain is the ledger.
Side note: There is a verification function called verify_lottery that is not implemented yet in the frontend. It uses the exact same internal contract function called selectRandomWinners() to determine the winners. If both results are the same it will return verification successful.
Everything is auditable, forever.
What's Next
Ōkinoko Takara is live and functional right now, but I have plans:
- Seasonal special events with themed lotteries
- Sponsored lotteries from community projects
- usability optimization on the frontend
But honestly? I want to see what you do with it first. Create interesting lotteries. Experiment with different configurations. Find creative ways to use this system. The community will shape where this goes.
Other Contracts
Some of you might know my other contracts:
- **Ōkinoko Esukurō** (the decentralized escrow system)
- **Ōkinoko Ināro** (the on-chain game collection).
This is my third major smart contract on Magi, and it builds on everything I've learned from the previous two. I have a DAO already ready but wanted to push this forward as it was discussed recently in a Hive group chat.
If you want to support my work, donations are always appreciated. My wallet is open, but so is my code. Use it, enjoy it, fork it, audit it - it's all yours!
Got ideas? My Discord is always open for discussions about smart contracts, features, or just to chat about anything!
Final Words
I built Ōkinoko Takara because I believe we can do better than traditional lotteries. We can be transparent. We can be fair. We can benefit everyone, not just the house. And we can have fun while doing it.
Will I finally win something? Maybe! Will you? Maybe! But one thing is certain: every time we play, we're helping HIVE together.
So go ahead - create a lottery, buy some tickets, burn some HIVE. Let's see if we can make this memory for ourselves that I have of my father winning 500DM back in the day. Except this time, everyone's already winning just by participating.
Big Thanks to @meno for the initial inspiration, @howo for connecting it to my already existing lottery contract, to the Magi team for constantly building, and to this amazing Hive community for making projects like this possible.
Let's BURN Some HIVE!
Visit Okinoko.io to start playing!
