Skip to content

Mark Pricing

The mark price is used for all margin calculations, unrealized PnL, and liquidation triggers. It is designed to closely track the true market value while resisting short-term manipulation.

It is defined as the median of three component prices:

Pmark=median(PA,PB,PC)P_{\text{mark}} = \text{median}(P_A, P_B, P_C)

PA=Poracle×(1+rfunding×tremainingTperiod)P_A = P_{\text{oracle}} \times \left(1 + r_{\text{funding}} \times \frac{t_{\text{remaining}}}{T_{\text{period}}}\right)

PB=Poracle+EMA30s(PmidPoracle)P_B = P_{\text{oracle}} + \text{EMA}_{30s}(P_{\text{mid}} - P_{\text{oracle}})

PC=median(PbestBid,PbestAsk,PlastTrade)P_C = \text{median}(P_{\text{bestBid}}, P_{\text{bestAsk}}, P_{\text{lastTrade}})

Oracle prices use Pyth Lazer price feeds as the primary provider.

Taking the median of three independent signals, the funding-adjusted oracle, the smoothed book premium, and the raw orderbook activity, ensures that the mark price tracks actual execution conditions as closely as possible, while the EMA smoothing and median construction limit the impact of any single anomalous value.

Note: Price A, which takes into account the perpetual premium based on the funding rate, inherently tracks orderbook depth through the funding rate construction, which is discussed in detail in a later section.