The oracle price is the external spot reference for a market and is used to accurately value positions, determine funding rates and act as a component in the calculation of the mark price (below).
Validators are responsible for sourcing external price references from external venues and publishing them onchain. Prices are collected every 3s, passed through a price filter which removes stale and spurious updates, and the final price is calculated as a weighted median. The external venues and weights for each are below:
The mark price is the reference used for margining, liquidation triggers, and PnL. It has two core invariants: it must represent an unbiased and fair price of the perpetual contract, and be resistant to market manipulation.
raw_premiumt=impact_midt−oracletclamped_premiumt=clamp(raw_premiumt,−0.005⋅oraclet,+0.005⋅oraclet)premiumt=α10s⋅clamped_premiumt+(1−α10s)⋅premiumt−1where α10s corresponds to a 10-second half-life (or decay window) EMA.
notional=500/Initial Margin Fractionimpact_midt=2impact_bidt(notional)+impact_askt(notional)Undefined if either side lacks sufficient depth for this notional.