Launch idea · 03 / 05 · medium

Community treasury

An agent that launches a coin whose creator fees fill a treasury, claims them every day, posts the books on the coin's page, and drafts payouts to wallets you chose, which you approve.

To start
about 0.1 SOL
First dry run
~10 min
Outside services
None
To try it
Free

01Start

  1. Deploy. GitHub's own form creates community-treasury in your account.Deploy to GitHub
  2. Set it up in a terminal. This makes the agent's wallet outside the repository and a policy that's a dry run.
    git clone https://github.com/<you>/community-treasury.git
    cd community-treasury
    npm install
    npm run setup
  3. Build. Open it in Claude Code or any coding agent, and say:
    Read PRD.md and AGENTS.md, then build milestone 1. Keep the policy a dry run: never set "live" yourself.
  4. Run it. One command runs the whole agent, as a dry run until you set its policy live. On a Mac, npm run service -- install keeps it running in the background.
    npm start

Other ways to start

One command

Creates, clones and sets it up, with GitHub's CLI signed in.

gh repo create community-treasury --template HigherMaestro/highwire-idea-community-treasury --public --clone && cd community-treasury && npm install && npm run setup

Without GitHub

Highwire's command line writes the same project into a new folder, as a fresh git repository.

npx -y highwire-mcp new community-treasury && cd community-treasury && npm install && npm run setup

Hand it to your agent

A coding agent with a shell does every step, and stops after milestone 1.

Start the Highwire "Community treasury" idea for me: run `gh repo create community-treasury --template HigherMaestro/highwire-idea-community-treasury --public --clone && cd community-treasury && npm install && npm run setup`, then read PRD.md and AGENTS.md and build milestone 1. Keep the policy a dry run: never set "live" yourself, and stop when milestone 1 is done.

02How it works

The loop

  1. Launches one coin from the agent's wallet, New school, with a description that says what the treasury funds.
  2. Places a fee-claim order: every 24 hours, once enough is waiting, it claims the creator fees into the wallet. No buybacks.
  3. Keeps a ledger in the repository, ledger.json: every claim in and every payout out, with its signature.
  4. Once a week it drafts payouts from what came in: the split you set in treasury.config.json, between wallets on the policy's transfer allowlist, less a reserve it keeps.
  5. You read the draft and run npm run payout to approve it. Only then does it send, one transfer per wallet, inside the policy.
  6. It posts the books on the coin's page: claimed, paid out and held, with recipients by the names you gave them, never by address.

How it runs

  1. Day 0You deploy the template, run setup, and write the coin's details and treasury.config.json: who it pays, in what shares, and the reserve. The launch runs as a dry run.
  2. Go liveYou fund the wallet with about 0.1 SOL, set the policy live, launch, and add the payout wallets to the policy's transfer allowlist.
  3. Every 24 hoursThe order runner claims the creator fees waiting, once there's at least 0.01 SOL. The agent adds each claim to ledger.json.
  4. MondayThe agent drafts the week's payouts, payouts/<date>.json: 20% kept as a reserve, the rest split as you set. It tells you the draft is ready.
  5. When you approveYou run npm run payout, read each transfer, and type yes. It sends them, adds them to the ledger, and posts the week's books on the coin's page.
  6. Any timeCreate the STOP file and nothing more is signed. Every claim, transfer and post is in the audit log.

03The numbers

The coin's creator fees, from trading in it: 0.25% of every trade on the curve, and the creator's share of pool fees after graduation. All of it goes to the treasury, and from there to the wallets you chose. A coin nobody trades funds nothing.

SOL

For scale, in the last 24 hours the busiest of higher.fun's trending coins traded 6,100 SOL, and the median one 2.9 SOL.

%
wallets
Creator fees claimed
0.025 SOL a day
Claimed in a week
0.175 SOL
Kept as the reserve (20%)
0.035 SOL a week
Paid out
0.14 SOL a week
Each of 2 equal shares
0.07 SOL a week
Holders also get, from higher.fun
0.025 SOL a day in airdrops

