Market anatomy

A market's live reserve counts cash, debt and the hedged vaults' share, so borrowing moves cash into debt without moving the price.

Updated Nov 9, 2026

A market is one account plus a handful of vaults, and one identity that every instruction must preserve.

The live reserve

For each side ii of the market (base or quote) the program stores a live reserve:

Ri=Ci+Dif+Diℓ+HiR_i = C_i + D_i^{f} + D_i^{\ell} + H_i
Lent tokens count in the reserve but sit with borrowers, so cash is the only part in both.
  • CiC_i is accounted cash. It is the only term that can leave in a swap or a withdrawal.
  • DifD_i^{f} and DiℓD_i^{\ell} are cash-backed debt: public lending debt and isolated leverage debt. Each was created by handing cash to a borrower, so cash fell and debt rose by the same amount. Together they are DicbD_i^{cb}.
  • HiH_i is the hLP live reserve, the part of the reserve owned by the two hedged vaults. It is a balanced liquidity coordinate, not a per-asset liability.

hLP funding debt DihD_i^{h} affects utilization and the vaults' equity but is not added to the identity again; it is already represented through HH. Without hLP the identity collapses to V1's: live reserve equals cash plus debt.

Borrow neutrality

A cash-backed borrow of aa moves Ci→Ci−aC_i \to C_i - a and Dicb→Dicb+aD_i^{cb} \to D_i^{cb} + a, so RiR_i does not change. Lending does not move the price. Trading does: a swap changes the inventory on both sides.

Unpaid interest is not inventory

Interest accrues into the debt balances. Writing PP for the principal counters, the unpaid interest on a side is

Ji=max⁡(Dif−Pif, 0)+max⁡(Diℓ−Piℓ, 0)J_i = \max(D_i^{f} - P_i^{f},\,0) + \max(D_i^{\ell} - P_i^{\ell},\,0)

and the executable reserve the curve is built on is Xi=Ri−JiX_i = R_i - J_i. A receivable is not something a trader can buy. Quoting swaps from Rq/RbR_q / R_b would be wrong twice over: it would count receivables as inventory and it would ignore the concentrated geometry.

Cash versus custody

Accounted cash is one claim on the physical reserve vault; it is not the only one. The vault must hold at least:

Vireserve ≥ Ci+Ficustody+Bib+Biq+ZiV_i^{\text{reserve}} \ \ge\ C_i + F_i^{\text{custody}} + B_i^{b} + B_i^{q} + Z_i

where FF is claimable swap-fee yield held outside executable reserves, Bb,BqB^{b}, B^{q} is inventory backing the two hLP vaults, and ZZ is surcharge retained to fund the curve's next recentering. Tokens donated to the vault outside an instruction do not become executable liquidity. Interest owed to lenders lives in a separate interest vault per asset, with its own accounting.

Shares

srLP is a fungible, market-wide, two-sided claim. For a supply of SS reserve shares and a burn of ss, each side pays out

ai=⌊s (Ri−Ji)S⌋a_i = \left\lfloor \frac{s\,(R_i - J_i)}{S} \right\rfloor

that is, a proportional share of the reserve with unpaid interest left out, subject to cash, market-health and slippage checks. The unpaid interest belongs to whoever held the shares while it accrued: the market's income books pay it to them when borrowers pay, even after they have withdrawn. A deposit mints against the same basis, so new principal cannot buy interest that accrued before it arrived.

Owning a share is not an unconditional promise of redemption while the cash behind it is lent out. The program checkpoints published yield before any eligible balance changes, so a principal withdrawal never forfeits an unharvested claim.

jrLP is the first-loss tranche of the same reserve shares. Junior LP owns SJS_J of the SS shares at its own exchange rate, absorbs funded losses before srLP, and takes the governed junior income share; srLP stays one-for-one with the other S−SJS - S_J. Senior and junior tranches covers both tranches.

The two hLP mints are shares of the aggregate hedged vaults. Their srLP ownership and funding debt are reconstructed algebraically at every trade's endpoint, which is why the total srLP supply SS and the ordinary supply SoS_o held outside the vaults are tracked separately. The srLP the vaults hold is senior.

All four mints, srLP, jrLP and the two hLP, are Token-2022 tokens with transfer hooks, so a transfer can keep yield accounting correct. A direct burn bypasses the hooks; withdraw through the program instead. A direct jrLP burn becomes part of the permanent junior seed.

Accounts

AccountOne perHolds
MarketMarketConfig, curve state, both sides' reserves and fees, debt indexes, the two hLP vaults, risk observations, oracle policy, tranche capital and policy, the active jrLP mint, the income books, operator and optional manager, parameter revisions, reduce-only flag
MarketSide (inside Market)AssetMint, vault addresses, reserve components, srLP supply, fee liabilities and junior income indexes, the daily borrow bucket
BorrowPositionPosition, per marketCollateral, debt shares and principal per side, stored liquidation factors, referral binding, and the active liquidation session
LeveragePositionPosition, per marketDebt asset, collateral, margin, notional, debt shares, multiplier, timestamps
LeverageDelegationLeverage positionThe delegate program allowed to act and which actions it may take
YieldAccountOwner × market × LP mint × asset × kindCheckpoints against the growth indexes and income books, accrued amounts, any jrLP held in an exit request, recipient and harvest authority
JuniorExitAccountOwner × jrLP mintOne exit request: its jrLP, ready slot and the end of its exercise window
JuniorCohortjrLP mintOne junior generation; frozen income ledgers once it is retired
IncomeEpochIncome book × epochThe closing state of a rolled income book, so holders can carry their claims forward
OperatorProposal, OperatorRevenueAccountMarket × nonce; market × revenue epochPending atomic bundle and preserved collected-fee claims; see Market operators
ReferralPartner, ReferralAccrualPartner, partner × market × assetSee Governance
FutarchyAuthorityProtocolRevenue shares, recipients, auction config, referral cap, global reduce-only

Vaults per side: a reserve vault (cash, custody), a collateral vault (lending collateral), a leverage collateral vault, an interest vault. The accounts reference lists every field and the seeds that derive each address.

Invariants the program keeps

  • srLP supply is backed by reserve-side principal; no instruction mints srLP without corresponding reserve value.
  • Junior reserve shares never exceed the reserve shares outstanding. A tranche conversion moves ownership between srLP and jrLP and never moves an asset.
  • Reserve principal excludes reserve-custodied swap-fee liabilities and interest-vault balances.
  • Physical custody covers cash, fee custody, hLP backing inventory and protected recenter reserves; transitions conserve the accounted amount exactly.
  • Only hLP transitions change HiH_i; hLP debt shares stay matched to aggregate vault funding debt, and hLP never uses srLP-denominated debt.
  • Isolated leverage debt counts toward utilization but never enters a public borrower's health check.
  • Leverage collateral vault balances match the collateral accounted across open leverage positions.
  • Referral binding never changes principal, debt, interest, health or liquidation terms.