Megapot: World’s Largest Raffle

This lottery is live now on Blast L2 testnet at

Summary: Megapot will become the world’s largest raffle because users get the best odds to win massive jackpots and developers get to build on an immutable platform with an open prize pool. Today, traditional lotteries are negative expected value (EV) because fees are taken from the prize pool to fund expenses. Megapot is positive EV by taking no fees from the prize pool, since it runs freely on a blockchain, and even rewards users with staking yield generated on the money in the prize pool. Since users only want to play when jackpots are big, liquidity providers (LPs) initially fund every prize pool. In return, the majority of staking yield from users’ ticket entries is given to LPs, who now earn yield on everyone’s assets, instead of just their own. As a permission-less protocol, rivals cannot be de-platformed, so they will build upon, and contribute to, the shared prize pool instead of competing.

Megapot takes no fees, is provably fair, and has mega jackpots


Why I’m excited to build this

People will always want to gamble

Crypto is full of scams, casinos take a large margin, and scratchers take even larger margins. You don’t have to condone gambling to want to improve it. It’s a noble goal to reduce consumer prices.


This is uniquely possible with crypto

  • Only a protocol can guarantee that no one will ever be blocked from using it. Such a stable foundation incentivizes others to contribute rather than compete.
  • Traditional business models need to take fees and compete on fees. 5% fees is 10x cheaper than 50% fees. However, a crypto business model can take no fees, and instead pay users to play, which is infinitely better, or pass the “10x better” bar to get users to switch
  • Crypto users can buy tickets with negligible fees. Solana transactions cost $0.00025, and Ethereum L2s cost $0.04. Meanwhile, a traditional $2 lottery ticket pays $0.36 in credit card fees.

This is hugely valuable

Global market size of lotteries is $378 billion, casinos is $130 billion, and online lotteries is $21 billion.

Every lottery in the world has its own prize pool, whether it’s due to geographic regulations (eg. US state-sanctioned lotteries) or tailored to a specific audience (eg. on one casino or website). The underlying goal for all of them is building a big jackpot to attract users to enter. Let’s build a jackpot that everyone can contribute to, and that the whole world can play for.

Lottery Components

Onchain lottery contract

  • Each ticket has equal chance to win entire prize pool
  • Winning ticket is drawn every 24h

Points program

  • Users get points for buying lottery tickets, referring other users, and other GTM activities
  • Points are worth real money. These are exchanged later for the staking yield generated from money in the prize pool.

Trusted frontend

  • Open-source the product with public founders (like Uniswap). Contrast against shady competitors with anonymous teams
  • For legal and compliance reasons, block US users.
  • Encourage others to build frontends. For example, empower others to take on the compliance/risk to serve US users or any other country, tailor it to different audiences (eg. themed games), or build different form factors (eg. Telegram bot)
Screenshot of our lottery, live now at
Screenshot of our lottery, live now at

Liquidity Providing program

It’s important to build a large jackpot and maintain large jackpots to get users excited. To do this, liquidity providers (LPs) initially fund every jackpot to make it exciting. By purchasing tickets for a neutral EV lottery, they take on variance. In return, the vast majority of yield from users’ ticket entries is given to LPs.

LPs like that they can earn multiples of what they would normally earn from standard staking.


Overview flow chart


Detailed flow chart

This chart covers how the jackpot is grown and does not cover yield.

  • Expected Value (EV): Long-term average value. If you flip a coin enough times, win $1 on heads, and lose $1 on tails, this is neutral EV since you should end up even. Similarly, a 1% chance to win 100x is also neutral EV.
  • Liquidity provider (LP): Someone who earns yield by depositing crypto assets for others to use. Here, they allow lottery users to always enter to win a large jackpot.
  • LP Reserves: Money that a LP safely earns yield with with no variance.
  • LP Tickets: Combined pool of tickets from all LPs. If any ticket here wins the jackpot, prize money is distributed proportionally to all LPs.
  • Staking yield: Generated from ETH staking at ~4% per year.
  • Ticket: Each raffle ticket costs 0.001 ETH (~$3). It is issued from a lottery contract, which adds the ticket value to the jackpot. Odds for a ticket to win is 1 / total_tickets, jackpot value is total_tickets * ticket_price.
  • Variance: Defines how much money a LP is willing to win or lose based only on luck. A 10% variance means that in the unluckiest case, they lose 10% of their reserves.

Building on Blast L2

