By the end you will know the two ways a blockchain can host a perp market, how to tell who is on the other side of your trade, and why that one question decides everything else.
You already know this instrument. Checkpoint 3 built the perp: a bet on price with no expiry date, kept honest by funding payments. You built it inside a CEX, where a company's servers matched you behind closed doors.
Now move the venue onto a blockchain, where every step is public and every step costs gas. Same instrument, new building. And one question before anything else: who is on the other side of your trade?
A spot trade hands over the goods and is done. A perp is different: it is an open bet that must be settled later, so someone has to stand on the other side for as long as you hold it. On a CEX you never asked who. The venue quietly arranged it.
On a chain there are exactly two possible answers, and everything else about a venue follows from which one it gives. Hold the question. It is the whole lesson.
Picture two gambling rooms. In the first, players form a circle and bet against each other. The room only referees: it holds the stakes, enforces the rules, takes a small cut. Your bet exists only if another player takes the other side.
In the second room you sit at a table and bet against the house's own bankroll. Any bet, any hour: the house always takes it. Both rooms host the same game. Everything that matters differs.
Room one, rebuilt on a chain: a public list of real bids and asks, trader betting against trader, with the protocol as the referee. It matches the orders, holds everyone's margin, and settles the wins. Function first; the name: an order book perp DEX.
dYdX and Hyperliquid are the working examples. One catch: an order book needs a speed of updates that a base chain, where every step costs gas, cannot price. So these venues usually run on their own fast lane, built for the job. The circle brought its own room.
Room two needs no crowd at all. Liquidity providers fill one shared vault, and every trader on the venue bets against that vault. You win, the vault pays you. You lose, the vault keeps your margin. Function first; the name: pool as counterparty, and GMX is the model.
So who is paying here? The losers. Their lost margin funds the winners' payouts AND the LPs' return. The vault is the sum of its gamblers' mistakes, minus its payouts. Place a bet on that before scrolling.