A pool is one asset
A pool is one admin’s market for one trading pair, for example SOL/USDC. It is created once withinit_pool and holds two things:
- up to 8 markets, one per leverage tier that asset offers
- up to 4 approved makers, who quote into every one of those markets
A market is one leverage tier
SOL at 1x, SOL at 2x, and SOL at 5x are three separate market accounts, each created withinit_market inside the SOL/USDC pool. A market stores:
imrandmmr, the initial and maintenance margin requirements, in basis pointsleverage,oi_cap, andmin_notional, the limits a trader’s order is checked against- its oracle: which feed, what kind (see below), and how old a price it will still accept
paused, and whethercrossmargin is enabled for this specific tierpool_index, which of the pool’s 8 market slots it occupies
init_market enforces 0 < mmr < imr, so a position’s maintenance
requirement is always below what it took to open, and
leverage <= BPS_DENOM / imr, so the leverage offered can never imply a
margin requirement the math doesn’t back.
Splitting leverage into separate market accounts, rather than one market
with a leverage a trader picks per order, is what lets each tier have its
own order book, its own open interest cap, and its own liquidation queue,
while still sharing one asset, one maker roster, and one pool of capital
behind all of them.
Approving a maker
An admin approves up to 4 makers per pool withapprove_maker, which just
assigns a free maker slot or flips one back to active. No capital moves at
this step. A maker funds their slot separately with maker_deposit, once,
into the pool’s shared token account, covered on the
Margin and Vaults page. From there that
one balance can back quotes on every leverage tier in the pool: a maker only
ever has to fund and manage a single balance per asset, no matter how many
leverage tiers they quote on.
The oracle
Every market is pinned to a single, allow-listed price feed per asset, set atinit_market and never swapped out. Two kinds are supported:
- Pyth Pro, a pull oracle. A price update has to arrive with a signed payload, verified against Pyth Pro’s own live, on-chain list of trusted signers via an Ed25519 signature-verification instruction in the same transaction, not merely trusted because it was supplied.
- Pyth push / EMA, read directly from Pyth’s push oracle account, kept as a simpler fallback.
oracle_max_age is rejected rather than
used.