We’re building on Blast’s Ethereum L2 because:

  • Deposits into a smart contract earn yield automatically with no developer work.
  • Gas fees are returned to the protocol’s developers (us). This is a revenue source even if another frontend drives majority of traffic.
  • They offer a sizeable developer airdrop. Passing this on to users incentivizes product usage, and if we cannot get users with this added incentive, we’ll definitely fail without it.

With Blast, LPs’ earnings is significantly higher than just native yield:



The team takes 10% of yield only after LPs earn 2x the standard staking yield. This way, we profit only when others in the ecosystem profit.


Additional monetization can come from onramp and swap fees (Uniswap Labs did this to earn $4M in past quarter) or platform incentives like Blast’s developer airdrop and gas rebate.


  • Users play Megapot because if they’re going to gamble, it’s the highest ROI way to do it. Need to understand if users actually care about EV or ROI.
  • Positive EV is a strong selling point for users, and the phrase “Get paid to play” is catchy. Thus, it’s important to keep it positive, even if a small magnitude (+0.01%).
  • LPs’ risk-free returns rate is native staking yield. With our smart contract risk and added variance, we cannot take a cut of yield until after we significantly increase their yield. Need to understand: Is the native yield we’re offering enough incentive for LPs?
  • Points let us share more yield to early adopters who provide liquidity, buy lottery tickets, and refer friends. If yield was purely based on deposits, there isn’t enough incentive to cold start the network. Thus, our GTM will include significant points multipliers for the first month.
  • In the short term, launching on Blast lets us test the concept and iterate on user experience.
  • In the medium term, once we’ve found initial traction, we’ll make it the best platform for builders by making the protocol audited, composable, and non-upgradeable.

Additional content

LP Program in Detail
Note: We use the words risk variance and stake interchangeable in the details and examples below.


  • Users benefit since they have a positive EV option to win a very big jackpot (high variance) by buying raffle entries. The lottery itself is neutral EV, but since they get a small share of the Blast developer airdrop, it’s positive EV.
  • LPs benefit since they have a way to get significant access to the Blast developer airdrop by providing their funds at a positive EV, though with low variance. They contribute a large sum (principal), then choose a % to risk as a jackpot (stake), and get the vast majority of the Blast developer airdrop that we share.
  • The prize pool is initialized daily with LP’s stake. Jackpot drawing is per day. Only one winner can win each jackpot. Any ticket proceeds beyond the initial pool size is added to the jackpot.
  • If ticket proceeds ≥ initial prize pool, a jackpot must be won. If ticket proceeds < initial prize pool, jackpot may not be won.
  • If jackpot is won, user takes home prize amount. Money from entries up to the initial prize pool size is added to LPs’ principal, and then they contribute another % of their principal.
  • If jackpot is not won, money from entries is shared to LPs such that their principal and stake remain at their target risk allocation %.

Prize pool details

  • LPs choose the level of risk they’re willing to take, with minimum of 1% and max of 100%
    • Recommended range is 5-20%.
    • We have a minimum because we don’t benefit if they deposit into our contract and do nothing. The maximum is at 100% since retail may want to farm airdrop too, and want lower variance than the lottery itself.
    • Eg. Deposit $1000, select 10%. $100 is at risk at a time for lottery pool.
  • Users can buy lottery tickets to win the jackpot. It is neutral EV since they get a % of lottery tickets depending on size of jackpot. Users cannot get refunds on tickets.
  • Prize pool grows slightly when no jackpot is drawn, and decreases slightly when jackpots are drawn.
  • LPs can submit a change to their stake %, add or remove their principal or stake %, prior to a lottery commencing. All state changes take place between when the lottery draws and the next lottery commences.


  • Our points program rewards users for deposit liquidity into our contract, generating native yield, as well as building large jackpots.
  • At the end of a season, these points claim 80% of native yield and 51% of our Blast developer airdrop.
  • Users earn points immediately when they buy lottery tickets. By granting these immediately, they are able to go play mini-games instead of waiting daily. Users come to use primarily to win the lottery, so they get minimal points for buying tickets.
  • LPs deposit money and commit a small fraction to serve as a guaranteed jackpot. Since jackpot size is most important to attract users to buy tickets, LPs get significant points for the amount as risk (stake), with minimal points for the amount that is not at risk (principal).
  • Points are calculated by multiplying $ amount deposited into contract * time * multiplier. They are awarded retroactively after the funds have been locked in our contract.
    • $
      • 1 point is awarded for every 0.001 ETH that’s locked in our contract for 1 day
    • Time
      • At risk for jackpot only starts counting when money is actively at risk.
      • Money in the principal does not earn points if the stake is not earning points.
      • Eg. If you deposit 1 ETH principal at noon, and set stake to 10%, and lotteries run at midnight, you don’t get any points for the remainder of the day.
    • Multiplier
      • At risk for jackpot is 10x multiplier
      • In the principal is 1x multiplier
      • User entry is 1x

      An LP does not earn points are when stake amount = 0 if stake % is not 0.

    • When they deposit, we don’t want to give them points for their partial day.
    • When their withdrawal request has been completed, aka the stake funds are moved to the principal at the end of the lottery, and they are ready to withdraw, they also earn 0 points.
    • Points active (Y = green, N = red)
      Stake amount
      Stake %
      Just deposited
      Active stake
      Withdrawal submitted
      Withdrawal processed (stake funds moved to principal), ready for withdrawing
