Your First 90 DaysAcademy
The Protocols · The Machines, One at a Time · Week 7 · Checkpoint 13

On-chain Derivatives

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.

11 steps~20 min3 nodes for your map
01 · The perp leaves the building

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?

02 · The only question

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.

03 · Two rooms, one game

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.

04 · The betting circle

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.

05 · The casino table

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.

On a GMX-style venue, every trader this month lost money. The LP vault:
06 · Follow the money

Trace a month of money across the table. Traders post margin. Every bet settles against the vault: winners are paid out of it, losers' margin stays in it. Whatever remains at month's end, plus the fees every bet pays, belongs to the LPs.

That is the whole business of being this house. Run the month both ways and watch the pot.

Run a month through the vault:
07 · What the answer decides

Now watch the one answer decide everything else. In the circle, your fill needs a matching human, and the price is whatever the crowd is actually bidding: real discovery, but only as deep as the crowd. Thin crowd, thin market.

At the table, the vault takes every bet instantly, priced by an oracle reporting the wider market's price from outside. Always on, but the vault's health is now your counterparty risk, and its LPs quietly hope you lose. Tap all six cells and say each one back.

0 of 6 cells named
08 · Options, one beat

Options trade on-chain too, and their venues come in the same two shapes: order books where traders take each other's bets, and vaults that take every bet themselves. The market is thinner and earlier than perps, and the mechanics rhyme. One question still sorts every venue: who is on the other side?

09 · Same perp, two venues

Put the lesson to work. The same perp, the same minute, two venues: the order book DEX quotes you a worse price than the vault venue's oracle fill. A beginner calls one of them a ripoff. You can do better: name one honest reason to choose each.

Scenario
An order book DEX quotes a worse perp price than a vault venue. What is the honest case for each?
10 · The vault's worst month

One test before we close. You will hear this pitch: traders mostly lose, the vault takes the other side of every trader, so LPing the vault is free money. The board shows the month that pitch forgets. Find the edge of the lens.

Limit test
Vault LPing earns from trader losses, and traders mostly lose. So is it free money?
11 · One question, every venue

You now carry the one question that classifies any derivatives venue you will ever meet: who is on the other side? A crowd of traders, then check the crowd's depth. A vault of LPs, then check the vault's balance sheet and the oracle it prices by. That is the reading skill.

Every machine in this act runs on capital hunting yield. Next: where DeFi's baseline yield actually comes from: the chain itself paying for its own security.

your balance2,400
BANK_DBowner: the bank
you2,400
what the app is actually showing you
BANK_DBowner: the bank
you2,400their pen
you hold a claim. they hold the pen.
your digital life
BANK · you2,400the bank ✍
INSTAGRAM · you2.1M followersMeta ✍
STEAM · you134 gamesValve ✍
AIRLINE · you58,200 milesthe airline ✍
four tables. zero pens that are yours.
BANK_DBowner: the bank
you2,400
DENIED
try both pens
PLATFORM_DBowner: the platform
her · 8 years2,000,000 followers
one automated decision away
BANK_DB · you · 2,400intentcompetencecontinuity
your row stands on all three
FTX_DBowner: FTX
you5 BTC
the backing vault●●●●●
the row stayed. the backing did not.
CARD_DBowner: your bank ✍
TV you never bought−1,100
fraud reversal+1,100
someone holds the pen, so someone can fix it
?_DBowner: nobody
youstill yours?
?
can a table exist that nobody owns?
?
?_DBowner: ̶n̶o̶b̶o̶d̶y̶
you100
no owner, no pen, no trust?
keeper 1
you100
keeper 2
you100
keeper 3
you100
keeper 4
you100
keeper 5
you100
no THE copy, only copies.
keeper 2
you100
keeper 3
you100
keeper 4
you100
keeper 5
you100
your copy
you100
five copies. one of them is yours.
one attacker
one attacker, ten thousand faces.
real machinesburned wattsnext page, sealed
writing costs watts. faking voters buys nothing.
cost paid OUTSIDE: hardware and power
proof of work, burn energy to vote.
page 1you · 100page 2you · 100page 3you · 100page 4you · 100
rewrite one line, break every lock after it.
office lunchtrusted keeperconsensusfive keepers, real cost
the price buys trustlessness. the office already has trust.
?
ownerless ledger
you?
a key, not a login?
nobody owns the table. so who owns your row?
perp-dexcounterparty

Two new nodes on your map

perp-dex · counterparty · +10 Lynx