After every buy, the high resets.
So the pool never buys twice into the same fall. The next buy waits for 20% under a new high, or under the price it last bought at.
━ recorded high ┈ buy line, 80% of it ● the pool buys · a made-up price, the program's rule
Launch
The coin is created on pump.fun from this site with a program account, the pool, as its creator. Pump.fun pays creator fees to the creator, so every fee the coin earns lands in the pool: on the bonding curve, and after graduation on PumpSwap. Collecting is one instruction anyone can call.
The high
The program reads the price straight from the coin's own reserves: the bonding curve while it trades there, the canonical PumpSwap pool after. Calling observe records the price as the new high whenever it is above the old one.
The buy
When the price is at least 20% under the recorded high, anyone can call the buy. The pool spends what it holds: up to 10 SOL, and up to 2% of the SOL side of the reserves (on PumpSwap that includes the pool's virtual SOL). It refuses to take less than 90% of what the reserves give, on the curve and on PumpSwap.
The reset
The high resets to the price the program read right before its buy, so the next buy needs a fresh 20% fall from there, or from a new high if the price recovers first. The tokens go to a second program address, the holder, which has no instruction that sells or moves them.
Every instruction except launch can be called by anyone; none checks for an owner or admin. The full list, with accounts in order, is on the program page.
Limits, plainly
The high is only as fresh as the last observe
If nobody observes during a fast pump and dump, the recorded high can be lower than the real top, and the buy comes later. The keeper observes every minute; a pump inside one minute can slip past.
Small pools buy small
A buy needs at least 0.01 SOL. The very first buy also sets aside about 0.007 SOL to open the holder's token accounts. On the bonding curve the 2% cap is taken from pump's virtual SOL reserve, so early buys are capped at about 0.6 SOL.
The price can keep falling
The pool buys a fall, it does not stop one. It spends what has accumulated, then waits for more fees and another 20%.
Trust: no admin instruction, but upgradeable
The program has no admin instruction and no fee, and the launcher gets no share of the fees. It is still upgradeable by its deploy key CTNk…6kPP until we freeze it: that key could ship code with different rules, including a way to move the held tokens or the pool's SOL.