Price Feeds

Accurate and manipulation-resistant price data is essential to ensure fair trading, liquidation, and funding outcomes. Margin Trade uses a robust multi-source price feed system designed to minimize the impact of outliers, illiquid markets, and manipulation attempts.

Two primary prices are used throughout the protocol:

  • Oracle Price — external fair reference price used for funding rate calculations

  • Mark Price — internal fair value used for unrealized PnL, margining, and liquidation triggers. It is a dynamic and smoothed estimate that tracks the true market price while resisting sudden deviations caused by short-term volatility.

Both are updated continuously by the network and validated against multiple independent sources.

To mitigate manipulation risk, the oracle price is capped at the 30-day exponential moving average (EMA) of the mark price.


Update Frequency and Safeguards

  • Update Frequency: ~every 3 seconds for crypto assets; every minute for equities during active hours

  • Capping:

    • Mark price capped at 10× its 8-hour EMA

    • Oracle price capped at its 30-day EMA

  • Fallbacks:

    • If fewer than two inputs are available, the last valid EMA mark price is reused

    • If all data sources are unavailable, the mark price reverts to the prior stable mark

These mechanisms ensure the system remains robust and reliable even under data degradation or exchange outages.


Summary

Price Type
Purpose
Sources
Update Interval

Oracle Price

Funding rate, fair index value

Weighted average from CEX + Polygon (equities)

~3s (crypto) / ~60s (equities)

Mark Price

PnL, margin, liquidations

Median of mid-price basis, last trade, CEX perps (crypto) / Oracle + funding (equities)

Continuous

Funding Adjustment

Expected next-interval rate correction

Derived from mark vs oracle spread

8-hour cycle

Circuit Breakers

Prevent off-hour manipulation

EMA + capped deviation logic

Continuous

Last updated