Skip to content

Programs

Program What it does Holds Admin
sagitta_core The registry (versions, pauses, sunsets, the quote, stock and feed allowlists, blocked coins, routes and pins, the bounded settings), the typed timelock, the guardian and the sentinel, the price signers, the reading rings, and the burn vault The burn vault’s SOL: every market’s burn share, returned deposits and trimmed rent, and the fees it owes posters and callers The timelock; the guardian and the sentinel can pause and remove a price signer. The launch settings were applied once, before any market existed, and sealed
sagitta_market_v1 Every market of version 1: listing, tickets, the readings of all three paths, settlement, delivery, wallets, epochs, freezes and closes. Each market is an account of its own and its own vault, with its own side mints All of its markets’ SOL: pots, escrowed buys, reading fees, owed balances and the burn share, each market in its own account; and every market wallet’s credits None. No instruction checks a role; governance reaches a market only through core’s flags
sagitta_burner_v1 The $SAGITTA buy and burn: draws a burn’s spend from the vault, buys on the PumpSwap pool within the move cap, burns what it bought, and has core check the result Nothing between burns None; the timelock names which burner the vault uses

A market reads its own source and nothing else. It never calls another market, and nothing grows with the number of markets on one coin, token or feed. Only commit_mint and donate read core’s gate to see whether buys are open, and only retire reads whether the market is retired. Cash-outs, executions, deliveries and claims never read core’s settings.

Instruction Who What it does
create_market Anyone Lists a market of any kind: its account, its two side mints and core’s record of it, seeded with 0.000002 SOL
commit_mint Anyone Queues a buy of the SOL sent as a ticket (details)
commit_redeem A holder Queues a cash-out, burning the tokens into the ticket
execute, poke Anyone Apply the readings that are ready and settle up to 32 (or 8) matured tickets, the bounty to the caller’s market wallet
deliver Anyone Pays a settled ticket what can land now, and closes it once nothing is owed
claim The owed account Takes everything a settled ticket owes it, into accounts it chooses
secure Anyone Copies waiting tickets’ readings into them, and a retiring market’s freeze reading into the market
capture_round Anyone Copies a feed’s new round into a Chainlink market’s round log
convert A holder Converts old-epoch tokens to a later epoch the holder names, up to the current one
prepare_epoch Anyone Creates a side’s new mint after a roll and files away the old epoch
donate Anyone Adds SOL to a live side’s pot, a tip with no tokens in return
open_wallet, withdraw, close_wallet The wallet’s holder The market wallet where bounties, reading fees and referral shares land
retire Anyone Retires a market core reports retired; it then freezes at a reading taken after the call (details)
retire_idle Anyone Freezes a memecoin market that has sat empty for 30 days
quarantine_head Anyone Turns a ticket stuck at the head for 72 hours into a whole refund
collect_fees, sweep Anyone Send the burn share, and surplus rent, to the burn vault, less the caller fee
close_market, close_epoch, close_referral Anyone Close a drained market, a drained old epoch, or a frozen market’s referral binding (details)

Every instruction that changes state emits an event through the program itself, and each market and wallet numbers its events, so a missing one shows as a gap. The main events: MarketCreated, Committed, Rebalanced (every applied reading, with the move and what it paid), Settled, Delivered, Advanced, Secured, RoundCaptured, FeesCollected, Retired, Frozen, EpochRolled and MarketClosed. Core emits MarketRegistered for every listing, so core’s events list every market, and ReadingsPosted for every relayed reading.

  • Setup: initialize, bootstrap_apply and seal, the deployer’s one-time launch settings, sealed before any market existed.
  • Governance: schedule (the proposer), execute (anyone, once ready), cancel (the proposer or canceller), close_expired; pause and remove_signer (the guardian or the sentinel).
  • Readings: create_ring, post_signed_reading (a post the price signers signed, checked against the Ed25519 precompile’s work in the same transaction), close_ring (anyone, once no market holds the ring; its deposit goes to the burn vault).
  • The burn vault: sync_vault, claim and expire for posters’ and callers’ fees, and burn_begin and burn_end, which only the named burner can call, around its swap.
  • Registry: register_market, the ring holds ring_acquire and ring_release, and close_record, each callable only by a registered version’s market program; trim_rent for anyone, which sends a record’s or ring’s surplus rent to the burn vault.

The relayed readings core stores are listed with their signers by GET /api/readings (see Relayed prices).

Instruction Who What it does
burn Anyone, in a burn period’s open slots Draws core’s spend from the burn vault, buys $SAGITTA on its PumpSwap pool within the move cap, burns everything it bought, and has core check the result. Core credits the caller the call fee, 0.00005 SOL
prepare Anyone, while core names this burner Creates what a burn needs that the burner can’t pay for itself: its wrapped-SOL and $SAGITTA token accounts and its PumpSwap volume accumulator. The caller pays their deposits, and calling it again changes nothing
retire Anyone, once core names another burner or none Burns the $SAGITTA the burner still holds, closes its two token accounts, and sends their deposits and anything else it holds to the burn vault. The volume accumulator stays open, since only PumpSwap can close it

