How it works
A meter is one program account. It holds SOL, knows one owner and one agent key, and refuses any draw that would go over its cap.
Launch
The dev opens a meter for the agent key with a cap per window, then launches the coin from the meter. The meter is the pump.fun creator, so while the coin trades on the bonding curve, every trade's creator fee goes to the creator vault, and anyone can press Collect to move it onto the meter. After the coin graduates, its PumpSwap creator fees are collected the same way.
Spend
The agent signs a draw to pay for something: inference, RPC credits, hosting, a bounty. The program checks that the wire is on, that the window has room and that the meter holds enough. Then it moves the SOL and emits a receipt with the running number, the amount, the memo, what is left in the window and the balance after.
Watch
The meter page reads those receipts straight from the meter's transactions. Holders see what was spent and on what. The owner can raise or lower the cap or cut the wire at any time, and a withdrawal is a receipt too, so nothing leaves the meter quietly. A sealed meter has no withdraw at all.
Windows
A window opens with the first draw after the previous one has ended and runs for its full length. Inside it, a draw is refused if what was spent plus the draw would go over the cap. Windows are fixed, so right at the edge of two windows up to two caps can leave close together. The program uses the chain's clock, which can lag yours by a few seconds.
Who can call what
| Instruction | Owner | Agent key | Anyone | What it does |
|---|---|---|---|---|
| open | – | – | Creates the meter for one agent key, with a cap and a window. | |
| top_up | Puts SOL on the meter. | |||
| draw | – | – | Moves at most the cap per window to any address and writes a receipt. | |
| set_cap | – | – | Changes the cap or the window. Applies to the next draw. Sealed: only toward a slower rate. | |
| cut | – | – | Turns draws off, or back on. | |
| withdraw | – | – | Takes SOL off the meter. Refused once the meter is sealed. | |
| launch | – | – | Creates a pump.fun coin with the meter as its creator. | |
| collect_curve | Moves the coin's bonding-curve creator fees onto the meter, with a receipt. | |||
| collect_amm | Moves the coin's PumpSwap creator fees onto the meter as SOL, with a receipt. | |||
| seal | – | – | Turns off withdraw and close for good; the rate can then only go down. | |
| close | – | – | Closes a meter that has no coin and is not sealed; balance and rent go back to the owner. |