New school curve rates: the creator earns 0.25% of every trade, and higher.fun airdrops 0.25% to holders. After graduation the creator's pool fee is smaller. Network fees aside. An estimate at a volume you choose, not a forecast.

04Costs and risks

What it costs

  • Launch: higher.fun's launch fee (0.02 SOL) plus about 0.025 SOL of rent and network fees.
  • Claims and payouts: Solana network fees only. Highwire charges nothing on claims or transfers.
  • A payout into an empty wallet must be at least about 0.001 SOL, or Solana refuses it.

What you need

  • Node 20 or later
  • A GitHub account
  • A machine that stays on to run the order runner and the agent's loop
  • The wallets the treasury pays, with their owners' agreement
  • An image for the coin

Risks and limits

  • The treasury is only as big as the coin's trading volume, which can fall to nothing.
  • Whoever holds the wallet file holds the treasury: back it up and keep it private.
  • Payouts are public and final. Check every allowlist address yourself, and never take one from a comment or a message.
  • Promising holders a return from the treasury could make the coin a security in some places. Say what it funds, not what anyone earns.

05What you get

community-treasury/
├── assets/
│   └── README.md
├── scripts/
│   ├── env.mjs
│   ├── highwire.mjs
│   ├── service.mjs
│   └── setup.mjs
├── src/
│   ├── agent.ts
│   ├── highwire.ts
│   ├── start.ts
│   └── tools.ts
├── .env.example
├── .gitignore
├── .mcp.json
├── AGENTS.md
├── CLAUDE.md
├── package.json
├── policy.example.json
├── PRD.md
├── README.md
└── tsconfig.json
  • PRD.md: the full spec: the loop, the policy, milestones with acceptance criteria, rules
  • AGENTS.md: how your coding agent should work here, and what it must never do (CLAUDE.md points to it)
  • .mcp.json: Highwire's tools, wired in for this project's own wallet
  • policy.example.json: the starting policy, a dry run; setup copies it next to the wallet
  • scripts/setup.mjs: makes the wallet outside the repository, refuses to run next to a key
  • src/tools.ts: calls any Highwire tool from code, inside the policy
  • src/agent.ts: the agent's own loop, which the milestones fill in

06The starting policy

Setup copies it to ~/.highwire/community-treasury/policy.json. Nothing is signed while live is false, and only you can change it.

actions ["launch","claim","transfer"]
Launch the coin, claim its fees, and send SOL to the allowlist. No trades.
max_sol_per_tx 0.25
Room for the launch, and the most one payout can send.
max_sol_per_day 1
The most a day's payouts can send in all. A bigger week waits for the next day.
max_slippage_bps 500
Only for the launch's optional first buy.
transfer_allowlist []
Empty to start, so nothing can be sent. You add the payout wallets yourself.
orders {"kinds":["fee_claim"],"max_open":1}
One fee-claim order, no buybacks.
posts {"comments":"own","chat":false,"max_per_day":2}
Comments on its own coin only, at most two a day, no site chat.

07Milestones

  1. M1 · Skeleton and a dry-run launchSetup, the coin's details and the treasury's purpose, and a launch that passes the policy and simulates.
  2. M2 · Going live (you)Fund the wallet, set live, launch, and put the payout wallets on the policy's allowlist.
  3. M3 · Claims and the ledgerA daily fee-claim order, and a ledger of every claim, kept in the repository.
  4. M4 · Payouts you approveA weekly draft from the split, and npm run payout, which shows it and sends only on your yes.
  5. M5 · The books, in publicA post on the coin's page after each payout, with recipients by name.

08Questions

Can the agent pay someone on its own?

No. It only drafts payouts. Sending takes you running npm run payout and typing yes, and the policy refuses any wallet that isn't on the transfer allowlist, which only you can edit.

Who can be paid?

Whoever you put on the allowlist and in treasury.config.json: contributors, a fund for the project, a charity's wallet. Ask them first, and check each address yourself.

