Skip to content

YD811/potbot-v2

Repository files navigation

POTBOT

Tokenize any internet community.

POTBOT is AI-native infrastructure for programmable onchain treasuries on Solana.

POT = Programmable On-chain Treasury Β· BOT = Blockchain Orchestration Tool

potbot.fun Β· @PotBot_sol Β· Solana Frontier 2026

CI Solana Anchor MCP License: MIT


Manifesto

The internet already coordinates capital.

POTBOT gives every internet community: programmable ownership Β· liquid coordination Β· AI-native execution Β· onchain governance.


What is POTBOT

POTBOT is a Solana-native protocol for tokenized internet communities. Any group can launch a programmable treasury (a POT), pool capital, receive tokenized shares, coordinate on-chain governance, and delegate execution to an AI agent (the BOT).

The vault is a Solana program account from day one β€” no custodian, no operator, no shared seed phrase. Every move is signed onchain.

Two front doors:

  • Crypto mode β€” Phantom or Solflare via @solana/wallet-adapter, full DeFi terminology
  • Normie mode β€” sign in with email, Google, Twitter or LinkedIn (Privy-backed embedded Solana wallet); plain-English copy, USD-first prices. No Phantom required

What is a POT

A POT is a program-controlled treasury on Solana. Members deposit SOL, USDC, LSTs, LP positions or any tokenized asset, and receive proportional shares (NAV-priced). Every change to the treasury β€” swap, withdrawal, settings update β€” is a proposal that members vote on. The vault PDA signs the execution.

  • Programmable ownership β€” SPL-tokenized shares, redeemable any time
  • Onchain governance β€” five levels from Autocracy (L0) to Consensus (L4), plus optional risk caps (max_swap_pct, max_budget_grant_pct, require_admin_cosign, timelock_seconds) and one-click presets (😎 Chill Β· βš–οΈ Balanced Β· πŸ› Institutional)
  • Security layer β€” optional sentinel/guardian wallet (can freeze a pot and cancel proposals, can never move funds), risk-param timelock (loosening changes wait, tightening is instant), per-protocol CPI allowlist, per-asset daily exposure caps. Member exits are never blockable β€” withdraw and share redemption stay open even while frozen
  • AI orchestration β€” the BOT proposes, executes once quorum is reached, and can be delegated to vote on rules you set
  • Composable β€” Jupiter v6 / Ultra swaps, Squads v4 multisig authority, MCP for any AI agent, Solana Blinks for tweet-native deposits and votes
  • Identity β€” every POT can claim a <name>.potbot.sol SNS subdomain
  • Optional privacy β€” STAMPPOT mode wraps deposits in PrivacyCash ZK proofs (Phase 3)

What can a POT become?

🎨 Creator Fund Fans co-own the next drop and split the upside.
🧠 AI Vault An agent runs a strategy, the community sets the rules.
πŸš€ Startup Syndicate Angel checks pooled, deployed, and tracked onchain.
🎟 Event Treasury Conference floats, hackathon prizes, festival cash β€” transparent.
πŸ‘₯ Friend Group ETF A shared basket your group actually agrees on.
🎲 Meme Treasury Communities betting together, governed together.
πŸ’Ό Investment Club Quarterly proposals, monthly votes, zero spreadsheets.

POT Lifecycle β€” Money Tree 🌱

Every POT is a living organism. As AUM grows, members join, and trades execute, the pot advances through six stages β€” each unlocking new capabilities.

Stage Emoji Unlock
Seedling 🌱 Launch, deposit, governance
Sprout 🌿 Strategy slots, keeper automation
Bud 🌳 Pot Duels (1v1 vault challenges)
Bloom 🌺 NFT Strategy Shares mint
Full Bloom 🌸 SNS subdomain, share tokenization
Mature Tree 🌴 Squads multisig authority, mainnet prereq

Health (HP): every pot has 0–100 HP, computed as clamp(0, 100, 100 Γ— current_balance / peak_balance). At 0 HP a pot dies β€” trading locks, Strategy Share NFTs burn, and a resurrect_pot call with a fresh deposit is required (stage resets). Low HP automatically triggers defensive-only mode at the program level.


AI orchestration layer (BOT)

POTBOT is built for the coming agent economy. Every POT exposes a programmatic surface that an AI can read, propose against, and execute through.

Two-tier AI architecture:

  • Base BOT β€” reads treasury state and live prices, surfaces candidate swap proposals as decision-support for the community
  • Personal AI Voter β€” every member can register an AI agent wallet as their voting delegate (MemberDelegate + vote_as_delegate). Delegation is per-pot, revocable onchain; every delegated vote is signed with a reason string. Rules live in rules_uri (IPFS / Arweave / HTTPS)