Note: We use the words risk variance and stake interchangeable in the details and examples below.

Lottery walkthrough

  • Let’s assume there are three LPs.
    • LP A deposits $10000, selects 10% risk. $1000 is at stake for lottery jackpot. Gets 9000 points for $9000 in principal, 10000 points for stake.
    • LP B deposits $20000, selects 20% risk. $4000 is at stake for lottery jackpot. Gets 16000 points for principal, 40000 points for stake.
    • LP C deposits $250000, selects 2% risk. $5000 is at stake for lottery jackpot. Gets 245000 points for principal, 500000 points for stake.
  • Lottery #1 prize pool is $10,000.
  • $5000 worth of entries were bought by 5000 users, each putting $1 in
  • If lottery is won (50% likelihood, based on $5k entries / $10k prize pool)
    • 1 user takes home $10000. 4999 users get $0. Thus, this is high variance for lottery participants.
    • All LPs lose their stake. This is 2-20% of their stake, so this is low variance for LPs.
    • They get a % of ticket proceeds based on their % pool ownership.
      • LP A had 10% ($1000) of the pool, so gets $500 added to principal.
      • LP B had 20% ($4000) of the pool, so gets $2000 added to principal.
      • LP C had 50% ($5000) of the pool, so gets $2500 added to principal.
    • LPs contribute again to starting up the lottery pool.
      • LP A has $9500 principal, 10% is $950.
      • LP B has $18000 principal, 20% is $3600.
      • LP C has $247500 principal, 5% is $4950.
    • New lottery pool is now $9500.
  • If lottery is not won (50% likelihood)
    • LPs earn a % of the entries based on their LP contribution part of the pool ownership. LPs get the following added to their principal and stake such that their target % allocation remains the same:
      • A had 10% of the prize pool, so gets $500, and had 10% risk, so 10% of that $500 ($50) gets added to the stake, while 90% ($450) goes to the principal. Now, there is $9450 principal and $1050 staked.
      • B had 40% and gets $2000, and ends up with $17600 principal and $4400 staked.
      • C had 50% and gets $2500, and ends up with $247450 principal and $5050 staked.
    • Next lottery has a $10500 prize pool.
    • Assume next lottery has $5000 in entries and is not won.
      • After lottery #2: LP A now has $9900 principal, B has $19276 principal, and C has $249807 principal.
    • Next lottery has a $11017 prize pool.

Model of LP’s principal and stake here. Change different risk % and jackpot results here:

Oversubscribed lottery pool timeline

  • LPs have $100000, and set risk at 10%
  • Initial prize pool is $10000
  • 5000 users buy $1 ticket each, so entries = $5000 → Prize pool is still at $10000
  • 5000 more users buy $1 tickets each, so entries = $10000 → Prize pool is still at $10000
  • 1 addition user buys $1 ticket, so entries = $10001 → Prize pool is now at $10001
  • 9999 more users buy $1 ticket, so entries = $20000 → Prize pool is now at $20000
  • Currently money involved:
    • $10000 from LPs for initial prize pool
    • $20000 from entries
  • Jackpot will be won because ≥ 100% of initial prize pool was sold
    • 1 user takes home $20000
    • LPs get $10000 back, but they had put up a $10000 stake, so they break even.
    • Now LPs put again $10000 back because they still have $100000, and risk is still at 10%

This case is accounted for, try changing entries > prize pool:

Unsubscribed lottery pool timeline

  • No LPs
  • Initial prize pool is $0
  • All ticket entries go into jackpot

LPs unstaking timeline

  • LP has $100000, set 10% risk
  • At midnight, lottery begins and initial prize pool is set to $10000
  • If LP wants to withdraw all their money, they can only do so at the end of lottery #1
  • LP submits request in advance, to withdraw money or change stake % before lottery #2 begins
  • At the end of lottery #1, their principal and stake are withdrawn such that it does not enter lottery #2
  • If $1 entries were bought:
    • Jackpot is won, then LP loses entire $10000 stake, and gets $1 back