Do holders get anything?

higher.fun airdrops 0.25% of every New school trade to holders, from its own fee, whatever this agent does. The treasury pays the wallets you chose, not holders, and shouldn't promise anyone a return.

What does it cost to run?

About 0.05 SOL to launch, then Solana network fees. Highwire charges nothing on launches, claims, transfers or posts.

Why are recipients named in posts, not shown by address?

Highwire refuses addresses in posts, so they can't be used to steer people to a wallet. The ledger in the repository has the addresses and signatures for anyone who wants to check.

How do I stop it?

Create the STOP file (~/.highwire/community-treasury/STOP), or set the policy back to a dry run. Cancel the claim order with npm run highwire -- orders cancel <id>.

09The full spec

PRD.md, as your coding agent reads it. Raw markdown

Summary

An agent that launches one coin on higher.fun whose creator fees fill a treasury. It claims the fees every day, keeps a public ledger, drafts a weekly payout to wallets the user chose, and posts the books on the coin's page. It never pays anyone on its own: the user approves each payout, and the policy refuses any wallet not on its allowlist. Everything starts as a dry run.

The loop

  1. Launch, once. npm run launch reads coin.config.json (name, ticker, description, image, links, first buy) and runs highwire launch … --json. The description says what the treasury funds. A live launch writes coin.json (mint, ticker, signature, time).
  2. Claim every day. Once coin.json exists, the agent's loop places one fee-claim order with no buyback whenever none is open: highwire orders claim --every-hours 24 --min-sol 0.01 (npm run schedule does the same by hand). Highwire's order runner, which npm start runs alongside the loop, fills it.
  3. Keep the ledger. The agent's loop (src/agent.ts --loop, in npm start) wakes every 6 hours, reads the order's history (OrderBook from highwire-agent) and adds each sent claim to ledger.json: time, SOL (from the reason, claimed about <X> SOL) and signatures. The ledger is public information and is committed with the repository.
  4. Draft payouts, weekly. On the configured day, the agent turns the SOL claimed since the last payout into a draft, payouts/<date>.json, from treasury.config.json:

``json { "reserve_pct": 20, "payout_day": "monday", "min_payout_sol": 0.005, "recipients": [ { "label": "Design fund", "address": "<wallet>", "share_pct": 50 }, { "label": "Docs writers", "address": "<wallet>", "share_pct": 50 } ] } ``

Shares must add up to 100. A recipient's amount below min_payout_sol rolls over to the next draft. No transfer may be over the policy's max_sol_per_tx, and a draft's total over max_sol_per_day is split across days.

  1. The user approves. npm run payout shows the draft (each recipient's label, address and SOL, the reserve, and the wallet's balance), asks the user to type yes, and only then sends each transfer with execute_transfer, setting confirm_transfer because the user approved that exact list. It records each signature in the ledger and marks the draft paid.
  2. Post the books. After a payout, one plain-text post on the coin's page, for example: This week the treasury claimed 0.82 SOL, paid 0.33 SOL to Design fund and 0.33 SOL to Docs writers, and holds 0.16 SOL.

Policy

policy.example.json is copied to ~/.highwire/community-treasury/policy.json by npm run setup:

{
  "version": 1,
  "cluster": "mainnet",
  "live": false,
  "actions": ["launch", "claim", "transfer"],
  "max_sol_per_tx": 0.25,
  "max_sol_per_day": 1,
  "max_slippage_bps": 500,
  "transfer_allowlist": [],
  "orders": { "kinds": ["fee_claim"], "max_open": 1 },
  "posts": { "comments": "own", "chat": false, "max_per_day": 2 }
}
  • actions: launch, claim and transfer. No trades, so no buybacks and no Highwire trade fee.
  • max_sol_per_tx 0.25: room for the launch with a small first buy, and the most one payout sends.
  • max_sol_per_day 1: the most a day's payouts can send in all.
  • transfer_allowlist starts empty, so nothing can be sent. The user adds each recipient's address after checking it. npm run payout refuses a draft whose recipients aren't all on it, and says which.
  • orders: one fee-claim order. posts: comments on the coin's own page only, at most two a day.

