> For the complete documentation index, see [llms.txt](https://nfex.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nfex.gitbook.io/docs/nfex-perpetual-guide/mark-price-and-last-price.md).

# Mark Price & Last Price

## Last Price

The "last price" refers to the most recent traded price of a perpetual contract. It is the price shown in the order book during trading that reflects the real-time traded price.

A perpetual contract has its own supply and demand, as traders continuously buy and sell contracts on NFEX. This creates a unique price for the contract that may differ from the spot price of the underlying asset. As a result, the last price of the perpetual contract can gradually deviate from the actual price of its underlying asset.

To ensure more stable and reliable pricing for the floor price of a given NFT collection, NFEX utilizes the Mark Price.

## Mark Price

The mark price of a perpetual contract is an estimated fair value that considers the underlying asset's reasonable worth, aiming to prevent unwarranted liquidation resulting from market manipulation or illiquidity.

$$
Mark Price = Median( Impact Mid, Price 1, Price 2)
$$

Where:

{% hint style="info" %}
&#x20;$$Impact Mid = Average (Impact Bid Price, Impact Ask Price)$$

Where:

* $$ImpactBidPrice$$= The average fill price to execute the Impact Notional on the Bid side
* $$ImpactAskPrice$$= The average fill price to execute the Impact Notional on the Ask side
* $$The Impact Notional$$ is used to determine how deep in the order book to measure either the Impact Bid or Ask Price and is set to 5 ETH. Please note that the Impact Notional is subject to change according to market conditions.
  {% endhint %}

{% hint style="info" %}
$$Price 1=NFEXI\times (1+FR\_{Last} \times \frac{T}{3600})$$

*Where*:

* $$T$$ is the time(Second) left until next funding
* $$FR\_{Last}=Last Funding Rate$$
  {% endhint %}

{% hint style="info" %}
$$Price 2$$= Moving Average Of Impact Mid Over Last 5 Minutes
{% endhint %}

The mark price is used for:

* **Unrealized PnL calculations**. Please note that Realized PnL is still based on the actual executed market price.
* **Liquidation**. [Liquidation](/docs/nfex-perpetual-guide/liquidation.md) happens when a position's liquidation price is hit by the Mark Price. The use of Mark Price safeguards users from unjust liquidations caused by a temporary fluctuation in the Last Price, when in fact, the asset's spot price hasn't reached the liquidation threshold.

## Difference among last price, mark price and index price

<table><thead><tr><th width="142" align="center">Type</th><th width="107" align="center">Last Price</th><th width="164" align="center">Index Price</th><th align="center">Mark Price</th></tr></thead><tbody><tr><td align="center"><strong>Function</strong></td><td align="center">Displays the  last traded price of the order book on a real-time basis</td><td align="center">Reflects the fair last spot price</td><td align="center"><ol><li>Safeguard traders from unnecessary liquidation</li><li>Calculate unrealized PnL and liquidation</li></ol></td></tr><tr><td align="center"><strong>Calculation</strong></td><td align="center">/</td><td align="center"><p></p><p><span class="math">NFEXI =\frac{Floor Price+Top Bid}{2}</span></p></td><td align="center"><span class="math">Mark Price = Median(Impact Mid, Price 1, Price 2)</span></td></tr></tbody></table>

Mark Price is not used in the actual trading and can be regarded as an indicator that monitors a position’s risk, while the Last Price is the essential market price that every user trades on.

{% hint style="success" %}

## **Join Our Community**

* **Twitter**: <https://twitter.com/nfex_official>
* **Discord**: <https://discord.gg/nfex>
* **Medium**: [https://medium.com/@nfex.official](https://medium.com/@nfex.official/)
  {% endhint %}
