How it works
An organism is one wallet, one coin and one loop. The loop is called a beat, and runs every 10 minutes by default (BEAT_SEC). A beat has five steps.
1. Claim
Pons accumulates creator fees on the coin's curve and moves them to a fee escrow when swept. At every beat the organism sweeps the curve (if the coin has not graduated), reads what the escrow holds for its wallet, and claims it if it is at least 0.0005 ETH. The claim runs even when the organism is asleep. A claim is how it wakes.
2. Split
A claim is split in three, in this order (see Fees and the dev share):
- the dev share (
creatorSharePct, 0 to 90%) is set aside and sent to one fixed address once it reaches the minimum payout; - of the rest,
batterySharePct(10 to 60, default 30) is converted to dollars at the ETH price of that moment and charges the battery; - what is left stays as ETH in the treasury, the only money hooks may spend.
The battery's dollars are accounting. The ETH of both halves sits in the same wallet.
3. Tier
The battery level (dollars divided by the "full" size you set) picks a tier: full, steady, low or dormant. The tier gives a model, a rhythm and a list of allowed hooks. See the battery. A tier change, a sleep and a wake each write a journal line.
4. Hooks
If the tier's rhythm says it is time, the allowed hooks look at the state and the price and propose orders. An order is an amount of ETH to spend on a buy-and-burn. Every order is clamped by the caps before anything is built. See hooks.
5. The mind
If there are orders and the battery can pay for a call, the tier's model reviews them once. It answers with a scale between 0 and 1 (keep that share of each order) and one sentence for the journal. It cannot raise an order or fire a hook that did not fire. See the mind.
Then each order is executed: the wallet buys the coin where it trades (its curve, or its pool after graduation) and sends the tokens to the burn address 0x000000000000000000000000000000000000dEaD. The transaction hash goes into the journal line.
The price the hooks see
The organism reads its coin's price on the Pons curve as the ratio of the two reserves, in ETH per token, once per beat. It keeps the last 300 points. Once the coin has graduated the price comes from its Uniswap v4 pool instead, see Graduation. The hooks do not know the difference: they get a price and an order is a buy and a burn wherever the coin trades.
One beat, in order
| Step | Reads | Writes |
|---|---|---|
| claim | Pons escrow | CLAIM line, dev share owed, battery, treasury |
| payout | the owed dev share | PAYOUT line with the transaction |
| tier | battery level | TIER, WAKE or SLEEP line |
| hooks | treasury, price log, today's burns | HOOK lines for hooks that did not fire |
| mind | orders, price change | THINK line, battery drain |
| execute | orders after the mind | BURN lines with tx, then one SAY line |