🧠 Inspiration
StarkLotto was inspired by the idea of building a transparent, fair, and socially impactful lottery.
In many countries, traditional lotteries are centralized and opaque — players cannot verify fairness.
We wanted to demonstrate how StarkNet can enable a trustless lottery using Verifiable Randomness (VRF) and fully on-chain contracts, ensuring both transparency and social good.
🎯 What it does
StarkLotto allows anyone to participate in decentralized lottery draws using StarkNet.
Players purchase tickets, numbers are drawn using provable randomness, and winners receive automatic on-chain payouts.
A small percentage of the prize pool is allocated to ReFi initiatives, supporting environmental and social impact causes — turning every play into a contribution to the planet.
🛠️ How we built it
We built StarkLotto using:
- Cairo v2 for smart contracts on StarkNet
- A modular architecture with two main contracts:
Lottery– handles ticket sales, draws, and resultsVault– manages funds and distributes prizes securely
- VRF integration for verifiable randomness
- StarkNet.js for the frontend connection
- A clear and intuitive DApp interface for ticket purchase and prize claiming
The architecture ensures secure communication between contracts and verifiable fund management at every stage.
⚙️ Challenges we ran into
- Implementing the VRF → winner selection → proportional prize distribution flow fully on-chain.
- Ensuring secure contract interactions between
LotteryandVaultto prevent payout logic errors. - Dealing with testnet instability, event synchronization, and transaction confirmation delays.
- Balancing UX simplicity with technical complexity in Web3 environments.
🏆 Accomplishments that we're proud of
- Achieving a fully transparent and automated lottery on StarkNet.
- Implementing a secure Vault system for prize custody and distribution.
- Integrating ReFi donations directly into the lottery mechanics.
- Building a working prototype with real-time draws and VRF-based randomness.
📚 What we learned
- How to design modular smart contract systems in Cairo v2.
- Best practices for secure inter-contract communication and fund management.
- Optimizing gas usage and improving frontend synchronization.
- The importance of usability and simplicity in Web3 adoption for non-technical users.
🚀 What's next for StarkLotto
- Expanding to multi-round draws and NFT-based tickets.
- Integrating Argent X and Braavos wallet flows for mobile users.
- Launching the mainnet version with donation tracking on-chain.
- Partnering with ReFi projects to make every draw fund measurable impact.
- Opening community governance for prize pool and cause selection.
Log in or sign up for Devpost to join the conversation.