💰
Megapot
  • Overview
    • About Megapot
    • How to play
    • How to provide liquidity
    • How to refer users
    • Earn as a liquidity provider
    • About the Team
    • Megapoints
    • Prizes
  • Deep dive
    • Components
    • System Diagram
    • Smart Contract
    • Provably Fair
  • Developers
    • Start Here
    • Add jackpot to your site
      • Custom Integration
        • Getting Started
        • Contract Functions
        • Jackpot Page
        • LP Deposit Page
        • History Page
      • React UI Kit
        • MegapotProvider
        • Jackpot
        • useJackpot
    • Offer cost-effective incentives
    • Launch jackpot in your token
    • Developer Reference
      • Testnet & Mainnet
      • Contract Overview & Functions
      • Megapot API
      • Megapot Examples
      • How to Earn Fees
      • Brand Kit
  • Appendix
    • VIP Program
    • FAQ
    • Comparisons to Lotteries
    • About Megapot
  • Terms of Service
  • Privacy Policy
  • Responsible Gaming
Powered by GitBook
On this page
  • Key Features
  • Demo & Examples
  • Demo Standalone Github Repo - Live Demo
  • Our Examples
  • Community Spotlight
  • Main Components
  1. Developers
  2. Add jackpot to your site

Custom Integration

Key Features

  • 🎰 Jackpot: Users can easily purchase tickets for the jackpot directly within your app.

  • âš¡ Seamless Integration: Designed for smooth integration with your existing app, leveraging React components and hooks.

  • 🎨 Custom UI: Match the jackpot to your existing site. Implement any way you like.

  • Earn 10% of ticket purchases: Referring a user ticket purchase earns you 10% of each ticket sale

Demo & Examples

Feel free to fork this example repo and use it as a starting point for your own project. Or just for a reference implementation.

Demo Standalone Github Repo - Live Demo

Developer API: Speed up development with our data APIs.

Our Examples

  • Examples Docs

  • Examples Repo

Community Spotlight

  • Moai Cash - Telegram mini app with embedded Megapot and ticket pooling feature. They incentive signups by giving away Megapot tickets (try it here)!

  • Tab - Farcaster mini app with embedded Megapot.

  • BTB Finance - DeFi super app with embedded Megapot. Plus, instant cashback for users and an auto-subscription feature.

  • Sendpot - Weekly jackpot in Send.app's native token $SEND.

  • Bonanza - Beautiful version of Megapot. Also a Farcaster mini app, see testimonial

  • Mega Pool - Pool tickets with other players for better jackpot odds.

Main Components

Every site is different, but these are the main considerations for building your own UI.

Check out megapot.io for inspiration.

  • Jackpot Info, Countdown, Ticket Purchase, Claim Winnings & Last Jackpot Results

    • Jackpot Total

    • Countdown to next drawing

    • Form to select the number of tickets to buy

    • Verifying the user has enough ERC-20 tokens to buy tickets

      • Your user has approved spending of their ERC-20 tokens on your contract

    • Submitting and confirming the transaction

    • Earning 10% fee on every ticket sold

  • Liquidity Pool

    • If you intend to allow users to deposit liquidity to the jackpot you will need to:

      • Create a form to allow users to deposit liquidity, edit position in range, or add more liquidity

      • Verify the user has approved spending of their ERC-20 tokens on your contract

      • Submitting and confirming the transaction

    • If you plan to provide all liquidity, you can do this through the contract directly.

  • History

    • Display a users ticket purchase history

    • Display a jackpot history

PreviousAdd jackpot to your siteNextGetting Started

Last updated 11 days ago