Liquidation conditions
Maintenance margin is checked on a fixed interval and on price updates (price-triggered checks are batched every 10 ms). The margin engine computes MM surplus over the whole sub-account. An account is liquidatable only when it has borrows, has no circuit-broken collateral, and MM surplus is below zero. Monitor your own account via the margin endpoints.Liquidation execution
Liquidations execute on the open orderbook; there is no privileged liquidation counterparty. Any participant resting liquidity can take the other side. So that participants can quote against expected liquidations, the protocol streams aggregate at-risk positions over an authenticated WebSocket. This is a global aggregate broadcast, not a user-filtered feed. Per asset, it reports the aggregate quantity nearing liquidation on each side - long (to be sold) and short (to be bought) - plus estimated liquidation prices. Quantities are summed across all at-risk accounts per asset and liquidation prices are estimated, so no address or individual position is exposed. Stream:GET /liquidation/at_risk/ws (WebSocket streams).
When an account becomes liquidatable:
- The account’s open orders are canceled.
- The liquidator submits liquidation orders, reduce-only IOC limit orders, against each position: opposite side, full position size. The limit price is the midpoint between a reference price and that price scaled by the asset’s collateral factor (sells) or liability factor (buys), so it crosses resting liquidity. The reference price is whichever usable last-trade or oracle price reaches deeper into the book: the lower for sells, the higher for buys. The liquidation path excludes sources that fail the price-manager freshness checks (last trade: 60 seconds; oracle: 1 hour), and the same price manager will not return stored prices that are more than 2 hours old.
- The clearing engine validates every liquidation fill: the account must be below maintenance margin pre-trade, the fill must reduce or maintain risk, and it cannot exceed position size.
Backstop and auto-deleveraging
Orderbook deleveraging falls short when the book is too thin to absorb an account’s positions at acceptable prices. Whatever it cannot close is moved to the backstop - a protocol-owned liquidation account - which inherits the positions and unwinds them over time. Unwinding and auto-deleveraging (ADL) are a single loop, not separate phases. The backstop works inherited positions down through the market, and ADL escalates whenever a sub-account’s margin degrades faster than unwinding can repair it.Backstop transfer
- The clearing engine spawns a new sub-account inside the backstop for the liquidatable account, isolating its risk from other liquidations.
- The liquidatable account’s remaining holdings and positions are transferred into that sub-account in one move, any negative equity included.
Unwinding loop
The backstop runs a continuous loop on each inherited sub-account:- Net internally. Offsetting positions are consolidated across the backstop’s own sub-accounts without trading - a long BTC from one liquidation cancels a short BTC from another. This is a backstop-only privilege; a moved position takes on its destination sub-account’s account type.
- Work positions down. Remaining exposure is sold into the orderbook in clips over time, sized to avoid moving the market against the backstop.
- Watch margin. Each sub-account is monitored continuously. Being below margin is not itself cause to act - that is the backstop’s normal state - but adverse price moves or thin liquidity can erode it faster than unwinding reduces it.
- Escalate to ADL. When a sub-account’s equity falls below half its maintenance-margin requirement, or reaches bad debt at either price feed, ADL closes ranked counterparty positions until the sub-account is back above maintenance margin, then unwinding resumes. Stopping at maintenance margin rather than at the trigger leaves room before the next one, so ADL does not re-fire on every price tick.
- Post collateral as a last resort. Only when ADL cannot find enough eligible counterparties does the protocol post additional backstop collateral for the remaining deficit.
Auto-deleveraging (ADL)
ADL is the escalation inside the unwinding loop: it forcibly closes profitable, highly leveraged counterparty positions to bring a backstop sub-account back above maintenance margin when unwinding alone cannot keep pace. Eligibility. Only positions on the side opposite the backstop’s position in that market, and only those currently in profit, are eligible. A break-even or losing position is never auto-deleveraged. Ranking. Eligible positions are closed worst-offender first, by score:4x leverage with a 30% profitable position scores 4 * 30% = 1.2, ranking ahead of one at 3x leverage with a 20% position (score 0.6).
Amount. ADL works one market at a time, largest backstop exposure first. Within a market it takes counterparties in rank order until the sub-account is back above maintenance margin or hits the per-pass USD limit (max_adl_usd). The last position taken can be partially closed; the rest close in full. Any remaining deficit carries to the next-largest market.
Example: to shed 40,000 USD of exposure when the highest-ranked eligible counterparty holds 25,000 USD, ADL closes that position in full, then 15,000 USD of the next.
Price. ADL executes at the price that favors the backstop: the lower of oracle and mark when the backstop is short, the higher when it is long.
Example: backstop short with oracle 100 USD and mark 98 USD -> ADL at 98 USD; backstop long with the same prices -> 100 USD.
Circuit breakers
Each asset’s price feed runs through a state machine that degrades automatically when prices stop arriving. Oracle prices go stale after 1 hour; trade-derived mark prices after 60 seconds. A stale source must deliver consecutive fresh updates before it counts as recovered, which prevents flapping.
These states apply to native assets, whose prices value collateral. A token has no price state, so trading on a token market is always allowed. On a native market, each state allows only the orders listed in Orders, spot included: in circuit breaker no order is accepted, so a Tplus trade alone never sets the asset’s price. With no trade and no resting order, the market supplies no fresh mark or impact price, and the asset recovers when its oracle price is fresh again.
Consequences:
- An account holding collateral in a circuit-broken asset cannot be liquidated. If the broken asset is only borrowed, liquidation proceeds.
- In margin math, circuit-broken collateral is valued at zero; borrows count in full.
Caps and halts
Liquidation, backstopping, ADL, and circuit breakers are reactive - they contain risk after it appears. Caps are preventive: per-asset limits that bound how much exposure, collateral, and flow the protocol accepts in the first place, so no single asset can accumulate enough risk to threaten the system. Every cap rejects only the change that would push past it; reducing or unwinding always passes, and each cap lifts on its own as the underlying measure falls back below the threshold.Risk controls
These bound how much leveraged risk an asset can carry. They are evaluated on the proposed post-trade state and detailed under risk controls.
The admission cap bounds how much of a token can enter trading accounts as its native asset.
Admission caps are described under native assets: a refused transfer can be submitted again once the caps have room.
The other risk controls are not caps on a total. They are the collateral factor and liability factor, the IM factor and IM haircut, max leverage, isolated-only assets, the minimum sub-account balance, the venue limit, the per-pass ADL limit, the circuit breaker, the interest charge cap, rate quarantine, and the oracle config’s minimum sources, deviation and staleness limits. The risk parameters page lists each parameter and where it is explained.
Capital controls
These bound how an asset’s deposits are used.
Utilization is the same ratio that drives borrow rates; its effect on settlements is detailed under settlement utilization caps.
The other capital controls price capital or pace its movement. They are the borrow rate curve and its kinks, the funding rate’s base rate, skew sensitivity and premium clamp, the rate cap, the min weight and buffer multiple that set the rebalancing fee and reward, the redemption delay, and representation liquidity.
Risk-parameter caps are served by
GET /registry/risk-parameters; admission caps by GET /registry/assets. All values are per-asset (or per (asset, chain)) and set by governance - read them from the Registry rather than hardcoding.