The burner holds nothing between burns, and a burn runs only once prepare has created its accounts (see Rent and deposits).

The programs ship with unit, property, fuzz, attack and mainnet-fork suites, run against the programs’ real builds. Among the properties they check after every step:

  • Solvency. Each market’s account always holds at least its books: its rent, pots, escrowed buys, reading fees, owed balances and burn share.
  • No admin path to funds. No timelock operation, pause or signer removal changes a market’s account, a ticket, a wallet or the burn vault’s books.
  • Exits always work. Cash-outs, executions, deliveries and claims succeed under every governance action, and a market whose source stops reading freezes once its oldest waiting ticket has had no reading for 7 days, with every exit open.
  • Caller independence. For the same readings, every schedule of executes, pokes, secures and captures gives a ticket the same fill, or the same refund, and the order posts land in never changes it.
  • No ticket blocks the queue. Settlement moves no SOL or tokens out, so no recipient’s account can stop it.
  • Every account checked. Every account of every instruction swapped for every other kind of account is refused, except where the caller’s own choice is the point.
  • Immutable. Each program’s upgrade authority is removed once its verified build is deployed. Core accepts a new market version or a burner only if that program is already immutable, and core opened for listings only once it was immutable itself.
  • Versioned. A bug means a new market program, registered as a new version. The old version is sunset, its markets are retired and freeze, and their pots stay redeemable forever.
  • Set up once, then sealed. The launch settings (the market version, the price signers, the quotes, the feeds, the stock tokens, the coins blocked from listing and the side tokens’ icon address) were applied once, before any market existed, by the deployer, who then sealed core. Core takes no market before that seal, and after it the deployer has no power. Every change since goes through the timelock.
  • Governed by a timelock. Every setting is a typed operation behind a 72 hours delay. A hardware key schedules and cancels, and is also the guardian and the treasury. Once an operation’s delay has passed, anyone may execute it, exactly as scheduled, for 14 days; after that it can only be cancelled or scheduled again.
  • A guardian and a sentinel. The guardian, the same hardware key, can pause new buys and tips at once and remove a price signer. The sentinel, a key set at initialization and replaced only through the timelock, has exactly those two powers and no other; the watchdog fires it on any reading it finds wrong. Neither can touch funds or stop an exit, and only the timelock lifts a pause or adds a signer back.
  • Hands off the SOL. No admin path can touch the SOL in pots, in waiting tickets, owed to accounts or accrued as fees. The burn share, sweeps and closes reach only the burn vault, and the vault pays out only burns and its own fees.
  • Markets stand alone. A coin, a stock token or a feed can have any number of markets, in one version or across versions, each its own account with its own pots. Nothing one market does reaches another market’s SOL.

The site lists stock tokens and coins on relayed pools, and the trading API also lists pool history and Chainlink markets. Any market the program allows can be listed with create_market directly too, through the SDK or any client of the program’s IDL:

  • A pool history market, on the Raydium CLMM pool the coin’s route is bound or pinned to;
  • another market on a Chainlink feed the allowlist holds;
  • another market on a stock token the allowlist holds.

Sagitta on Solana mainnet-beta, from packages/config. Every market is found through core's MarketRegistered events, and each version's market program through core's version records.

ProgramAddressWhat it does
sagitta_core—The registry, the timelock, the guardian and the sentinel, the price signers, the reading rings and the burn vault
sagitta_market_v1—Every market of its version: tickets, side tokens, readings, settlement, epochs and closes
sagitta_burner_v1—The $SAGITTA buy and burn on its PumpSwap pool, named by the timelock

Every address comes from packages/config, the one place Sagitta keeps addresses, and links to Solscan.

ProgramAddressUsed for
Token-2022TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEbSide tokens, stock tokens and many coins
SPL TokenTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DAUSDC, USD1, wrapped SOL and older coins
Associated Token AccountATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knLWhere a delivery mints a holder's side tokens
Ed25519 precompileEd25519SigVerify111111111111111111111111111Checks each signed reading's signatures in its own transaction
Metaplex Token MetadatametaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1sA legacy coin's name and symbol, for its side tokens' names
Chainlink storeHEvSKofvBgfaexv23kMabbYqxasxU3mQ4ibBMEmJWHnyEvery Chainlink feed account on Solana
Meteora DAMM v2cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGGRelayed prices: its pools, priced by the signers; listings check a pool's two tokens
Meteora DLMMLBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxoRelayed prices: its pools, priced by the signers; listings check a pool's two tokens
PumpSwappAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEARelayed prices: its pools, priced by the signers; listings check a pool's two tokens
Raydium CPMMCPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1CRelayed prices: its pools, priced by the signers; listings check a pool's two tokens
Raydium CLMMCAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqKPool history: its pools' observation rings
pump.fun6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6PLaunches coins that graduate into PumpSwap, $SAGITTA among them
Program MetadataProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7SWhere each program's IDL is published

The source code, with the tests above, is public at github.com/bryceweiner/sagitta.broker. Each program’s build can be reproduced and checked against the deployed program’s hash.