Skip to main content

Oracles

This page describes the data sources and rules Hypercall uses for:

  • Underlying prices (spot and forward/mark)
  • Settlement reference prices (expiry TWAP)
  • Implied volatility (IV) / vol surface

Terminology

Hyperliquid's metaAndAssetCtxs response contains several price fields. Hypercall uses them as follows:

FieldDescriptionUsage
oraclePxExternal spot/index priceCanonical spot input for all pricing
markPxHyperliquid's mark price (oracle plus premium adjustment)Not used as canonical spot
midPxMid price from the Hyperliquid orderbookReference only
impactPxsSlippage-aware pricesReference only

Forward/Mark-to-Expiry Price

In Hypercall, "mark price" may also refer to a forward price computed as:

F=S×ertF = S \times e^{r \cdot t}

Where:

  • SS is the oracle/index spot (oraclePx)
  • rr is the risk-free rate
  • tt is time to expiry (in years)

This forward price is used for greeks, risk calculations, and other computations that depend on the forward rather than spot.


Underlying Price Oracle

Purpose

The underlying price oracle provides real-time spot prices used for:

  • Options pricing and greeks
  • Margin calculations
  • Risk monitoring
  • Mark-to-market valuations

Data Source

Hyperliquid Info API (https://api.hyperliquid.xyz/info)

We ingest the oraclePx field from metaAndAssetCtxs for each supported underlying asset.

Forward Price

For any option series with a future expiry, Hypercall computes a forward price using the formula above. This ensures pricing consistency with time-to-expiry across all risk and valuation calculations.


Settlement Oracle

Purpose

The settlement oracle determines the reference price used to cash-settle options at expiry.

Settlement Rules

ParameterValue
Expiry time08:00 UTC
Reference price30-minute TWAP of oraclePx
TWAP window[expiry - 30 minutes, expiry]

How It Works

At expiry, positions are cash-settled using a 30-minute Time-Weighted Average Price (TWAP) of the underlying's oracle spot price. The TWAP smooths out short-term volatility and provides a manipulation-resistant settlement reference.

TWAP Calculation Method

The settlement price is computed using a median-of-means algorithm with 5% trimming:

  1. Collect samples: Gather nn price samples {p1,p2,,pn}\{p_1, p_2, \ldots, p_n\} during the window
  2. Trim outliers: Sort and remove 5% from each tail, yielding trimmed set PP' of size n=0.9nn' = 0.9n
  3. Partition into buckets: Divide PP' into knk \approx \sqrt{n'} equal-sized buckets B1,B2,,BkB_1, B_2, \ldots, B_k
  4. Compute bucket means:
μi=1BipBip\mu_i = \frac{1}{|B_i|} \sum_{p \in B_i} p
  1. Final settlement price:
Psettlement=median(μ1,μ2,,μk)P_{\text{settlement}} = \text{median}(\mu_1, \mu_2, \ldots, \mu_k)

This approach is more robust than a simple average, as it resists manipulation from brief price spikes or flash crashes during the settlement window.


Implied Volatility Oracle

Purpose

The IV oracle provides the volatility surface used for:

  • Options pricing (Black-Scholes inputs)
  • Vega risk calculations
  • Margin requirements

Data Source

Block Scholes provides real-time implied volatility data via WebSocket.

Vol Surface

Hypercall maintains an in-memory volatility surface per underlying, with:

  • Strike-specific IV for configured strikes
  • ATM IV as a baseline reference
  • Interpolation across strikes and expiries when exact data points are unavailable

Staleness Handling

If the vol oracle becomes unavailable or stale, the system falls back to conservative assumptions to protect against pricing with outdated data. Exact parameters are configured as venue risk controls.