ABIs are served live, CORS-open, at
https://llms.megapot.io/abi/<Name>.json and .txt. Fetch them at build or runtime. Do not copy ABIs into your repo, they go stale. Use the contract addresses in the table below (verified on-chain on Base, chain 8453).Addresses (Base, chain 8453)
Purchase signatures
The five purchase routes all carry a trailingbytes32 _source telemetry tag, plus the two claim calls:
Before any purchase, approve USDC to the contract that receives payment (the contract you are calling). The full money-vs-telemetry split is covered in Referrals & attribution.
Key concepts
Ticket struct
normals is 5 unique numbers; ordering is not required to be sorted. Read ballMax and bonusballMax from Jackpot.getDrawingState() for the current drawing (do not hardcode 30), the ranges are per-drawing.
DrawingState at a glance
Jackpot.getDrawingState(_drawingId) returns the full state of a drawing. The fields you will reach for most:
Read the live referral rates from
referralFee and referralWinShare rather than assuming a fixed percentage.
Prize tiers
Matches map to one of 12 tiers,0 through 11, by the formula matchedNormals * 2 + (bonusballMatch ? 1 : 0). Tier 0 is no match; tier 11 (all 5 normals + bonusball) is the jackpot.
Tiers
0 and 2 never pay out.
Reading what each tier pays. Payout amounts are per-drawing, not protocol constants — the premium weights and guaranteed minimums behind them are owner-settable on GuaranteedMinimumPayoutCalculator and snapshotted when each drawing opens. Don’t hardcode percentages. Two ways to read them:
Note that
getExpectedDrawingTierPayouts ignores its arguments and returns the stored settled payouts once _drawingId < currentDrawingId — and all zeros during the rollover window before settlement writes them.
Architecture
Which contract do I call?
Jackpot (0x3bAe643002069dBCbcd62B1A4eb4C4A397d042a2) is the main entry point. If you integrate only one contract, integrate this one. The rest are thin helpers that route into Jackpot, each for a specific job:
Security & audits
The Megapot protocol has been independently audited and operates autonomously: anyone can build on it without permission.
ABIs and contract artifacts are published at github.com/coordinationlabs/megapot-v2-public.
Next: Back to Build · Referrals & attribution