Points rewarding timeline - currently implemented

  • Lottery at midnight end, and start.
  • Today is Jan 1.
    • LP#1, #3, #5 deposits 10 ETH principal at Jan 1 noon, and sets 10% at risk.
      • They get no points right away.
    • Retail buys 10 ETH of tickets at Jan 1 noon
      • They get 10000 points right away 5000 points too (10 ETH * 1000 tickets/ETH * 1 point/ticket * 12h remaining / 24 hour left in day)
    • LP#2 deposits 10 ETH principal at Jan 1 11pm, and sets 10% at risk.
      • They get no points right away.
    • LP #5 asks to withdraws all.
      • Can withdraw immediately since stake amount is 0.
  • Lottery #2 start Jan 2 12:01am
    • LP #1 and LP #2 both get the same 19000 points per day
      • (10 ETH * 10% stake * 1000pt/ETH * 10x multiplier for stake = 10000pts for stake;
      • (10 ETH * 90% not at stake * 1000 pt/ETH * 1x multiplier for principal) = 9000pts for principal
    • LP #1 edit position - don’t add ETH, but changes stake to 20%
    • LP #2 withdraw all
    • LP #3 edit position - add 10 ETH at Jan 2 noon, and changes stake to 20%
      • LP #3 gets no points right away.
    • LP #4 is brand new, and adds 10 ETH at Jan 2 noon and sets stake at 50%
      • LP #4 gets no points right away.
    • No one enters the lottery, so stake and principal remain the same.
  • Lottery #3
    • LP #1 position is 8 ETH principal, 2 ETH stake now. They earn 28000 points per day
      • (10 * 0.2 * 1000 * 10) + (10 * 0.8 * 1000)
    • LP #2 position is 10 ETH principal, 0 ETH stake, 0% stake. They earn 10000 points per day at the end of the day.
      • LP #2 at Jan 3, 1am, withdraws all 10 ETH
    • LP #3 edit position
  • At end of day, they get 5000 points, since none of their money is at risk yet.
  • Next day, the lottery runs.
    • LP gets 9000 points for the principal, and 10000 points for the $1000 at risk for the jackpot, or 19000 points
    • A user who buys 0.1 ETH of tickets exactly at midnight when the lottery beings gets 100 points.
    • A user who buys 0.1 ETH of tickets at noon gets 50 points.

Technically speaking, we issue points at two possible times:

  1. Immediately whenever retail buys a ticket, we give you points based on time remaining until end of lottery (not implemented, currently just point per ticket)
  2. LPs only get points when lottery ends, based on their principal and stake.

Launch points multipliers

To incentivize early adopters to provide liquidity and buy lottery tickets, we are providing additional incentives for the first month.

This is the points calculation for LP’s at risk stakes:

Raffle #
Launch bonus multiplier
Multiplier for money at risk (staked)
Total points per 0.001 ETH per day
Daily Raffle 1
Daily Raffle 2
Daily Raffle 3-7
Daily Raffle 8-14
Daily Raffle 15-30

This is the points calculation for raffle tickets bought and LP’s principal:

Raffle #
Points multiplier
Multiplier for tickets bought or LP principal
Total points per 0.001 ETH per day
Daily Raffle 1
Daily Raffle 2
Daily Raffle 3 - 7
Daily Raffle 8-14
Daily Raffle 15-30
LP Yield Math


This approach works in the short and medium term to attract liquidity providers, since we expect Blast to continue their developer airdrop for 1+ years. Blur continues to offer airdrops today, over a year post-launch.

In the long-term though, if the developer airdrop is reduced or the mechanics change, LPs may move their liquidity somewhere else that offers higher yields. My thinking on this is:

  1. Would be great to have this problem - we have a product that retail and LPs use, and the reducing airdrop is what affects us
  2. We could provide liquidity ourselves - from the airdrop we get, we can be our own LPs to ensure there’s always something in the pool
  3. There are many ways to monetize, and provide these earnings as yield - the frontend (website/telegram bot) can charge fiat onramp fees or swap fees, and this can be returned to points holders/LPs to supplement yield and provide reason to keep liquidity here

Ultimately, I see this Blast airdrop farming phase as the GTM to attract liquidity, such that we can build a consumer product where crypto is under the hood.

If we can succeed with Blast users and LPs, I’m confident we’ll be able to make it work beyond.