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 of the market (base or quote) the program stores a live reserve:
- is accounted cash. It is the only term that can leave in a swap or a withdrawal.
- and 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 .
- 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 affects utilization and the vaults' equity but is not added to the identity again; it is already represented through . Without hLP the identity collapses to V1's: live reserve equals cash plus debt.
Borrow neutrality
A cash-backed borrow of moves and , so 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 for the principal counters, the unpaid interest on a side is
and the executable reserve the curve is built on is . A receivable is not something a trader can buy. Quoting swaps from 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:
where is claimable swap-fee yield held outside executable reserves, is inventory backing the two hLP vaults, and 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 reserve shares and a burn of , each side pays out
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 of the 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 . 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 and the ordinary supply 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
| Account | One per | Holds |
|---|---|---|
Market | Market | Config, 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) | Asset | Mint, vault addresses, reserve components, srLP supply, fee liabilities and junior income indexes, the daily borrow bucket |
BorrowPosition | Position, per market | Collateral, debt shares and principal per side, stored liquidation factors, referral binding, and the active liquidation session |
LeveragePosition | Position, per market | Debt asset, collateral, margin, notional, debt shares, multiplier, timestamps |
LeverageDelegation | Leverage position | The delegate program allowed to act and which actions it may take |
YieldAccount | Owner × market × LP mint × asset × kind | Checkpoints against the growth indexes and income books, accrued amounts, any jrLP held in an exit request, recipient and harvest authority |
JuniorExitAccount | Owner × jrLP mint | One exit request: its jrLP, ready slot and the end of its exercise window |
JuniorCohort | jrLP mint | One junior generation; frozen income ledgers once it is retired |
IncomeEpoch | Income book × epoch | The closing state of a rolled income book, so holders can carry their claims forward |
OperatorProposal, OperatorRevenueAccount | Market × nonce; market × revenue epoch | Pending atomic bundle and preserved collected-fee claims; see Market operators |
ReferralPartner, ReferralAccrual | Partner, partner × market × asset | See Governance |
FutarchyAuthority | Protocol | Revenue 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 ; 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.