Skip to main content
Tplus tracks several price values per asset, each with a distinct role in margin, liquidation, and pricing. Every price carries its own decimal precision.

Oracle prices

The oracle reads Pyth, Hyperliquid, and Binance feeds, takes their median, and publishes it to the clearing engine. It rejects outliers, observations older than the configured validity window for that feed and asset, and observations more than two seconds in the future. A price is published only when at least the asset’s minimum number of sources remain after outlier rejection. The feed-to-asset mapping is onchain and can only be rotated by a council-signed operation. See trust model.

Mark price

The mark price is an exponential moving average of last-trade prices, with a 45-second half-life. The last-trade price of a fill is the worst price across the matched makers — the highest for a buy taker, the lowest for a sell taker — so a single favorable print cannot drag the mark. It is not a TWAP.
Example: if the old mark is 100, the newest last-trade price is 110, and 45 seconds have elapsed, alpha = 0.5 and the new mark is 100 + 0.5 * (110 - 100) = 105. If a buy taker fills against makers at 100 and 102, the last-trade input is the worst fill for the taker: 102.

Impact price

The impact price is the volume-weighted price (VWAP) to execute a reference notional — 0.25% of the asset’s total OI cap — against the book, computed separately for the buy and sell sides. Impact prices feed the premium component of funding rates by measuring how far executable book depth is from the oracle. They are not part of the normal IM and MM checks, which use oracle and mark.
Example: if the total OI cap is 200,000,000 USD, the reference notional is 500,000 USD. If the ask side fills 100,000 USD at 100 and the remaining 400,000 USD at 101, the base filled is 100,000 USD / 100 + 400,000 USD / 101 = 4,960.396. With sufficiently fine quantity ticks and two price decimals, the buy impact price is 100.79 USD.

Optimistic and pessimistic pricing

Margin and liquidation never rely on a single price:
  • Initial margin is the requirement to open or increase positions. A trade is checked at the oracle price and the mark price independently; IM surplus must be at or above zero for both, so the worse price for the user decides (pessimistic pricing).
  • Maintenance margin is the requirement to not be liquidated. Liquidation checks MM surplus with each leg priced at whichever of oracle and mark favours the account (optimistic pricing), and begins only when MM surplus is below zero.
If only one source is available it is used for both sides; if neither is available the check fails. See Margin.

Staleness and circuit breakers

Each source is tracked for freshness. Oracle prices go stale after 1 hour; mark and last-trade prices after 60 seconds. A stale source must deliver consecutive fresh updates before it counts as recovered, which prevents flapping. Prices past a 2-hour hard limit are never used. A newly added asset, or one recovering after a restart, starts in a warming-up state that blocks risk-increasing trades until the oracle has delivered several consecutive fresh updates. When prices stop arriving, the asset’s price-state machine degrades: risk-increasing trades are blocked first, and if no usable price remains, the asset’s collateral is valued at zero and trading and liquidation halt for it. Full state table: Liquidations & circuit breakers.