# Mark Price

The purpose of the Everstrike Mark Price is to provide a manipulation-resistant price that serves as a reference point for the liquidation of positions on Everstrike. All positions on Everstrike are liquidated according to the Mark Price. If they were liquidated according to the Last Traded Price, it would be possible for malicious traders to manipulate the market on Everstrike and liquidate other traders in the process.

The Everstrike Mark Price is calculated as the exponential moving average of the difference between the Everstrike Fair Price and the Everstrike Index Price.

## Everstrike Index Price <a href="#h_3c08f7e406" id="h_3c08f7e406"></a>

The Everstrike Index Price is the average price at top Spot exchanges (with outliers excluded). It represents the general price in the market. Read more about it [here](/trading/index-price.md).

## Everstrike Fair Price <a href="#h_a776eed241" id="h_a776eed241"></a>

The Everstrike Fair Price is one of the following:

* The price X dollars deep in the book (Impact Price)
* A scaled multiple of the current best price (Scaled Best Price)

For bids, the formula is:

`Fair Price (Bid) = Max(Impact Price, Scaled Best Price)`

For asks, the formula is:

`Fair Price (Ask) = Min(Impact Price, Scaled Best Price)`

Note that X might attain different values for different trading pairs. For the Bitcoin Perpetual Future, the X is currently set to 0.3 BTC. The [Markets API endpoint](https://docs.testnet.everstrike.io/#tag/Public/operation/pairs) contains information about the X used for each trading pair.

To derive a universal Fair Price (useful for Mark Price calculation), calculate the average of Fair Price (Bid) and Fair Price (Ask):

`Fair Price = (Fair Price (Bid) + Fair Price (Ask)) / 2`

## Scaled Best Price <a href="#h_6b9ac6380c" id="h_6b9ac6380c"></a>

The Scaled Best Price is calculated in the following way:

Bids:

`Scaled Best Price (Bid) = Multiplier * Best Bid`

Asks:

`Scaled Best Price (Ask) = Multiplier * Best Ask`

Note that Multiplier might also vary by trading pair. For the Bitcoin Perpetual Future, it is currently set to 0.001. As with the X used in the Fair Price calculation, it can also be obtained through the [Markets API endpoint](https://docs.testnet.everstrike.io/#tag/Public/operation/pairs).

\
​Calculation of the Mark Price <a href="#h_6d96a96c54" id="h_6d96a96c54"></a>
-----------------------------------------------------------------------------

Once the Fair Price and Index Price have been calculated, we can then calculate the The Mark Price:

`Mark Price = Index Price + EMA_Y(Fair Price - Index Price)`

EMA\_Y is an exponential moving average of Y time periods. For the Bitcoin Perpetual Future, the Y is currently set to 30. Each time period is 1 second.

To combat price manipulation, the Mark Price can only ever be within a certain percentage range of the Index Price. To ensure that this is the case, a dampener is applied:

`Mark Price = Min((1+Z)*Index Price, Max((1-Z)*Index Price, Mark Price))`

where Z is a constant that varies by trading pair. For futures, the range is a fixed percentage interval. For options, the range is determined dynamically, based on the theoretical value of the option (Black-Scholes price), and the price of the option's underlier.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://references.everstrike.io/trading/mark-price.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
