Equity Perpetuals

What Equity Perpetuals are.

Equity perpetuals are linear contracts margined and settled in USDC. The oracle is denominated in USD, and no USDC/USD conversion is applied. Economic exposure is therefore quanto with USD P&L cash-settled in USDC. All XYZ perps are currently isolated-margin only; support for cross-margin will be added in the future.

Listed on the XYZ HIP-3 deployment, XYZ perpetuals' matching, order types, funding, liquidations, and auto-deleveraging are provided by HyperCore. Two components are bespoke: the oracle price and the mark price. The XYZ relayer transmits oracle and mark price updates approximately every 3 seconds.


Mark Price

The mark price—used for margining, liquidations, stop/limit triggers, and unrealized P&L—is the median of three components:

  1. The oracle price.

  2. The sum of the oracle price and a 150-second continuous-time exponentially weighted moving average of the difference between the perpetual's mid-price and the oracle price.

  3. The median of the best bid, best ask, and last trade.

In each update, the relayer publishes (1) and (2). The Hyperliquid protocol computes (3) and takes the median of the three components as the mark.

More information on the EMA implementation can be found in the internal pricing section below.


Oracle Price

The oracle serves two critical functions: (i) as the reference price for funding and (ii) as a direct input to mark price calculation.

The key unlock for equity perpetuals is extending the oracle to operate 24/7, beyond external trading sessions of the underlying asset. To achieve this, the system prioritizes external pricing and employs a robust internal mechanism when external data is unavailable.

External Pricing

During active sessions, the oracle consumes price data for the underlying asset from institutional liquidity providers, through partners such as Pyth. Instrument-specific details for external price derivation can be found in their respective section. When available, fresh externally-derived spot prices are transmitted as the oracle price in relayer updates.

Internal Pricing

When external inputs are unavailable, the oracle advances via a continuous-time exponentially weighted moving average that incrementally adjusts the previous oracle price by a fraction of the impact price difference.

With oracle price SS the impact price difference (IPDIPD) is defined as:

IPD=max(PimpactBidS,0)max(SPimpactAsk,0)IPD = max(P_{impactBid} - S, 0) - max(S-P_{impactAsk}, 0)

where the impact bid price (PimpactBidP_{impactBid}) and impact ask price PimpactAskP_{impactAsk} are the average execution prices to trade a configured impact notional amount on the bid and ask sides of the orderbook, respectively. If insufficient depth exists on a side, that side's contribution is set to zero.

The oracle is robust to irregular updates and market halts. It uses a time constant τ=8\tau = 8 hours and updates as:

St=βtSt+(1βt)xt,βt=exp ⁣(Δtτ),xt=St+IPDt S_t = \beta_t\, S_{t^-} + (1-\beta_t)\, x_t, \qquad \beta_t = \exp\!\left(-\frac{\Delta t^\ast}{\tau}\right), \qquad x_t = S_{t^-} + \mathrm{IPD}_t

where Δt=min ⁣(Δt,cτ)\Delta t^\ast = \min\!\bigl(\Delta t,\, c\,\tau\bigr), Δt=ttprev\Delta t = t - t_{\mathrm{prev}}, and c=0.1c = 0.1 (so 1βt1e0.19.5%1-\beta_t \le 1 - e^{-0.1} \approx 9.5\%).

Note: This provides the more general form of the continuous-time EMA. Component (2) of the mark price samples the basis (xt=StPmid,tx_t = S_t - P_{mid,t}) with a time constant τ=150\tau = 150 seconds.

When external data becomes unavailable, the internal mechanism initializes from the last available external price. When external inputs resume, the oracle reverts to the externally derived spot on the next tick.


As an additional price manipulation mitigation, the mark price is restricted to be within 1 / max_leverage of the last externally-derived oracle (spot) price. For example, if the XYZ100 oracle price is $10,000 at Friday's 17:00 EST close, the mark price will deviate no more than ($9,500, $10,500) until external pricing resumes on Sunday 18:00 EST.

Market participants may use this knowledge to guide risk decisions, including margin management.

Last updated

Was this helpful?