Eggs.fun, a miniapp saw its token skyrocket after offering Megapot tickets as a potential reward for a paid character upgrade.
How this differs from free to play

- Tickets purchased as a cost-effective incentive are 1 in 1,000,000
- Free to Play entries can vary. If we have 1,000 free to play entries, odds for a free to play entry to win is 1 in 1,000,000,000 (1/000000 * 1/1000).
Demos & Examples
Developer API: Speed up development with our data APIs.
View our example Github Repo
Community Spotlight
- Moai Cash, a Telegram mini app, incentivizes signups with free Megapot tickets. Try it here!
- Eggs.fun, a Farcaster mini app, incentivizes character upgrades with Megapot tickets
- Colony, a World mini app, incentivizes minting land with Megapot tickets
- Stocks Trader, a World mini app, incentivizes trading stocks with Megapot tickets
- Scoreline, both a Farcaster and World mini app, incentivizes making sports bets with Megapot tickets
How to Gift Tickets
Set your wallet address as thereferrer parameter to the ticket purchase function and add the recipient parameter to the ticket purchase function of the wallet you want to gift the tickets to.
Walkthrough
Let’s take a look at the purchaseTickets function:referrer: Your wallet address. Triggers the contract to pay you 10% of the ticket price for each ticket purchased.value: The number of tickets to purchase, in szabo (6 decimals). 1_000_000 szabo = 1 ticket.recipient: The address of the recipient of the tickets. This is the wallet of the person receiving the ticket(s).
referrer parameter and the recipient parameter to the wallet you want to gift the tickets to.
Example
Let’s say you want to gift 1 ticket to the jackpot. You would set thereferrer parameter to your wallet address and the value parameter to 1 tickets.
Getting Purchased Tickets Info
You can get the number of tickets purchased by a wallet by calling the usersInfo function with the recipient wallet address as the parameter. ticketsPurchasedTotalBps is the number of tickets purchased by the wallet this round. To get the number of tickets purchased, you can divide this number by 7000. Our contract uses a basis points number to calculate tickets in the contract. Every ticket is worth 10_000 ticket units (See our deep dive). 30% of the ticket price goes to LPs & referral fees. So to calculate the number of tickets purchased, you divide the total bps by 7000.