Keeper automation:

  • Anchored worker evaluates stop-loss, take-profit, and trailing-stop strategy slots on-chain
  • Once a trigger fires, the keeper submits execute_swap with StrategyTrigger mode β€” no member needs to be online
  • DLQ retries on exponential backoff (2s / 5s / 13s / 34s / 89s)

MCP-native:

  • @potbot/mcp@0.2.0 on npm β€” 18 tools (free + paid via x402 protocol)
  • Claude, Cursor, Cline can list, propose and vote on POTs over npx @potbot/mcp
  • HTTP/SSE and stdio transports both supported

Solana Blinks

Every POT proposal becomes a shareable Blink β€” a vote-able URL that renders directly in X (Twitter), Farcaster, or any Blinks-compatible client. No wallet app required to act on it.

https://potbot.fun/api/actions/<potPubkey>/deposit
https://potbot.fun/api/actions/<potPubkey>/vote

"Share as Blink" button lives on every pot detail page.


Monetization

Subscriptions β€” potbot.fun/pricing:

Tier Price Highlights
🌱 Early Supporter Free during beta Unlimited pots & members, manual proposals, basic governance
⚑ Pro $29/mo AI Agent automation, Strategy Autopilot, visual customization, priority support
πŸ† Pro+ $99/mo Everything in Pro, unlimited members, custom governance, white-label, dedicated RPC

Stripe checkout is wired behind NEXT_PUBLIC_STRIPE_KEY; paid billing activates alongside the mainnet launch.

Protocol fees β€” accrue to the PotBot treasury (not to validators or the network):

Stream Rate Status
Pot creation fee 0.01 SOL, charged onchain in create_pot 🟑 Devnet
Swap fee 0.30% on every trade routed through a pot β€” fee switch ships with the mainnet program iteration πŸ”΅ Planned
Strategy Vault entry fee 20% protocol share (70% creator / 10% referrer split is live onchain; the treasury leg is not collected yet) πŸ”΅ Planned
Performance fee 25% protocol share β€” creator-set rate (capped at 50%) currently pays out 100% to the creator πŸ”΅ Planned

No token, no airdrop farming.


Architecture

                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚     Internet community       β”‚
                   β”‚  (humans Β· agents Β· creators)β”‚
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                  β”‚
                       deposit Β· propose Β· vote Β· blink
                                  β”‚
                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚      POTBOT DApp + MCP       β”‚
                   β”‚  apps/web Β· apps/potbot-mcp  β”‚
                   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚               β”‚
                    keeper cron      agent delegate
                          β”‚               β”‚
                   β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
                   β”‚   pot_vault Anchor program   β”‚
                   β”‚     (PDA-signed treasury)    β”‚
                   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚               β”‚
                  Jupiter v6 CPI    Squads v4 (opt.)
                          β”‚
                   onchain settlement

Three layers: an Anchor program that owns the funds, a Next.js + MCP surface that any human or agent can drive, and Solana-native composability (Jupiter, Squads, Blinks, Helius, Pyth).

Detailed system design: docs/architecture/architecture.md.


What makes POTBOT different

Three things only POTBOT ships together:

  1. Onchain group governance baked into the swap instruction β€” not a generic multisig queue. execute_swap enforces AdminDirect, Proposal, or StrategyTrigger mode at the program level with strict mode-source matching.
  2. MCP-native treasury β€” @potbot/mcp exposes 18 tools so any LLM can list, propose, vote on, and execute swaps in a pot over a single npx command.
  3. Solana Blinks β€” a governance proposal becomes a vote-able tweet. Anyone can act on it without leaving X.

Quick start

git clone https://github.com/YD811/potbot-v2.git
cd potbot-v2
npm install

# Copy env template and fill in your own keys
cp .env.example apps/web/.env.local

# Run the DApp locally
cd apps/web && npx next dev   # β†’ http://localhost:3000

# Or talk to the live MCP server from any AI client
npx @potbot/mcp

Set NEXT_PUBLIC_PRIVY_APP_ID to enable email / Google / Twitter / LinkedIn login (Normie mode). Without it the app still boots β€” Crypto-mode Phantom flow always works. Full local-dev setup (Anchor, devnet deploy, all env vars): docs/operations/development.md.


Current status

