Mark Price Calculation

Perpetual Mark Price Formula

The mark price of a perpetual future instrument is calculated as :

Mark Price=Spot Oracle Price(1+Funding Rate)\text{Mark Price}=\text{Spot Oracle Price}*(1+\text{Funding Rate})

where :

Spot Oracle Price\text{Spot Oracle Price} is an external oracle price of the underlying coin obtained via the Pyth Network.

Steps to calculate the Mark Price

1. Every 5 seconds, get the latest Best Ask, Best Bid, Last Trade and Spot Prices

2. Calculate the implied rates from Best Ask, Best Bid, Last Trade relative to the Spot Price

3. Calculate the EWMA (Exponentially Weighted Moving Average) of each of the three rates and take the Funding Rate as the median rate

In this example, an EWMA weight of 20% is applied to the latest rate observation

4. Calculate the Mark Price by applying the Funding Rate to the Spot Price

Last updated