Skip to main content
The keeper is an off-chain Rust service that the protocol runs. It pushes a reference price for each market, manages the 26 bin books, settles committed orders, moves inventory, and posts per-market parameters such as fees and the γ index. Its source code and binary are not published; these pages describe how the protocol’s keeper behaves and how it is configured. Most loops have an environment switch, but not all. γ posting has no switch of its own and stops only if the whole book manager is turned off. Lending collateral, which happens only on mainnet, ships turned off. See Keeper configuration for variables and defaults.

What it runs

The yield allocator runs every 300 s. It plans how much of each market’s collateral to lend, and where, from live mainnet state of three USDC venues (Kamino, Save and Jupiter Lend Earn; MarginFi is disabled). It lends only on mainnet with COLLATERAL_YIELD_ENABLED=true, which is off by default, and elsewhere it only plans. On devnet, an emulator credits each market the interest that plan would earn. See Keeper → Yield allocator. Every transaction that moves funds is first written to a journal in R2 or on a persistent disk. If a send ends with an unknown outcome, the keeper pauses those sends until it has reconciled the transaction and restarted. Price pushes skip the journal because repeating one is harmless.

What it does not do

  • Set prices by hand. Each half-spread is the largest of four terms: a realized q90 ratchet, a slow auto-floor based on 60-day volatility, oracle confidence plus a fixed cost, and a static per-market floor. No trained model, no discretionary input. See the keeper concept page.
  • Sit in the user’s call path. mint_paired, redeem_paired, pool_swap, commit_swap and cancel_swap need neither keeper key. Mint and redeem do need a price push from the last 300 s. If the keeper stops, its last price ages past 300 s, and outside Normal the books then trade at their last posted bins. Anyone, the owner included, can call cancel_swap for an unsettled committed order once its 180 s TTL has passed, and the escrow goes back to the owner.

Signing roles

The keeper wallet is each market’s keeper_authority. It pushes prices, posts buffer targets and the γ index, rebalances collateral, and can call the keeper-only single-leg instructions (keeper_mint_single, keeper_redeem_single, keeper_burn_single). It could also move collateral to a keeper-owned account for lending (deploy_collateral_to_yield) on a market with yield_enabled set. Every live market has it set as of 11 Oct 2026, but the keeper lends only on mainnet. The CLP authority signs book shapes, sweeps, inventory moves, set_commit_spread, update_oi_cap and, in live rebate mode, fund_rebate. Fee posting goes through update_market, which requires the market’s authority.