> For the complete documentation index, see [llms.txt](https://entropy.gitbook.io/entropyio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://entropy.gitbook.io/entropyio/equity-perp-mechanics/mark-price.md).

# Mark Price

The mark price is the reference used for unrealized PnL, margin calculations, liquidation triggers, and stop/take-profit triggers. It is published approximately every 3 seconds. Its construction depends on whether the underlying's primary venue is in its regular session, including which internal EMA it uses: the 3-minute fast internal price during market hours, and the 5-minute internal price outside them.

### Market Hours

During the underlying's regular session, the mark is the mean of the public reference price and the fast internal price:

<p align="center"><span class="math">M(t) = \frac{P_{\mathrm{pub}}(t) + I_3(t)}{2}</span></p>

where $$P\_{\mathrm{pub}}(t)$$ is the price observed on the underlying's primary listing venue and $$I\_3(t)$$ is the 3-minute EMA of the exchange mid. Averaging the public reference against local order flow lets the mark track the public venue while still reflecting on-exchange activity; neither leg alone can move the mark by more than half of its own displacement, so a dislocation on one side is damped by the other. The faster 3-minute EMA is used here because the public reference already anchors the mark, so the internal leg can respond more quickly without carrying the price on its own.

### Outside Market Hours

While the underlying's primary venue is closed, there is no live public reference. The mark is the internal price clipped to leverage-parameterized bounds centered on the last public print $$P\_{\mathrm{last}}$$:

<p align="center"><span class="math">L = \left(1 - \frac{1}{\ell_{max}}\right) P_{\mathrm{last}}, \qquad U = \left(1 + \frac{1}{\ell_{max}}\right) P_{\mathrm{last}}</span></p>

<p align="center"><span class="math">M(t) = \operatorname{clip}\!\left(I(t);\, L,\, U\right)</span></p>

where $$I(t)$$ is the 5-minute EMA of the exchange mid and $$\ell\_{max}$$ is the market's maximum leverage. The slower 5-minute EMA is used here because the internal price is carrying the mark alone, without a public anchor, so additional smoothing guards against short-lived dislocation. Only the mark is subject to these bounds; the oracle remains the unclipped blend defined on the Oracle Price page.

The clamp to $$\[L, U]$$ is what produces the venue's limit-up / limit-down behavior while the public market is closed. See the Limit Up / Limit Down page for how the band is derived and what it does and does not protect against.

### Session Transitions

The bounds are re-referenced to $$P\_{\mathrm{last}}$$ at each session close and released at the next open, when the mark returns to the market-hours construction on the first tick with an observable public reference price. Venue-declared halts and stale-feed conditions during the regular session are treated as outside market hours: the mark falls back to the clamped-internal construction until trading resumes or the feed recovers.

### Manipulation Resistance

In both regimes the internal leg enters through the smoothed mid. Moving the mid requires posting and exposing capital to fills away from fair value, so the cost of displacing the mark scales with the size of the intended displacement, and the EMA further damps any short-lived dislocation.
