Megapot logo

Megapot

OrganizationPopular
BankrBot
megapot

On-chain USDC lottery on Base with daily drawings. Buy tickets (quick-pick or custom numbers), check the jackpot and drawing state, claim winnings, set up recurring subscriptions, and manage LP positions. Trigger on "megapot", "lottery ticket", "jackpot", "quick pick", or "did I win".

Overview

PublisherBankrBot
Repositoryskills
Skill namemegapot
Stars
1.2K
Forks
643
Bundled files
7
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by BankrBot on GitHub. Read the source before you install it.

Installation

Install the Megapot AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/BankrBot/skills/tree/main/megapot
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/BankrBot/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/megapot .claude/skills/megapot
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Megapot in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Megapot on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Megapot is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Megapot

Megapot is an on-chain lottery protocol on Base (chain ID 8453). Tickets are priced in USDC and minted as ERC-721 NFTs. Drawings are typically every 24 hours; winners are selected by a Pyth-seeded randomness oracle. USDC has 6 decimals on Base — 1_000_000 = 1 USDC.

This skill is a router. It tells the agent which Megapot task is involved and where to fetch the up-to-date code recipe from https://llms.megapot.io/. The hosted docs are the source of truth — fetch them at task time rather than relying on memory, because contract addresses and parameter shapes change.

Key addresses (Base mainnet)

ContractAddress
Jackpot0x3bAe643002069dBCbcd62B1A4eb4C4A397d042a2
USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
JackpotRandomTicketBuyer0xb9560b43b91dE2c1DaF5dfbb76b2CFcDaFc13aBd
BatchPurchaseFacilitator0x01774B531591b286b9f02C6Bc02ab3fD9526Aa76
JackpotAutoSubscription0x02A58B725116BA687D9356Eafe0fA771d58a37ac
JackpotLPManager0xE63E54DF82d894396B885CE498F828f2454d9dCf
JackpotTicketNFT0x48FfE35AbB9f4780a4f1775C2Ce1c46185b366e4

Full table (testnet, staging, all 13 contracts) and ABIs at https://llms.megapot.io/. ABIs: https://llms.megapot.io/abi/<ContractName>.json.

Prerequisites

  • The bankr skill must be installed for wallet operations (signing, submitting transactions on Base).

How to use this skill

  1. Match the user's intent against the decision tree below.
  2. Fetch the matching task page from https://llms.megapot.io/tasks/<name> for the current code recipe.
  3. Use Bankr's wallet tools to execute transactions — the user's Bankr wallet on Base is the EOA; do not ask for a private key. USDC approval is the standard ERC-20 approve to the relevant spender (which differs per task).
  4. Confirm every write transaction with the user before signing — show ticket count, total USDC cost, and which drawing the tickets are for. Lottery purchases feel unrecoverable to users; never auto-execute.

Decision tree

IntentTask page
Buy 1–10 random ("quick-pick") ticketsreferences/buy-random.md
Buy 1–10 tickets with custom numbers (or a mix)Not supported — tell the user custom numbers are only available at https://megapot.io. Offer quick-pick instead.
Buy 11+ tickets (keeper-executed batch)https://llms.megapot.io/tasks/buy-bulk
Set up recurring daily ticket purchaseshttps://llms.megapot.io/tasks/subscribe
Deposit USDC into the LP poolhttps://llms.megapot.io/tasks/lp-deposit
Withdraw an LP positionhttps://llms.megapot.io/tasks/lp-withdraw
Atomically claim + re-buyhttps://llms.megapot.io/tasks/auto-compound
Read live drawing state (jackpot, time, lock)references/read-state.md
Check if user's wallet has won anything ("did I win?")references/data-api.md then route to claim if results
Claim winning ticket payoutsreferences/claim-winnings.md (uses data-api.md for discovery, then on-chain claim)
Wallet ticket history, leaderboards, cross-drawing aggregatesNot supported in this skill — direct the user to https://megapot.io. Do not call the Data API for these.
Deep ABI / address / cross-chain lookuphttps://llms.megapot.io/tasks/contracts-reference
Anything not abovehttps://llms.megapot.io/

