Skip to content

Keepers

A market only moves when someone applies a reading, a ticket only settles when someone executes it, and a settled ticket only pays out when someone delivers it. Nothing about that work is privileged: anyone can do it, and the bounty share of every fee pays for it. There is no keeper program and no allowlist. The one exception is posting a relayed reading, which only Sagitta’s price signers can sign.

Job Instruction What it does Who pays
Execute execute Applies the readings that are ready and settles up to 32 matured tickets and 16 readings, oldest first, each at the NAV right after its own reading The tickets’ bounties, to the caller’s market wallet
Poke poke The same, up to 8 tickets The same
Deliver deliver Pays settled tickets: mints shares into each owner’s token account, pays SOL that leaves the account above its rent minimum, and returns each closed ticket’s deposit to its trader Nothing: it is quick and cheap, and the keeper does it within moments
Secure secure Copies waiting tickets’ readings into them, and a retiring market’s freeze reading into the market, so a ring turning over can’t take them Nothing: the tickets’ bounties go to whoever executes them
Capture capture_round Copies a feed’s new round into a Chainlink market’s round log Nothing: the tickets’ bounties go to whoever executes them
Prepare an epoch prepare_epoch Creates a side’s new mint after a roll and files away the old epoch Its deposits come from the market’s burn share when it covers them
Retire retire Retires a market core reports retired: sunset, or its route, quote, stock token or feed closed. It freezes at a reading taken after the call Nothing
Freeze an idle market retire_idle Freezes a memecoin market that has sat empty for 30 days Nothing
Unstick a ticket quarantine_head Turns a ticket stuck at the head for 72 hours into a whole refund Nothing
Collect collect_fees Sends the market’s burn share to the burn vault, once at least 10 caller fees have accrued One caller fee, 0.00001 SOL
Sweep sweep Trims a market’s deposits as rent falls, and sends the surplus to the burn vault One caller fee
Trim core’s trim_rent Trims core’s records and rings as rent falls, and sends the surplus to the burn vault Nothing: the whole surplus goes to the burn vault
Close close_market, close_epoch Close drained markets and drained old epochs (details) A caller fee per account closed
Close a ring core’s close_ring Closes a ring no market holds Nothing: its whole deposit goes to the burn vault
Close a referral close_referral Closes a frozen or closed market’s referral binding Nothing: its deposit goes back to the binding’s recipient
Burn the burner’s burn Runs the period’s buy and burn of $SAGITTA The vault’s call fee, 0.00005 SOL
Prepare the burner the burner’s prepare Creates the accounts a burn needs, once for each burner core names Nothing: the caller pays their deposits
Retire a burner the burner’s retire Once core names another burner or none, burns what the old one holds and sends its accounts’ deposits to the burn vault Nothing

Each call reports what it handled and whether more is left, and a call with nothing to do changes nothing. On every market but a Chainlink one, a commit into an empty queue also takes the newest reading, so busy markets move without help; no commit ever settles a ticket, though, so keepers matter for every waiting ticket and for quiet markets. When they act doesn’t change the price a ticket fills at: that is fixed by the first reading after its commit.

10% of every fee goes to bounties. Executing a ticket earns that ticket’s bounty share, up to 0.005 SOL, and the rest of the share goes to the burn; there is no bounty pool. A call’s bounties are added up and credited once to the market wallet it names as beneficiary; a call that names none burns its bounty. A refunded ticket pays no fee and so no bounty.

On a relayed market, each ticket also pays a 0.00002 SOL reading fee to the poster of the reading that fills it, the fee payer the price signers named in the signed message (see Relayed prices). Every posted reading is listed with its signers and poster by GET /api/readings.

The minimum buy is sized so that its bounty covers a batched execute at busy priority fees. A one-ticket execute of a small buy may not pay for itself alone, and relies on bigger tickets sharing the call, or on its owner: Execute on the market page settles a matured ticket for the network fee and pays its bounty to whoever sends it.

Every instruction fits Solana’s default compute limit except an execute at the edge of its budget: many paying readings maturing many tickets in one call. Sagitta’s keeper sets a 300,000-unit limit on every execute; a call that runs out fails whole and changes nothing, and the next one, with fewer tickets or the higher limit, picks up where the queue stands. An execute also stops early, with more left, before its events could overflow a transaction’s instruction trace, and the next call resumes.

Sagitta runs a keeper of its own, with a standby that takes a job only once it has been due a while longer. Neither has special rights: every call they send is one anyone could. The keeper pays for its own work from what the work earns: bounties, reading fees, caller fees and the burn’s fees. It:

  1. posts relayed readings the price signers sign: the target of every waiting ticket and of every retiring market, the first reading a new listing needs, and each burn period’s grid reading, each once the blocks it is computed from are final and inside its window;
  2. executes and delivers: the due tickets of every queue, with every wallet they credit, then every settled ticket a delivery can pay; it captures each new Chainlink round on every market with a ticket waiting, and on every retiring Chainlink market until it freezes, and secures waiting tickets’ readings before their ring turns over;
  3. retires and freezes: retires markets core has retired, sends the execute that freezes a silent market, freezes memecoin markets idle for 30 days, and unsticks a ticket stuck 72 hours;
  4. collects, sweeps and closes: collects each market’s burn share and sweeps surplus rent once 10 caller fees are due, prepares new epochs, and closes drained markets, old epochs, frozen referrals and unused rings;
  5. runs the burn in each period’s open slots once its four grid readings are posted, after preparing each new burner’s accounts once;
  6. lists: checks every stock token against the listing floor daily, writes the allowlist proposals for the timelock, lists each newly allowed stock token and feed, and watches listed stock tokens for the quick stop (see Stock tokens);
  7. watches: recomputes posted readings, a pool reading from the ledger and a stock reading from the record of Jupiter’s answer kept when it was signed or its own sample of Jupiter, fires the sentinel on a mismatch, and raises a reading it can’t check with Sagitta’s operators (see Relayed prices).

It simulates every call before sending it, and never sends one that would fail. A reading at its last chance to post, and the execute that freezes a market, go out whatever the priority fee: prices always post.

  • With the SDK: readQueue, readRing and the market views say what each market needs, and its builders make every call above for your key to sign (see SDK).
  • With the CLI: node sagitta.mjs work lists what is pending, then execute <market> and poke <market>, each with --send (see Agents).
  • Over HTTP: GET /api/arena?keeper=1 lists the same work, and POST /api/arena builds execute, poke, deliver and retire for your key to sign (see The trading API).
  • Without it: call the market program directly (see Programs and Exit without the site).

To earn bounties, open your market wallet first: node sagitta.mjs wallet open --send, or Open market wallet on your portfolio.