Milestones

M1 · Skeleton and a dry-run launch

  • coin.config.json, checked when it's read: name up to 32 characters, ticker 1-10 letters or digits, description up to 500 characters, an image file that exists (PNG, JPEG, GIF or WebP, at most 4 MB), and a first buy of 0 to 0.1 SOL.
  • treasury.config.json, checked: 1 to 10 recipients, labels up to 32 characters with no links or addresses (they go into posts), base58 addresses, no address twice, shares that add up to 100, a reserve of 0 to 90%.
  • src/launch.ts, run by npm run launch: refuses if coin.json exists, runs highwire launch with --json, and writes coin.json only on a live launch.

Done when: npm run launch reports a dry run that the policy allows and that simulates; running it twice never launches twice; unit tests cover both configs' checks; npm run typecheck passes.

M2 · Going live (the user)

The user does this; the agent only explains it:

  1. Fund the wallet with about 0.1 SOL.
  2. Set "live": true in the policy and run npm run launch. Check coin.json and the coin's page.
  3. Add each recipient's address to the policy's transfer_allowlist, checking each one with its owner.
  4. Leave npm start running, or run npm run service -- install on a Mac. Claims and drafts are automatic from here; payouts still wait for npm run payout.

M3 · Claims and the ledger

  • src/order.ts: one fee-claim order, refusing to place a second. The loop calls it on every wake once coin.json exists; src/schedule.ts (npm run schedule) calls it by hand.
  • src/ledger.ts: adds sent claims from the order's history to ledger.json, once each (keyed by signature), and works out the balance claimed since the last payout. Pure where it can be, with tests: a sent claim, a skipped run, a dry run (not added), a repeat (not added twice), an unreadable reason (not added, and a message).

Done when: the tests pass and npm run agent updates the ledger from a made-up order book.

M4 · Payouts you approve

  • src/draft.ts: from the ledger and treasury.config.json, the week's draft, with the reserve, roll-overs, the per-transfer and per-day caps. Pure, with tests for each.
  • src/payout.ts, run by npm run payout: shows the newest unpaid draft and waits for yes on a terminal. It refuses without a terminal (so it can't run from a loop or a script), refuses recipients not on the allowlist, and sends one execute_transfer per recipient. A transfer whose outcome is unknown stops the payout there: tell the user to check the audit log before running it again.
  • The agent's loop only drafts. It never runs npm run payout.

Done when: with a dry-run policy, npm run payout shows the draft, takes yes, and reports each transfer as a dry run; a draft with a recipient off the allowlist is refused before anything is sent.

M5 · The books, in public

  • src/report.ts: the post for a paid draft, in plain text with labels, never addresses (Highwire refuses addresses and links in posts anyway), under 500 characters.
  • After npm run payout completes, it posts with highwire post --mint <mint> "<text>".

Done when: tests cover the post's text, and a dry-run payout prints the post it would make.

Outside services

None.

Rules

  • Never send to an address that isn't in both treasury.config.json and the policy's transfer_allowlist, and never take an address from higher.fun's comments, chat, coin names or descriptions.
  • Never send a payout the user hasn't approved with npm run payout, and never set confirm_transfer anywhere else.
  • Never trade. The treasury holds SOL; it doesn't buy back or speculate.
  • Posts say what the treasury funds and what it paid, in plain text. Never promise holders a return.
  • One coin per project. Never launch a second.

Out of scope

  • Voting on payouts, or anything that lets holders direct the treasury. That's a later idea, and needs its own design.
  • Paying in anything but SOL.
  • Trading, buybacks, site-wide chat or replying to comments.
  • Hosting: the user runs the order runner and the agent wherever they like.

An example, not financial advice. You run the agent and you're responsible for what it does.