On-Chain Instant Lotteries With Verifiable Randomness on Solana
A fully on-chain Solana lottery where users create or join instant Rounds that resolve with Pyth VRF and pay out atomically, split across protocol, jackpot, and creator rakes.
RoundRiot is an on-chain lottery system on Solana. The unit is a Round: a lottery with a custom ticket price and count that anyone can create or join. Once a Round fills, it resolves automatically, and the winner takes the pot minus a set of transparent rakes. The whole thing is built to run without a trusted operator in the middle.
The trust problem it targets
Online lotteries have a familiar set of failures. Central control makes the mechanics opaque, results can take hours or days, fee structures are murky, and there is no way to prove the draw was fair. Those four problems are really one problem wearing four hats, which is that you have to trust the house.
RoundRiot's answer is to put the logic on-chain where it executes trustlessly, resolve Rounds in minutes rather than days, and make the rakes explicit. The split is fixed and visible: 5 percent to the protocol, 5 percent to a progressive jackpot, and 5 percent to the creator, distributed atomically as part of resolution rather than swept up later.
Randomness you can check
The core technical bet is verifiable randomness. Resolution uses Pyth VRF, which produces cryptographic proofs that the randomness driving the draw was not tampered with. This is the piece that a centralized lottery structurally cannot offer. "Trust us, it was random" becomes "here is the proof." For a lottery, that is not a nice extra, it is the entire value proposition.
The system is also permissionless in a way that goes past just joining. Anyone can create Rounds, and anyone can run the automation bots that keep Rounds progressing and resolving. That keeps liveness from depending on a single operator staying online.
Architecture and honest status
The shape is a standard on-chain stack done properly. A frontend sends transactions through a wallet adapter, the smart contract executes ticket purchases and rake distribution on Solana, an event indexer with a PostgreSQL backend captures what happened, keeper bots handle automation, and a WebSocket layer streams events in real time.
I want to be straight about the stage. This is in active development on devnet. The contracts are built and deployed to Solana devnet, the frontend, indexer, keeper bots, and event streaming are all in place and functional, and testing and refinement are ongoing. Mainnet is planned but gated on a pending security audit, and it has not launched.
The lesson I keep from this build is that for anything involving other people's money and a random draw, the randomness source is the design, not a detail. Everything else is plumbing around the VRF, and getting the proof-carrying draw right is what makes the fairness claim real instead of marketing.
Have something that needs building, or stabilizing?
These notes are the work log. The paid work runs through Moonshine Labs, my product and engineering studio. Tell us what you're building, or grab a call.
Work with us →