Anatomy of a Perp · Ch. 07
Mark Price and Index Price
A whale dumps into a thin book and the perp prints $2,600 for a single second before snapping back. On a badly built exchange, that one-second wick liquidates thousands of traders. On a well-built one, nobody even notices. The difference is which price the exchange chooses to believe.
The Idea
Intuition
We’ve been saying the price as if a perp has one. Three of them matter.
The last price is whatever the most recent trade printed. It’s what you buy and sell against, and in a thin market it’s easy to shove around.
The index price is the outside truth: the asset’s spot price, averaged across many venues (the oracle from Chapter 1). No single exchange can move it, so it’s hard to fake.
The mark price is the one the exchange uses to value your position, for unrealized PnL, for margin, and for liquidations. It’s tied to the index and only allowed to drift a little from it. A lone wick on one venue can’t drag it.
So a manipulated spike moves the last price but not the mark. And since your liquidation is decided by the mark, a fake wick can’t wipe you out. Push a wick through and watch which lines move.
The Math
How It’s Calculated
In plain terms: the index averages spot across venues, and the mark is that index plus only a small, capped slice of the perp’s premium, so it tracks reality and shrugs off spikes.
The index is an average of the asset’s price across venues:
The mark anchors to that index and adds only a bounded piece of the basis:
The clamp is the whole point. However far the last trade wicks, the mark can sit at most away from the index. Liquidations read the mark, so they read reality, not a one-second spike.
Note
This is also why funding uses the mark, not the last trade. If funding were charged on a spikeable price, you could nudge the market for a second and change what everyone pays. Anchoring to the index takes that lever away.
War Story
Anchoring the mark to an index buys you safety from a wick on your own book. It does not buy you safety from the index itself.
We learned that the expensive way. The mark was doing exactly what this chapter describes: ignore our own last trade, follow the outside index. That index was a blend of major venues, and one of them was Binance, as it is for almost everyone. Sensible. Binance is deep, and nobody moves it by accident.
But “nobody moves it by accident” is not “nobody moves it.” Someone walked a stack of large orders into SOL on Binance. Not enough to look insane, just enough to nudge the price. Binance moved, so our index moved. Slowly, the averaging smoothed it, but it moved. And because the mark faithfully tracks the index, the mark drifted right along with it, exactly as designed.
That was the whole trap. They already held the position that profited when the mark moved. They leaned on the venue, let the index and then the mark drift into their favor, closed out, and pulled their orders. Clean, and it barely looked like an attack at all.
The lesson reframed the chapter for me. The mark is only as honest as the index, and the index is only as honest as its thinnest venue on its worst day. Manipulation resistance isn’t something you get by writing “mark equals index.” It lives in how you build the index: which venues, weighted how, with what depth checks, what outlier rejection, what time-averaging. On a deep asset it hardly matters. On a thin one, it’s the entire game.
Field note: building a perp DEX