Skip to main content
The pricing system determines how the perpetual tracks the underlying asset’s value through Index Price (fair value) and Mark Price (used for margin and liquidation).

External Pricing

Freshness Rules

ParameterDefaultDescription
T_stale_soft5sData usable but flagged
T_stale_hard30sData not usable for external mode
External Reference Available = true when:
  • Newest MDP input age ≤ T_stale_hard
  • Data passes sanity filters

Multi-Source Aggregation

With 2+ independent feeds:
MDP_raw = median(source_prices)
If dispersion exceeds dispersion_limit, degrade to “Reference Disrupted” mode.

Jump Filters

Accept new MDP only if:
abs(MDP_candidate / MDP_prev - 1) ≤ J_accept
InstrumentJ_accept
Single-name equities50%
Indices20–30%
If violated, require confirmation by ≥K sources or persistence for T_persist seconds.

Index Price

External Mode (Primary)

When external reference is available:
Index = MDP_filtered
Anchor ← Index  (updated each valid tick)

Internal Drift Mode (Fallback)

When external reference is unavailable (weekend, outage): Impact Price Definitions:
  • ImpactBid(q) = VWAP bid to sell q notional
  • ImpactAsk(q) = VWAP ask to buy q notional
  • ImpactMid = (ImpactBid + ImpactAsk) / 2
Drift Update:
Pressure = ln(ImpactMid / Index_prev)
κ = min(Δt / τ, c)
Index = Index_prev * exp(κ * Pressure)
ParameterDefaultDescription
τ8 hoursTime constant
c0.1Clamp factor

Mark Price

Mark is used for margin, PnL, and liquidation triggers.

Components

ComponentFormula
C1Index
C2Index + EMA_150s(Mid - Index)
C3median(BestBid, BestAsk, LastTrade)
Mark_raw = median(C1, C2, C3)

Guardrails

Step Clamp (per update):
Mark_step = clamp(Mark_raw, Mark_prev*(1 - s), Mark_prev*(1 + s))
Default: s = 0.50% per 3s update. Leverage Band:
Band = 1 / MaxLeverageEffective
Mark_final = clamp(Mark_step, Anchor*(1 - Band), Anchor*(1 + Band))
Example: 10× leverage → 10% band around Anchor.

Order Price Bands

Orders are rejected if price is outside the band:
SessionEquitiesIndices
Reference Open±10%±5%
Weekday Overnight±7%±4%
Weekend±5%±3%
  • Reject buy orders above center*(1 + band)
  • Reject sell orders below center*(1 - band)
  • Market orders convert to IOC with protective limit at band edge