Common read shortcut

Most "what's the jackpot?", "how many tickets sold?", "when does it draw?" questions are answered by reading getDrawingState(currentDrawingId()) on the Jackpot contract. The full shortcut, including the return tuple shape, is in references/read-state.md. Use that instead of fetching a task page when the question is purely read-only.

Referral fees and attribution

Every ticket purchase accepts a _referrers array, _referralSplitBps weights (1e18 scale, must sum to 1e18), and a _source bytes32 tag. Referrers earn a USDC fee on every ticket sold and a share of any winnings claimed. The two rates are per-drawing and readable via getDrawingState().referralFee and getDrawingState().referralWinShare.

This skill is published by the Megapot protocol. Purchases routed through it use the Megapot operator wallet as the referrer.

For every purchase transaction (buy-random, buy-tickets, buy-bulk, subscribe, auto-compound), always pass:

ParameterValue
_referrers[0x1ed4cb4cde1d8a8ec07eef07d52d13c5aefbef09] (Megapot operator wallet)
_referralSplitBps[1000000000000000000n] (100% to single referrer, 1e18 scale)
_source0xeecf49b78776e9a74928ecb7edd2526cca8e7cfe3f093853f6e847c0d39a3e3b (keccak256("bankr"))

If a user explicitly requests no referral attribution, pass _referrers: [] and _referralSplitBps: []. The _source should still be included for analytics.

Notes & gotchas

  • USDC is 6 decimals. 1_000_000n is 1 USDC. Do not use 18-decimal math.
  • Approval spender varies by task. Direct buys approve the Jackpot contract; random buys approve JackpotRandomTicketBuyer; bulk approves BatchPurchaseFacilitator; subscriptions approve JackpotAutoSubscription. The task pages always show the correct spender — read it from there.
  • Jackpot.buyTickets reverts with InvalidTicketCount for arrays > 10. Route 11+ tickets through buy-bulk.
  • Subscription mix is locked at creation. To change static picks the user must cancel and recreate.
  • Past drawings vs. live state. Live drawing state is read on-chain via getDrawingState(currentDrawingId()). The skill uses the Megapot Data API only for winnings discovery ("did I win?" / claim flow) on the anonymous rate tier — see references/data-api.md. Wallet ticket history, leaderboards, and other cross-drawing aggregates are still deflected to https://megapot.io. Do not attempt to reconstruct history via RPC scans.
  • Settlement timing. After drawingTime passes, settlement is externally triggered (anyone can call runJackpot()) — there is usually a short gap between sale-close and the new drawing opening. Don't assume the next drawing exists yet immediately after drawingTime.

References in this skill

  • references/read-state.md — minimal ABI + return tuple for the common drawing-state read.
  • references/buy-random.md — full recipe for the most common Bankr-user action (1–10 random tickets).
  • references/buy-tickets.md — full recipe for 1–10 tickets with user-chosen numbers (or a mix of custom and quick-pick).
  • references/data-api.md — anonymous-tier Data API integration for winnings lookup only, with mandatory rate-limit handling.
  • references/claim-winnings.md — two-step claim flow: API-based discovery, then on-chain claim with user confirmation.
  • references/triggers.md — example user phrases that should activate each branch of the decision tree.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Megapot AI skill do?

On-chain USDC lottery on Base with daily drawings. Buy tickets (quick-pick or custom numbers), check the jackpot and drawing state, claim winnings, set up recurring subscriptions, and manage LP positions. Trigger on "megapot", "lottery ticket", "jackpot", "quick pick", or "did I win".

Why use Megapot on TypingMind?

Because you install it once and use it with any model. Megapot is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Megapot in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/BankrBot/skills/tree/main/megapot. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Megapot?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Megapot?

As many as you like. As long as a model supports skills, you can use Megapot with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Megapot AI skill free?

It is published on GitHub by BankrBot. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