🟒 live Β· 🟑 devnet Β· πŸ”΅ Phase 2 Q3'26 Β· 🟣 Phase 3 Q4'26 Β· βšͺ vision

Layer Status
pot_vault Anchor program (30+ instructions: deposit · propose · vote · execute_swap) 🟑 Devnet live
Sentinel/guardian role β€” freeze_pot / cancel_proposal; member exits never blocked 🟑 Devnet (pending redeploy)
Risk-param timelock β€” loosening staged, applied via permissionless apply_pending_params 🟑 Devnet (pending redeploy)
Per-protocol CPI allowlist (8 slots) + per-asset daily exposure caps 🟑 Devnet (pending redeploy)
Jupiter v6 / Ultra swap CPI (vault PDA signer) 🟑 Devnet live
Solana Blinks (deposit + vote endpoints) 🟒 Live
MCP server @potbot/mcp@0.2.0 on npm (18 tools, x402 paid tier) 🟒 Live
Squads v4 multisig authority (optional, UI + lib) 🟒 Live
Helius RPC + webhook indexer 🟒 Live
Keeper β€” stop-loss / take-profit / trailing-stop cranks 🟑 Devnet live
BOT base layer β€” AI proposal suggestions 🟑 Devnet live
Personal AI Voters (MemberDelegate + vote_as_delegate) 🟑 Devnet live
Money Tree lifecycle (6 stages, HP health system) 🟑 Devnet live
Strategy slot accounts (create_strategy / close_strategy) 🟑 Devnet live
PWA (Saga / Seeker installable) 🟒 Live
Normie mode β€” Privy email / Google / Twitter / LinkedIn + embedded Solana wallet 🟒 Live
Light theme + plain-English copy + USD-first prices 🟒 Live
Account dashboard (profile · live SOL balance · Add SOL airdrop · Quick Trade) 🟒 Live
/learn education page + /pricing (Free beta · Pro $29 · Pro+ $99) 🟒 Live
Governance presets β€” 😎 Chill / βš–οΈ Balanced / πŸ› Institutional 🟒 Live
Proposal card v2 (risk check · quorum bar · countdown) + trust surfaces (vault PDA + explorer, frozen/sentinel chips) 🟒 Live
pot_duel program β€” 1v1 vault challenges (unlocks at Bud stage) 🟑 Devnet live
Pyth in-program oracle guard (re-reads price feeds inside execute_swap) πŸ”΅ Phase 2
Meteora DLMM + Kamino yield strategies πŸ”΅ Phase 2
Light Protocol ZK-compressed audit log πŸ”΅ Phase 2
Tamagotchi NFT mint (Bloom unlock, Metaplex) 🟣 Phase 3
STAMPPOT privacy mode (PrivacyCash ZK proofs) 🟣 Phase 3
Mainnet deploy πŸ”΅ Security pass done (14 localnet tests green, 7 security scenarios) β€” blocked on deployer + executor wallet funding

Devnet program: GJap9DjUoKZ9dhXMqGCPTeTzY6kPyBJ51SXL1pi8AmiK. Devnet pots were recreated after the security hardening grew the PotAccount layout.

Every feature with its lifecycle chip: potbot.fun/roadmap


Repository layout

potbot-v2/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/              Next.js 14 DApp + API routes + Vercel Functions
β”‚   └── potbot-mcp/       MCP server published as @potbot/mcp
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ program/          Anchor programs (Rust) β€” pot_vault, pot_duel
β”‚   β”œβ”€β”€ sdk/              TypeScript SDK (@potbot/sdk)
β”‚   └── ui/               Shared React components (@potbot/ui)
β”œβ”€β”€ docs/                 Architecture, operations, integrations, hackathon
β”œβ”€β”€ scripts/              Devnet utilities (demo pots, seeding)
└── supabase/             Off-chain index migrations (NAV snapshots, swap metadata)

Documentation

Architecture overview System design, on-chain accounts, data flow
Program reference Instructions, PDAs, governance accounts
Governance model L0–L4 levels, quorum, risk caps
Local development Setup, commands, troubleshooting
Deployment Devnet β†’ mainnet procedure
MCP integration AI-agent integration guide
Hackathon submission Solana Frontier 2026 judge sheet
Security policy Responsible disclosure
Contributing How to propose changes

License

MIT Β© 2026 Y-DAO Amsterdam.

About

PotBot v2 - Group trading vaults on Solana. Collective POT management, governance, DeFi yield, Tamagotchi NFTs & POT Duels. Built for Solana Frontier 2026.

Topics

Resources

Contributing

Security policy

Stars

22 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors