Case Study - On-chain raffles with provably fair draws and instant prize settlement

RaffleKing is a skill-based prize competition on Ethereum Mainnet: provably fair on-chain draws, paid and bonus tickets, and instant ERC-20 settlement to winners.

Client
RaffleKing
Year
Service
Smart Contracts, Full-Stack Platform

Overview

Online prize draws often ask players to trust a server they cannot see. RaffleKing takes a different approach: digital prize competitions where the rules, ticket balances, and draw logic are anchored in Ethereum Mainnet infrastructure designed for provably fair outcomes. Players can connect an external EVM wallet or use a platform-managed wallet experience built for smoother onboarding; in both cases they hold tickets as account-scoped credits that gate entry into individual raffles. Each competition advertises its prize, timing or pool-based closing conditions, and minimum entry requirements — so expectations are clear before anyone spends a ticket.

Skill first, randomness second

Every raffle includes a skill component: a qualifying question or task that must be answered correctly before an entry counts. Tickets are only consumed when a submission is validated — incorrect answers do not burn entries. That pattern separates “who is allowed into the hat” from “who the chain selects,” which matters both for product design and for how the platform describes its competitions. Once a player is eligible, winner selection is driven by on-chain randomization that participants and observers can audit: the goal is verifiable fairness, not a sealed backend process.

Tickets that match real go-to-market needs

Not every participant arrives through the same funnel. Standard (paid) tickets support the core business: users purchase credits and deploy them across eligible raffles. Bonus tickets reward early access, referrals, campaigns, and loyalty-style engagement; they can feed bonus-only draws or other designated mechanics, and the platform may also expose controlled paths to convert bonus balances into standard tickets where policy allows. Free-entry tickets can appear for specific promotions with their own constraints. Those layers sit on top of a single draw pipeline so product and compliance narratives stay coherent while marketing stays flexible.

Settlement without a manual prize desk

For prizes implemented as on-chain assets, the intent is straightforward: when a raffle completes, compatible ERC-20 payouts can flow to the winner’s address without a separate “claim this email” workflow for every draw — subject to network confirmation times and the same realities every Mainnet product faces (gas, congestion, operational safeguards).

Seamless UX with ERC-7702 and platform wallets

Not everyone who should enjoy a raffle wants to behave like a power user. RaffleKing provisions per-user platform wallets tied to accounts so balances, tickets, and entries can live on-chain while the product still feels like a normal web app.

We use ERC-7702 so the platform can sponsor transactions on behalf of those wallets where the product allows it: the chain still records real state changes, but players are not asked to approve and sign every interaction in a wallet extension just to enter a draw or move tickets through the core loop. That keeps friction low for web2-style users who expect seamless, one-click flows, while crypto-native users who prefer self-custody can still connect an external wallet when they want that path.

The sponsorship layer is wired to the same raffle and ticket model as the rest of the stack — not a parallel toy flow — so fairness rules, settlement, and operator controls stay consistent end to end.

Toshi Labs’ role

Toshi Labs led the development team building RaffleKing: roadmap alignment, technical architecture, hands-on engineering, and shipping discipline across frontend, backend, and chain. We authored and deployed the smart contracts that encode provably fair resolution, reconcile entries across multiple ticket types, and enforce the rules of each raffle category. We integrated ERC-7702-driven sponsored execution with platform wallet flows so ticket purchases, entries, and related operations could stay gasless from the player’s perspective where the product design calls for it. We built the surrounding application experience — wallet connection, ticket inventory, entry flows, and operator-facing operations — so that instant settlement and public verifiability are not one-off demos but production behavior on ETH Mainnet.

The broader RaffleKing roadmap includes community and engagement surfaces (leaderboards, challenges, mini-games) that feed the same ticket economy; our work focused on making the core raffle engine — fairness, settlement, ticket semantics, and usable onboarding — solid enough for everything else to plug in on top.

What we did

  • Smart Contracts
  • Provably Fair On-Chain Draws
  • ERC-7702 Sponsored Transactions
  • Platform Wallets & Web2-Friendly UX
  • Full-Stack Platform Engineering
  • Technical Leadership

More Case Studies

Breaking the counterfeit economy with NFC authentication

Certenticat is a blockchain-powered authentication platform using NTAG242 NFC chips to combat counterfeiting and provide instant product verification for luxury goods and collectibles.

Read more

Luxury concierge services reimagined for the digital age

Drunken Monkey Members Club is an NFT-powered luxury concierge platform that provides exclusive access to global VIP experiences through blockchain-verified digital membership.

Read more

Tell us about your project

Our Offices

  • United Arab Emirates
    Cloud Spaces
    Dubai Mall Fountain Views, Dubai
  • United Arab Emirates
    Island Park I
    Dubai Creek Harbour, Dubai