Skip to main content
This section provides developer reference documentation for Megapot’s smart contracts, including function signatures, parameters, and usage examples.

Contract Addresses

All contracts are deployed on Base (Chain ID: 8453). You can find contract ABIs and artifacts here

Security Audits

The Megapot protocol has been independently audited:
The bug bounty program is no longer active. New vulnerability submissions will not be addressed. See Security and Bug Bounty for the closed program record. Read Announcement.
The Megapot protocol above operates autonomously, enabling anyone to build on it, or use it, without permission.
Looking for read-only off-chain data? For round history, wallet aggregates, leaderboards, or any cross-drawing analytics, use the Data API instead of the contract reads documented below. The API is read-only — keep RPC for live state and writes.

Architecture

Megapot uses a modular smart contract architecture:

Contract Categories

Core Contracts

User-Facing Contracts

Internal Contracts

Key Concepts

Ticket Structure

Tickets consist of 5 normal ball numbers and 1 bonusball:

Drawing State

Each drawing has a complete state record:

Prize Tiers

The system uses 12 prize tiers based on matches:

Referral System

Tickets can include referrers who earn fees:

Integration Quick Start

Buy Tickets

Claim Winnings

LP Operations