Unit 2 · Markets & Instruments — Session 06 of 07

Crypto Market Structure

Crypto markets use the machinery you have already met — order books, spreads, futures, margin — but rebuilt from scratch, open every hour of every day, and often run by a single company or a single piece of code. The prices are easy to see; the risks that traditional markets bury inside law and institutions are not. The core move: before you model a crypto price, map who holds the coins, who owes whom, and what gets liquidated when the price moves.

DURATION 1.5 h + lab LEVEL Foundations TRACKS QR · QT · QD · IND HANDS-ON Price AMM swaps, simulate funding, liquidate 20,000 accounts

2.6.1 One company, four jobs: the centralised exchange

Most crypto trading happens in an app that looks like a brokerage. Behind it, one company does the work that four separately regulated firms do in the markets of Session 2.1.

In Session 2.1 you followed an order through a broker, an exchange, a clearing house and a custodian: four firms, four rulebooks, each checking the others. A centralised exchange (CEX) such as Binance, Coinbase or OKX does all four jobs itself: it takes your order (broker), matches it in its own limit order book (venue), sets your margin and closes your position when it runs out (clearing house), and holds every coin and dollar you deposit (custodian). Many also lend, make markets or issue a token. IOSCO, the global body of securities regulators, lists "conflicts of interest arising from vertical integration of activities and functions" and "custody and client asset protection" among the six key areas of its 2023 crypto recommendations.

Once you deposit, the coins leave your control: your balance is a row in the exchange's database, and you cannot see what stands behind it. In the US, for example, SEC Rule 15c3-3 makes a broker-dealer keep customers' securities and cash segregated from its own, and UK and EU client-asset rules do the same; a crypto exchange's promise of segregation is only as good as whoever checks it.

SAME TRADE, TWO ARCHITECTURES — who holds your coins while you trade CENTRALISED EXCHANGE (CEX) one company · your balance is its IOU YOU log in, deposit coins and dollars in ONE LEGAL ENTITY, FOUR JOBS BROKER takes your order VENUE runs the order book CLEARING sets margin, liquidates CUSTODIAN holds every coin if the company fails, your coins become a claim DECENTRALISED EXCHANGE (DEX) code on a public blockchain · you keep the keys YOUR WALLET you hold the keys POOL CONTRACT prices from x · y = k VALIDATORS & BLOCK BUILDERS choose the order of transactions in each block signed swap executes it coins stay in your wallet until the swap settles new risks: contract bugs, front-running (MEV), lost keys — and no help desk A CEX asks you to trust one firm with four jobs; a DEX asks you to trust code and your own key.
fig 2.6.1 — a CEX bundles broker, venue, clearing house and custodian in one company; a DEX replaces the company with code and hands custody back to you
JobTraditional market (Session 2.1)Centralised exchangeDecentralised exchange
Take the ordera brokerthe exchange's app or APIyour wallet signs a transaction
Match buyer and selleran exchange's order bookthe exchange's own order booka pool contract (§2.6.3) or an on-chain order book
Guarantee the trade, run margina central counterpartythe exchange's risk enginerules written into the contract
Hold the assetsa custodian, segregated by lawthe exchange's wallets, often pooledyou, until the trade settles
Who checksregulators, auditors, the other three firmsmostly the exchange itselfanyone who reads the blockchain
📌 Key idea — your exchange balance is a claim, not a coin

On a venue that does not segregate client assets — or where no one checks that it does — a CEX balance is in effect an unsecured promise from one company that also matches your trades and decides when to liquidate you. In crypto, custody risk and counterparty risk live inside the venue, so choosing where to trade is a risk decision, not a convenience.

🧭 Margin note — a market that never closes

Crypto trades every hour of every day, so this session annualises with 365 days (8,760 hours), not 252 (annualisation: Session 2.3). Prices differ across venues — Makarov and Schoar (2020) found large, recurring arbitrage gaps between exchanges, far larger across countries than within them — and volume needs a haircut: Cong et al. (2023) estimate wash trading at over 70% of reported volume on the unregulated exchanges they studied (manipulation is Session 15.6).

2.6.2 When the venue is the risk: custody, reserves & FTX

Custody risk and counterparty risk are two faces of one question: if this firm fails tomorrow, what do I get back? In November 2022, FTX's customers found out.

Custody risk is the risk of losing assets because of how, and by whom, they are held: stolen from a hot wallet, locked behind a lost key, or quietly used by the custodian. Counterparty risk is the risk that whoever owes you — a venue, an issuer, a borrower — does not pay. A clearing house caps counterparty risk at about one day's price move (Session 2.4); on a CEX both risks sit in one company, uncapped. Custody can also fail on its own: the FBI attributed the theft of about $1.5 billion of crypto from the exchange Bybit, on or about 21 February 2025, to North Korean hackers. Bybit stayed solvent and, with emergency loans, restored full backing of client assets within about three days (CNBC, 24 February 2025): the loss fell on the firm, not its customers.

Nine days in November

Date (2022)What happened
2 NovCoinDesk reports that about $5.8 billion of the $14.6 billion of assets on the balance sheet of Alameda Research — the trading firm owned by FTX's founder, Sam Bankman-Fried — is tied to FTT, a token FTX itself issued.
6 NovBinance's chief executive says Binance will sell its FTT holdings. Customers start pulling money off FTX.
8 NovBinance announces a non-binding deal to buy FTX; later that day FTX suspends crypto withdrawals.
9 NovBinance walks away, citing its due diligence and news reports of mishandled customer funds.
11 NovFTX files for Chapter 11 bankruptcy in Delaware.

Sources: CoinDesk (2 and 9 Nov 2022), CNBC (9 Nov 2022), and the FTX bankruptcy filings.

What failed was the separation of roles. The SEC alleged in December 2022 that FTX gave Alameda "a virtually unlimited 'line of credit' funded by the platform's customers" and exempted it from key risk controls — the clearing job waived for an insider, paid for by the custody job. John J. Ray III, the new chief executive, told the bankruptcy court he had never seen "such a complete failure of corporate controls". A jury convicted Bankman-Fried on all seven counts on 2 November 2023; he was sentenced to 25 years on 28 March 2024, and prosecutors said he had taken more than $8 billion of customers' money.

Under the plan confirmed on 7 October 2024 (CNBC), customers with claims up to $50,000 — most creditors by number — received about 120% of their allowed claims from 18 February 2025, and larger customer claims had received 105% by the fifth distribution on 31 July 2026 (FTX Recovery Trust). But the claims were fixed in dollars at 11 November 2022 prices, when bitcoin traded near $17,000: a customer who held bitcoin got dollars at the crash price, more than two years later. Counterparty loss is not only whether you are paid, but in what and when.

Proof of reserves, and what it cannot prove

After FTX, exchanges began publishing proof of reserves: their wallet addresses (the assets) plus a Merkle tree of customer balances (the liabilities) in which each customer can find their own. As Buterin (2022) sets out, it is a snapshot, not a stream; coins can be borrowed for the snapshot (exchanges could "shuttle collateral" between each other); other debts never enter the tree; and fiat still needs an auditor. In December 2022 the auditor Mazars paused its proof-of-reserves work for all crypto clients, citing how the public understood the reports.

⚠️ Pitfall — "proof of reserves proves the exchange is solvent"

Solvency means assets cover all liabilities all the time; proof of reserves shows certain coins in certain wallets at one moment. Unless you know the venue segregates client assets and someone checks that it does, treat a CEX balance as an unsecured loan to it: size it, spread it across venues, and withdraw what you are not using.

2.6.3 Decentralised exchanges & the constant-product AMM

A decentralised exchange replaces the company with a program. The most influential design has no order book at all — just two piles of tokens and one line of algebra.

A decentralised exchange (DEX) is a set of smart contracts — programs on a public blockchain — that you trade with straight from your own wallet. Most spot DEX volume runs through automated market makers (AMMs): instead of matching buyers with sellers, an AMM is a pool of two assets, funded by liquidity providers (LPs), that always trades against you at a formula price. Uniswap v2's pool (Adams, Zinsmeister & Robinson 2020) holds xx tokens and yy dollars of a stablecoin (§2.6.5) and accepts any trade that does not reduce the product of the reserves:

xy=k,P=yxx\,y = k, \qquad P = \frac{y}{x}

Sell Δx\Delta x tokens and the pool pays out the Δy\Delta y that keeps the product at kk. The fee ϕ\phi — 0.30% on Uniswap v2, split 0.25% to LPs and 0.05% to the protocol since the "UNIfication" governance proposal was executed on 28 December 2025 (Uniswap documentation, checked 2026) — comes off what you pay in: only (1−ϕ)Δx(1-\phi)\,\Delta x counts toward kk, but all of it stays in the pool, so kk grows with every trade:

Δy=y(1−ϕ)Δxx+(1−ϕ)Δx\Delta y = \frac{y\,(1-\phi)\,\Delta x}{x + (1-\phi)\,\Delta x}
THE CONSTANT-PRODUCT CURVE — conceptual shape, not to scale dollars in the pool (y) tokens in the pool (x) → A · before B · after the sale x · y = k Δx tokens in Δy out tangent = the price you see chord = your average price 1 · THE RULE the product x · y must not fall (fees make it grow a little) 2 · THE PRICE y ÷ x — the steepness where you are: what a tiny trade would get 3 · A SALE Δx tokens in, Δy dollars out: A → B the pool now prices the token lower 4 · THE COST the chord is flatter than the tangent: bigger sale, worse average price Every trade slides along the same curve; the further it slides, the worse the average price.
fig 2.6.2 — the pool's price is the slope where it sits; a trade's average price is the slope of the chord it travels, always worse

Write the trade's size as a share of the pool, s=Δx/xs = \Delta x / x. Its total cost against the pre-trade price — fee plus market impact — is

cost(s)=1−1−ϕ1+(1−ϕ)s≈ϕ+sfor small s\text{cost}(s) = 1 - \frac{1-\phi}{1 + (1-\phi)\,s} \;\approx\; \phi + s \quad \text{for small } s

That is the rule of thumb to keep: an AMM trade costs the fee plus roughly its own size as a share of the pool. The lab's pool holds 1,000 tokens and $2,000,000, a price of $2,000:

Sell (share of pool)TokensWorth at the pre-trade priceAverage price receivedTotal cost (fee + impact)Pool price after
0.1%1$2,000$1,992.010.40%$1,996.01
1%10$20,000$1,974.321.28%$1,960.65
5%50$100,000$1,899.325.03%$1,814.32
10%100$200,000$1,813.229.34%$1,653.34
25%250$500,000$1,596.1620.19%$1,280.77
COST OF A SALE (FEE + IMPACT) BY POOL DEPTH (X = TRADE SIZE, $ THOUSANDS) lab pool 10× deeper 100× deeper 0.0% 5.0% 10.0% 15.0% 20.0% 0 100 200 300 400 lab pool lab pool: 16.9% 10× deeper 10× deeper: 2.2% 100× deeper 100× deeper: 0.5% lab pool: 16.9% 10× deeper: 2.2% 100× deeper: 0.5%
fig 2.6.3 — the same dollar sale into deeper pools: ten times the depth, about a tenth of the impact

Depth is everything: the same $20,000 sale into a pool 10 times deeper costs 0.40% instead of 1.28%. The swap itself, from the lab:

def swap(amount_in, reserve_in, reserve_out, fee=FEE):
    eff = amount_in * (1.0 - fee)                      # only this part counts toward k
    out = reserve_out * eff / (reserve_in + eff)       # keeps (reserve_in + eff)·(reserve_out − out) = k
    return out, reserve_in + amount_in, reserve_out - out   # the whole input stays: k grows

for s in SIZES:                                  # 0.1%, 1%, 5%, 10%, 25% of the token reserve
    dx = s * X0
    dy, x1, y1 = swap(dx, X0, Y0)
    exec_px = dy / dx
    cost = 1.0 - exec_px / mid0
    assert abs(cost - sell_cost_closed_form(s)) < 1e-12
🧭 Margin note — MEV, in one paragraph

Your swap waits in a public queue before a validator puts it in a block, where anyone can read it. A bot can buy just before your purchase and sell just after — a "sandwich" — pocketing the impact you were about to cause. Value extractable by whoever orders the transactions is called MEV (Daian et al. 2020 coined "miner extractable value"): front-running with the order book replaced by a block. The first defence is a tight minimum output on every swap.

💡 Looking ahead

An AMM is a market maker (a business you met in Session 1.1) with a fixed quoting rule: it never widens its spread when it is being picked off. Session 14.1 builds the order book it replaces, Session 14.5 a market maker who manages inventory risk, and Session 6.5 prices slippage on any venue.

2.6.4 Liquidity providers & impermanent loss

Someone has to fill the pool. Liquidity providers earn the fees — and pay for them by taking the other side of every arbitrageur.

When the price elsewhere moves, arbitrageurs trade against the stale pool until it matches (Angeris et al. show why a constant-product pool must track the outside price) — which means the LP sells the token as it rises and buys it as it falls. Without fees the pool's state depends only on the price PP: x=k/Px = \sqrt{k/P} and y=kPy = \sqrt{kP}, so the LP holds xP+y=2kPxP + y = 2\sqrt{kP}. If the price moves by the ratio θ=Pτ/P0\theta = P_\tau/P_0 over τ\tau years, compare that with holding the deposit:

VτLPV0=θ,VτholdV0=1+θ2,IL(θ)=VτLPVτhold−1=2θ1+θ−1≤0\frac{V^{\text{LP}}_\tau}{V_0} = \sqrt{\theta}, \qquad \frac{V^{\text{hold}}_\tau}{V_0} = \frac{1+\theta}{2}, \qquad \text{IL}(\theta) = \frac{V^{\text{LP}}_\tau}{V^{\text{hold}}_\tau} - 1 = \frac{2\sqrt{\theta}}{1+\theta} - 1 \;\le\; 0

That gap is impermanent loss — "impermanent" because it vanishes if the price returns, permanent once you withdraw. It is symmetric in the ratio: a halving and a doubling both cost −5.7% against holding, ±20% costs −0.6% or −0.4%, and a fourfold rise −20%. In the lab an arbitrageur makes 720 hourly trades against a pool on each of 40 simulated paths, using only the swap function, and the LP's result matches the formula to within 1e-15 on every path: only the final price matters.

VALUE OF $1 DEPOSITED, BY FINAL PRICE ÷ STARTING PRICE (CONSTANT PRODUCT, NO FEES) hold the deposit provide liquidity $0.50 $1.00 $1.50 $2.00 $2.50 1 2 3 4 hold the deposit hold the deposit: $2.50 provide liquidity provide liquidity: $2.00 hold: $2.50 LP: $2.00
fig 2.6.4 — $1 in a pool against $1 held: the LP line touches the holding line only where the price ends where it started

How much does it cost on average? If the price has no drift, holding breaks even in expectation, but θ\sqrt{\theta} is concave, so the LP does not: for a lognormal price 𝔼[θ]=e−σ2τ/8\E[\sqrt{\theta}] = e^{-\sigma^2 \tau/8}, with τ\tau in years, and

𝔼[VτLP−VτholdV0]=e−σ2τ/8−1≈−σ2τ8\E\!\left[\frac{V^{\text{LP}}_\tau - V^{\text{hold}}_\tau}{V_0}\right] = e^{-\sigma^2 \tau/8} - 1 \;\approx\; -\frac{\sigma^2 \tau}{8}

At a crypto-like 80% volatility over one year, theory says −7.69%; 200,000 simulated years give −7.72% with a standard error of 0.035%. So fees must earn about 3.1% a year just to match holding at 50% volatility, 7.7% at 80% and 11.8% at 100% (1−e−σ2/81 - e^{-\sigma^2/8} for one year).

📌 Key idea — a liquidity provider is short volatility

The LP's payoff θ\sqrt{\theta} is concave, the shape an option seller holds (options arrive in Session 2.7). Providing liquidity is a bet that fees beat roughly σ²/8 a year. The loss goes to arbitrageurs trading against stale prices — the adverse selection every market maker faces, formalised by Milionis et al. (2022) as "loss-versus-rebalancing". Uniswap v3 (2021) lets LPs concentrate liquidity in a price range: more fees per dollar, more loss per move.

2.6.5 Stablecoins: four designs, four ways to break

Most crypto prices are quoted in a dollar that is not a dollar. How it is built decides how it breaks.

A stablecoin is a token designed to hold a fixed value, usually $1, by being a claim on something: an issuer's reserves, a pile of crypto collateral, a mechanism, or a hedged crypto position.

Design (examples)What stands behind $1How it breaks — and when it did
Fiat-backed (USDT, USDC)cash, Treasury bills and bank deposits held by an issuer that redeems at parUSDC fell to roughly 87–88 cents on 11 March 2023, when $3.3 billion of its roughly $40 billion of reserves sat at the failed Silicon Valley Bank; it recovered once US authorities said on 12 March that all SVB depositors would be protected.
Crypto-collateralised (DAI)more crypto than the stablecoins issued, locked in a contract that liquidates under-collateralised positionsA crash faster than the liquidations leaves the system short of collateral — and the collateral can itself depeg: DAI, then about half backed by USDC, hit 88 cents with it on 11 March 2023 (CoinDesk; Cointelegraph).
Algorithmic (UST, Terra)a mint-and-burn swap with a sister token, and little outside collateralA run began on 7 May 2022; Terra lost about $50 billion of value in three days (Liu, Makarov & Schoar 2023), and UST traded around 12 cents by 13 May (CNBC, citing CoinGecko).
Synthetic dollar (USDe, Ethena)spot crypto plus a short perpetual — the funding trade of §2.6.7, packaged as a tokenIt breaks if funding stays negative long enough to drain its reserve, or if a venue holding the short fails. On 10 October 2025 it hit 65 cents on Binance's own order book while staying near $1 elsewhere; Binance priced collateral off that thin book, and accounts using it as margin were liquidated (CoinDesk).

Read each design as something you already know. A fiat-backed coin is a narrow bank without a banking licence: it carries the credit risk of its reserves and issuer, and few firms can redeem directly — Tether let an average of six agents a month redeem for cash (Ma, Zeng & Zhang 2025). A crypto-collateralised coin is a margin loan with the liquidation rules in code. An algorithmic coin works while people believe it works; Terra's run was visible on-chain, which sped it up, and the wealthier, more sophisticated investors ran first and lost less (Liu, Makarov & Schoar 2023). A synthetic dollar is §2.6.7's basis trade in a wrapper, with that trade's risks.

⚠️ Pitfall — "a stablecoin is a dollar"

It is a claim on an issuer, a contract or a mechanism, and it can trade below $1 exactly when you need it. Your "dollar" P&L is P&L in a token, and stablecoin collateral can be marked down — on one venue's prices — and liquidate a position that was otherwise fine. Haircut it, and know who can redeem at par.

2.6.6 Perpetual futures & the funding rate

The most traded instrument in crypto is a futures contract that never expires. With no expiry there is no convergence — so the venue builds one in, as a payment between longs and shorts every few hours.

In Session 2.4 a futures contract converges to spot because at expiry it is the asset. A perpetual future (a "perp") has no expiry. The idea is older than crypto — Shiller (1993) proposed perpetual contracts on hard-to-trade indices — but it took off when BitMEX introduced the first crypto perpetual in 2016 (He et al.), long offering up to 100× leverage (250× since April 2024, as reported by The Block). By one estimate, perps traded over $60 trillion in 2024 (Chitra 2025).

What replaces convergence is the funding rate. With perp price FtF_t, spot StS_t and premium πt=Ft/St−1\pi_t = F_t/S_t - 1 (π for premium), at each funding time every long pays every short the funding rate times the position's notional — or receives it when the rate is negative; the money moves between traders, not to the venue (Ackerer, Hugonnier & Jermann 2026 derive the resulting no-arbitrage prices). Binance publishes it for its default 8-hour interval, and Hyperliquid uses the same form paid hourly (checked 2026):

FRj=π‾j+clamp⁡(ι−π‾j,−0.05%,+0.05%)\mathrm{FR}_j = \bar{\pi}_j + \operatorname{clamp}\!\big(\iota - \bar{\pi}_j,\; -0.05\%,\; +0.05\%\big)

where π‾j\bar{\pi}_j is the premium averaged over funding interval jj and ι\iota an "interest" component of 0.01% per 8 hours. While the average premium sits between −0.04% and 0.06%, funding is exactly ι\iota — a built-in 10.95% a year from longs to shorts when nothing is happening. Outside that band funding follows the premium, so a gap costs the crowded side about the gap itself, every interval.

THE FUNDING LOOP — it runs in reverse when the perp trades below spot 1 · PERP ABOVE SPOT leveraged buyers bid the perp up: premium π above zero 2 · FUNDING TURNS UP longs pay shorts FR × notional at every funding time (often 8 h) 3 · ARBITRAGE STEPS IN sell the perp, buy spot, collect the funding 4 · PREMIUM SHRINKS the perp is pulled back to spot; funding falls back toward ι next demand shock shorts are paid to hold negative feedback: a thermostat, not a guarantee
fig 2.6.5 — the funding loop: a premium makes funding positive, which pays arbitrageurs to sell the perp and buy spot, shrinking the premium
Venue (as of 2026)Funding intervalNotes
Binance, USDⓈ-margined perps8 hours by default (00:00, 08:00, 16:00 UTC)may switch to 4 or 1 hour in extreme volatility
BitMEX8 hours (04:00, 12:00, 20:00 UTC)the original crypto perp (2016)
Hyperliquid (on-chain)every hoursame formula; capped at 4% an hour
Coinbase Derivatives (US, CFTC-regulated)accrues hourly, settles twice a day"perpetual-style": a five-year expiry; trading began 21 July 2025

What funding does to the premium: a toy model

The lab simulates 2,000 years of hourly trading, with spot at 60% volatility. Speculative demand pushes the premium — a steady long bias plus 2-basis-point hourly shocks, correlated 0.5 with spot because buyers chase rallies — and arbitrage, paid by funding, closes a fraction ψ\psi of the gap each hour (a 8-hour half-life):

πt+1=(1−ψ)πt+η+σπεt+1,sd(π)=σπ1−(1−ψ)2\pi_{t+1} = (1-\psi)\,\pi_t + \eta + \sigma_\pi\,\varepsilon_{t+1}, \qquad \text{sd}(\pi) = \frac{\sigma_\pi}{\sqrt{1-(1-\psi)^2}}

The counterfactual switches funding off: nobody is paid to close the gap, ψ=0\psi = 0, and the premium is a random walk with drift. The model assumes that funding-paid arbitrage closes ψ\psi of the gap each hour (the funding it computes never feeds back), so it illustrates the mechanism rather than testing it; both regimes match their theory. With funding, the premium after a year averages +0.021% (theory +0.020%) with a standard deviation of 0.049% (theory 0.050%), and 99% of paths sit within 0.14% of spot. Without it, the same shocks leave the perp 14.6% above spot on average, give or take 1.8%.

PERP PREMIUM OVER SPOT, ONE SIMULATED YEAR (X = ELAPSED DAYS) with funding no funding (counterfactual) −5% 0% 5% 10% 15% 0 100 200 300 with funding with funding: 0% no funding (counterfactual) no funding (counterfactual): 15% no funding: 15% with funding: 0%
fig 2.6.6 — one simulated year, same demand shocks: with funding the premium stays near zero; without it, nothing ties the perp to spot

Funding was exactly ι\iota in 72% of intervals and negative in 6%. A year of funding averaged 13.9% of notional (5th–95th percentile 12.5% to 15.4%), above the 10.95% that ι\iota alone pays, because the premium averages 0.02%, above ι\iota, so more intervals break out above the band — where funding follows the premium up — than below it.

📌 Key idea — funding is a thermostat, not a peg

Funding makes a gap expensive to hold and pays whoever closes it, but it cannot force convergence the way expiry does. He, Manela, Ross and von Wachter find perp prices stray further from their no-arbitrage values in crypto than comparable prices do in currency markets, though less over time. A perp tracks spot only as well as arbitrage capital is paid, and willing, to make it.

2.6.7 Basis trades, liquidation & auto-deleveraging

The funding that longs pay is income for somebody. Collecting it is the crypto basis trade — the cash-and-carry of futures, with two new ways to lose.

The trade

With a dated future it is the cash-and-carry of Session 2.4: buy spot, sell the future, and lock in the futures premium over spot, F/S−1F/S - 1, whatever the price does. Crypto desks call that premium "the basis"; in 2.4's basis convention, S−FS - F, the same gap is negative, so check the sign. Crypto futures premiums often sit far above dollar interest rates: Schmeling, Schrimpf and Todorov (2023) document bitcoin and ether carry averaging above 10% a year and at times 60%, left on the table because arbitrage is risky "due to spikes in margins and liquidations amid drawdowns". Whether it is a risk premium is a question for Session 8.4.

With a perp you buy one unit of spot, short one unit of the perp and collect funding. The legs cancel except for the gap between them, so the year's gain is exactly

gain=∑jFRjFtj−(Sendπend−S0π0)\text{gain} = \sum_j \mathrm{FR}_j\,F_{t_j} \;-\; \big(S_{\text{end}}\,\pi_{\text{end}} - S_0\,\pi_0\big)

— funding received, minus any widening of the premium. After 0.20% of fees the trade earned 14.0% of starting notional on average (5th–95th percentile 6.9% to 23.9%, since the notional moves with the price) and 0% of paths lost money, while the spot leg alone had a standard deviation of 64%. With the short leg at 3×, capital is 1.33 times notional and the return on it 10.5% — assuming the short is topped up and never liquidated, and that funding stays as positive as this model makes it; real funding has turned negative for long stretches. It is not free money, for two reasons.

1 · The hedge leg can be liquidated. Hold the spot in cold storage and the short perp at 3× on an exchange, and a 32.7% rally liquidates the short while the offsetting gain sits in a wallet the exchange cannot see. In the lab that happens within a quarter on 29% of paths and within a year on 54%, leaving you long spot at the top of a rally. 2 · The venue can fail (§2.6.2). Assume, purely for illustration, a 2% annual failure probability with nothing recovered. If both legs sit on the failed venue, the expected return falls from 10.5% to 8.3%, and it breaks even at a failure probability of 9.5%; with the spot in cold storage only the margin, 25% of the capital, is at stake, and the expected return is 9.8%. The average is not the problem; the loss tail is.

How a crypto venue liquidates you

Liquidation is the forced closing of a position by the venue when its margin runs out. In Session 2.4 a margin call asked you for cash, and the position was closed only if you could not pay. A crypto venue checks equity against the maintenance margin continuously, on a mark price built from spot indices rather than its own last trade, and there is no call: the engine takes over. For an isolated-margin long with leverage LL and maintenance rate mm (a fraction of the current notional), that happens when the price falls to

Pliq=P01−1/L1−m,d⋆=1/L−m1−mP_{\text{liq}} = P_0\,\frac{1 - 1/L}{1 - m}, \qquad d^\star = \frac{1/L - m}{1 - m}

— almost exactly the d⋆=1/L−md^\star = 1/L - m of Session 2.4. Then comes a waterfall (fig 2.6.7). At the bankruptcy price the position's equity is exactly zero. If the engine sells before it, part of the leftover margin feeds an insurance fund as a fee; if the price gaps through it, the fund absorbs the loss; and if the fund runs dry, auto-deleveraging (ADL) closes profitable positions on the other side, ranked by profit and leverage (Binance's auto-deleveraging FAQ).

WHEN MARGIN RUNS OUT — the liquidation waterfall on a perpetual venue 1 · MARK equity checked vs m × notional, nonstop 2 · TRIGGER equity below the maintenance margin 3 · ENGINE SELLS closes the position in the market filled before bankruptcy? 4a · DONE leftover margin: a fee to the fund yes 4b · INSURANCE FUND absorbs the loss past the bankruptcy price no — a gap 5 · ADL fund empty? then profitable traders on the other side are closed out BANKRUPTCY PRICE the price at which the position's equity is exactly zero. Past it, someone other than the trader pays for the loss: first the venue's fund, then the winners. Losses past zero must land on someone — first the insurance fund, then the winning side.
fig 2.6.7 — the liquidation waterfall: a loss past the bankruptcy price goes to the insurance fund and, if the fund is empty, to the winners through ADL

On 10 October 2025 more than $19 billion of leveraged crypto positions were liquidated within 24 hours, the largest such day on record (CoinDesk Research), and on the on-chain venue Hyperliquid, ADL closed $2.1 billion of positions in 12 minutes (Chitra 2025): traders who had been right had their winners shut.

How long does a leveraged position last?

The lab simulates 20,000 one-year hourly paths in calendar time at 60% volatility, no drift and a 0.5% maintenance margin; the first breach liquidates. Real engines check more often than hourly, so these slightly understate.

LeverageFall that liquidates, d*Liquidated within 1 daywithin 30 dayswithin 1 yearMedian time to liquidation
3×33.0%0.0%2.3%60.7%243 calendar days
10×9.5%0.1%57.9%90.3%21 calendar days
25×3.5%21.4%83.5%96.5%81 hours
100×0.5%78.2%96.5%99.2%4 hours

These match the barrier-crossing formula of Session 2.4, corrected for hourly checks, within four standard errors (largest gap 1.7) wherever the liquidation price is at least five hourly standard deviations (0.64% each) away: up to 25× here. (Monte Carlo is Session 3.5.)

SHARE OF LEVERAGED LONGS LIQUIDATED BY DAY T (60% VOLATILITY; X = ELAPSED DAYS) 3× long 5× long 10× long 25× long 0% 20% 40% 60% 80% 100% 0 100 200 300 3× long 3× long: 61% 5× long 5× long: 79% 10× long 10× long: 90% 25× long 25× long: 96% 25×: 96% 10×: 90% 5×: 79% 3×: 61%
fig 2.6.8 — leveraged longs in a 60%-volatility market that never closes: at 25× most are gone within days, at 3× most within the year
⚠️ Pitfall — "delta-neutral means riskless"

A basis trade has no price exposure only while both legs survive and both venues pay. Size the short leg for the rally you can fund (Session 2.4's lesson), keep collateral where the margin is, and count venue failure as a cost.

2.6.8 The risk stack & regulation

Traditional markets hide most of these risks behind law, institutions and a closing bell. In crypto they are all on your side of the screen, stacked under every position you hold.

THE CRYPTO RISK STACK — a position is only as safe as every layer under it LAYER WHAT CAN GO WRONG IN TRADITIONAL MARKETS YOUR POSITION the P&L on your screen sits on top of everything below LIQUIDATION RISK high leverage meets a market that never closes margin calls, often with time to pay DEPEG RISK your "dollars" are tokens that can trade below $1 insured deposits, central banks SMART-CONTRACT RISK bugs, bad price oracles and MEV in the code rulebooks and courts, not code COUNTERPARTY RISK the venue or issuer cannot pay what it owes you a CCP stands between the two sides CUSTODY RISK who holds the keys: hacks, lost keys, commingling segregated client assets, audits Traditional markets bury the lower layers in law and institutions; in crypto you price them yourself.
fig 2.6.9 — five layers under every position; traditional markets shield each one, and each can zero a crypto position on its own

Regulation, as of September 2026

Rules differ by jurisdiction and are changing fast; these are dated examples, not advice.

JurisdictionWhere things stand
European UnionMiCA (Regulation (EU) 2023/1114). Its stablecoin rules have applied since 30 June 2024 and its rules for crypto-asset service providers since 30 December 2024. National transitional periods ended by 1 July 2026: a firm serving EU clients now needs a MiCA authorisation (ESMA).
United StatesThe GENIUS Act, signed on 18 July 2025, created a federal regime for payment stablecoins, with at least $1 of permitted reserves for each $1 issued; it takes effect on the earlier of 18 January 2027 (18 months after enactment) or 120 days after regulators issue final rules. There is no comprehensive market-structure law: the House passed the CLARITY Act in July 2025, but a Senate cloture vote on it failed on 15 September 2026. Meanwhile the SEC approved spot bitcoin exchange-traded products on 10 January 2024, CFTC-regulated "perpetual-style" futures have traded since July 2025, and states license exchanges — New York's BitLicense dates from 2015.
United KingdomThe FCA's new cryptoasset regime is expected to come into force on 25 October 2027; firms can apply from 30 September 2026.

For a quant, regulation changes the bottom of the risk stack — an authorised venue must segregate client assets and publish its rules — not the top.

2.6.9 Try it

Open the companion lab, predict before you run, and check your prediction against the asserts.

🔧 Try it (15 min, in the lab)

1. In section 1 set FEE = 0.0005. Predict the cost of the 1% sale from cost(s)≈ϕ+s\text{cost}(s) \approx \phi + s, then run: how much of the old cost was the fee?
2. In section 2 set IL_SIGMA = 0.5 and predict the expected loss against holding from e−σ2/8−1e^{-\sigma^2/8} - 1; the Monte Carlo assert tells you if you were right.
3. In section 5 add 20 to LEVELS (keep the list sorted). Compute d* by hand from (1/L−m)/(1−m)(1/L - m)/(1 - m), then read the median time to liquidation off the printed table.
Success: each prediction matches the lab, and you can say in one sentence why survival time falls so much faster than d*.


2.6.10 Glossary · Check yourself · Go deeper

Centralised exchange — a company that runs a crypto trading venue and is also broker, clearing house and custodian for its customers.
Decentralised exchange — a venue built from smart contracts on a public blockchain; you trade from your own wallet and trades settle on-chain.
Automated market maker — a venue that quotes prices from a formula over pooled reserves, such as xy=kx\,y = k, instead of matching orders in a book.
Perpetual future — a futures contract with no expiry, held close to spot by periodic funding payments between longs and shorts.
Funding rate — the periodic rate longs pay shorts on a perpetual future (shorts pay when it is negative): the perp's average premium over spot, replaced by a small fixed interest rate (0.01% per 8 hours on Binance) whenever the premium is within 0.05% of it.
Stablecoin — a token designed to hold a fixed value, usually $1, backed by fiat reserves, over-collateralised crypto, an algorithm, or a hedged crypto position (a synthetic dollar).
Impermanent loss — a liquidity provider's shortfall against simply holding the deposit, caused by arbitrageurs trading the pool back to the market price; 2√θ/(1+θ) − 1 for a constant-product pool.
Proof of reserves — an exchange's published snapshot of its wallet holdings, often with a Merkle tree of customer balances; it shows assets at one moment, not solvency.
Insurance fund — a venue's reserve, fed by liquidation fees, that absorbs losses on positions closed beyond their bankruptcy price.
Auto-deleveraging — a venue's last resort when its insurance fund is exhausted: profitable opposing positions are closed, ranked by profit and leverage, to cover a bankrupt position.
Custody risk — the risk of losing assets because of how and by whom they are held: hacks, lost keys, commingling or misuse.
Counterparty risk — the risk that whoever owes you — a venue, issuer, borrower or trading partner — fails to pay.
Liquidation — the forced closing of a leveraged position by the venue or broker once its margin falls below the maintenance requirement.

Check yourself

1. Your exchange halts withdrawals and files for bankruptcy while holding your bitcoin. Which two risks just materialised, and what did FTX's customers get back?
Custody risk (the coins may not be where the ledger says) and counterparty risk (you now hold a claim on a bankrupt company). FTX's customers got about 105–120% of their allowed claims, depending on claim size — in dollars at November 2022 prices, more than two years later — so bitcoin holders missed the rebound. Size an exchange balance like an unsecured loan.
2. You sell 100 tokens into the lab's pool of 1,000 tokens and $2,000,000. What does it cost, and what would help?
9.34% against the quote: the fee plus roughly your share of the pool (ϕ+s\phi + s). Split the sale so arbitrageurs refill the pool between pieces, or use a deeper pool — ten times the depth, about a tenth of the impact.
3. You deposit $10,000 as a liquidity provider when the token is at $2,000. It doubles. Ignoring fees, how do you compare with someone who simply held the deposit?
Holding is worth $15,000; the LP position, $10,000 × √2, is worth $14,142: an impermanent loss of −5.7% (−$858). Arbitrageurs bought the token from the pool all the way up.
4. A perp's premium averaged 0.10% over an 8-hour interval. What is the funding rate, who pays it, and what does it add up to if it lasts a year? What would you do?
FR = 0.10% + clamp(0.01% − 0.10%, ±0.05%) = 0.05% per interval, paid by longs to shorts — 54.8% a year over 1,095 intervals if it persisted. Short the perp and buy spot to collect it: exactly the trade that shrinks the premium (fig 2.6.5).
5. You run the basis trade with spot in cold storage and a 3× short perp on an exchange. The price rallies 35% in a week. What happens, and how should you have set it up?
The short is liquidated after a 32.7% rally — its loss realised on the exchange, the matching gain stranded in cold storage — and you are left long and unhedged at the top (within a quarter on 29% of the lab's paths). Use lower leverage on the hedge, keep collateral where the margin is, and automate top-ups.
6. A friend trades 25× longs "with a tight stop". How far can the price fall before liquidation, and how does that compare with an ordinary day?
d* = 3.5% with a 0.5% maintenance margin, against a one-day standard deviation of 3.1% at 60% annual volatility. In the lab 21% of such accounts are liquidated within a day, and the median lasts 81 hours. At that leverage the engine is the stop — and it sells at the market.
🔧 Homework (~1 h before Session 2.7)

1. Price the LP's risk. Run section 2 with IL_SIGMA at 0.5, 0.8 and 1.0 and tabulate the Monte Carlo loss against e−σ2/8−1e^{-\sigma^2/8} - 1; at 80% volatility, what daily volume (as a share of the pool) lets the 0.25% LP fee break even?
2. Stress the funding loop. In section 3 set CORR_DEMAND = 0.9 and MEAN_PREM = 0.0004. How do the share of intervals at ι, the negative share and the annual funding change? Explain it with the clamp.
3. Move the maintenance margin. In section 5 set M_RATE = 0.01. Which leverages change most, and why does 100× become almost instant?
4. Read Buterin's proof-of-solvency post and write three sentences on what proof of reserves would and would not have revealed about FTX in October 2022.
5. For next time: keep your sketch of fig 2.6.4; the payoff diagrams of Session 2.7 will name its shape.

📚 Go deeper

  1. Adams, H., Zinsmeister, N. & Robinson, D. (2020). "Uniswap v2 Core." Whitepaper, March 2020. https://app.uniswap.org/whitepaper.pdf
  2. Milionis, J., Moallemi, C. C., Roughgarden, T. & Zhang, A. L. (2022). "Automated Market Making and Loss-Versus-Rebalancing." arXiv:2208.06046
  3. He, S., Manela, A., Ross, O. & von Wachter, V. (2022, revised 2026; version 7 of 17 September 2026). "Fundamentals of Perpetual Futures." arXiv:2212.06888
  4. Schmeling, M., Schrimpf, A. & Todorov, K. (2023). "Crypto Carry." BIS Working Papers No. 1087. https://www.bis.org/publ/work1087.htm
  5. Liu, J., Makarov, I. & Schoar, A. (2023). "Anatomy of a Run: The Terra Luna Crash." NBER Working Paper 31160 (April 2023; since published in the Journal of Financial Economics, vol. 184). doi:10.3386/w31160
  6. Buterin, V. (2022). "Having a safe CEX: proof of solvency and beyond." 19 November 2022. https://vitalik.eth.limo/general/2022/11/19/proof_of_solvency.html
  7. Makarov, I. & Schoar, A. (2020). "Trading and Arbitrage in Cryptocurrency Markets." Journal of Financial Economics 135(2), 293–319. doi:10.1016/j.jfineco.2019.07.001

Sources for the numbers

  1. Adams, H., Zinsmeister, N., Salem, M., Keefer, R. & Robinson, D. (2021). "Uniswap v3 Core." Whitepaper, March 2021. https://app.uniswap.org/whitepaper-v3.pdf · Uniswap developer documentation, "Fees" (checked 2026). https://developers.uniswap.org/docs/get-started/concepts/fees · Uniswap governance, "UNIfication" (proposal 93, executed 28 December 2025). https://vote.uniswapfoundation.org/proposals/93
  2. Angeris, G., Kao, H.-T., Chiang, R., Noyes, C. & Chitra, T. (2019, revised 2021). "An analysis of Uniswap markets." arXiv:1911.03380
  3. Daian, P., Goldfeder, S., Kell, T., Li, Y., Zhao, X., Bentov, I., Breidenbach, L. & Juels, A. (2020). "Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability." IEEE Symposium on Security and Privacy. arXiv:1904.05234
  4. Shiller, R. J. (1993). "Measuring Asset Values for Cash Settlement in Derivative Markets: Hedonic Repeated Measures Indices and Perpetual Futures." Journal of Finance 48(3), 911–931. doi:10.1111/j.1540-6261.1993.tb04024.x
  5. Ackerer, D., Hugonnier, J. & Jermann, U. (2026). "Perpetual Futures Pricing." Mathematical Finance. doi:10.1111/mafi.70018
  6. Chitra, T. (2025, revised 2026). "Autodeleveraging: Impossibilities and Optimization." arXiv:2512.01112
  7. Cong, L. W., Li, X., Tang, K. & Yang, Y. (2023). "Crypto Wash Trading." Management Science 69(11), 6427–6454. doi:10.1287/mnsc.2021.02709
  8. Ma, Y., Zeng, Y. & Zhang, A. L. (2025). "Stablecoin Runs and the Centralization of Arbitrage." NBER Working Paper 33882. https://www.nber.org/papers/w33882
  9. IOSCO (2023). "Policy Recommendations for Crypto and Digital Asset Markets: Final Report." FR11/2023, 16 November 2023. https://www.iosco.org/library/pubdocs/pdf/IOSCOPD747.pdf
  10. SEC Rule 15c3-3, "Customer protection — reserves and custody of securities." 17 CFR 240.15c3-3. https://www.ecfr.gov/current/title-17/chapter-II/part-240/subpart-A/subject-group-ECFR541343e5c1fa459/section-240.15c3-3
  11. FTX: Allison, I. (CoinDesk, 2 Nov 2022) and CoinDesk timeline (9 Nov 2022) https://www.coindesk.com/layer2/2022/11/09/8-days-in-november-what-led-to-ftxs-sudden-collapse · CNBC, "Binance backs out of FTX rescue" (9 Nov 2022) https://www.cnbc.com/2022/11/09/binance-backs-out-of-ftx-rescue-leaving-the-crypto-exchange-on-the-brink-of-collapse.html · Declaration of John J. Ray III, In re FTX Trading Ltd., Case 22-11068 (Bankr. D. Del., 17 Nov 2022) https://www.documentcloud.org/documents/26141228-affidavitdeclaration-in-support-of-first-day-motion-declaration-of-john-j-ray-iii-in-support-of-chapter-11-petitions-and-first-day-pleadings-filed-by-ftx-trading-ltd/
  12. SEC press release 2022-219 (13 Dec 2022) https://www.sec.gov/newsroom/press-releases/2022-219 · US Attorney's Office, SDNY, "Samuel Bankman-Fried Sentenced To 25 Years In Prison" (28 Mar 2024) https://www.justice.gov/usao-sdny/pr/samuel-bankman-fried-sentenced-25-years-prison · CNBC, "Sam Bankman-Fried found guilty on all seven criminal fraud counts" (2 Nov 2023) https://www.cnbc.com/2023/11/02/sam-bankman-fried-found-guilty-on-all-seven-criminal-fraud-counts.html
  13. CNBC, "FTX bankruptcy judge approves more than $14 billion payback plan" (7 Oct 2024) https://www.cnbc.com/2024/10/07/ftx-bankruptcy-judge-approves-more-than-14-billion-payback-plan.html · FTX Recovery Trust, "FTX Announces Fifth Distribution of Approximately $900 Million to Creditors on July 31, 2026" (PR Newswire, 17 Jul 2026) https://www.prnewswire.com/news-releases/ftx-announces-fifth-distribution-of-approximately-900-million-to-creditors-on-july-31-2026-302828726.html · FTX, "FTX Announces Initial Distribution Date of February 18, 2025 for Convenience Class Creditors" (PR Newswire, 7 Feb 2025) https://www.prnewswire.com/news-releases/ftx-announces-initial-distribution-date-of-february-18-2025-for-convenience-class-creditors-302371626.html · Cointelegraph, "FTX debtors assess value of crypto claims based on petition date market prices" (16 Dec 2023) https://cointelegraph.com/news/ftx-reorganization-plan-crypto-assets-bankruptcy
  14. CoinDesk, "Auditing Firm Mazars Pauses Proof-of-Reserves Work for Crypto Clients" (16 Dec 2022) https://www.coindesk.com/business/2022/12/16/binance-proof-of-reserves-auditor-mazars-pauses-all-work-for-crypto-clients · FBI, "North Korea Responsible for $1.5 Billion Bybit Hack" (26 Feb 2025) https://www.ic3.gov/psa/2025/psa250226 · CNBC, "Crypto exchange Bybit says it fully replenished reserves after record $1.5 billion hack" (24 Feb 2025) https://www.cnbc.com/2025/02/24/bybit-replenished-reserves-after-record-breaking-1point5-billion-hack.html
  15. USDC, DAI and SVB: CoinDesk, "DAI Depegs to Lifetime Lows as Stablecoin Rout Plagues Crypto" (11 Mar 2023) https://www.coindesk.com/markets/2023/03/11/dai-depegs-as-stablecoin-rout-plagues-crypto · Cointelegraph, "Circle's USDC instability causes domino effect on DAI, USDD stablecoins" (11 Mar 2023) https://cointelegraph.com/news/circle-s-usdc-instability-causes-domino-effect-on-dai-usdd-stablecoins · CoinDesk (11 Mar 2023) https://www.coindesk.com/business/2023/03/11/circle-confirms-33b-of-usdcs-cash-reserves-stuck-at-failed-silicon-valley-bank · CNN (11 Mar 2023) https://www.cnn.com/2023/03/11/business/stablecoin-circle-silicon-valley-bank · Joint statement by the Treasury, Federal Reserve and FDIC (12 Mar 2023) https://www.federalreserve.gov/newsevents/pressreleases/monetary20230312b.htm
  16. UST: CNBC, "Cryptocurrency luna crashes to $0 as UST falls further from dollar peg" (13 May 2022) https://www.cnbc.com/2022/05/13/cryptocurrency-luna-crashes-to-0-as-ust-falls-from-peg-bitcoin-rises.html · USDe: Godbole, O., "No, Ethena's USDe Didn't De-peg During Friday's Crash" (CoinDesk, 13 Oct 2025) https://www.coindesk.com/markets/2025/10/13/no-ethena-s-usde-didn-t-de-peg
  17. Funding and liquidation rules (checked 2026): Binance, "Introduction to Binance Futures Funding Rates" https://www.binance.com/en/support/faq/360033525031 · Binance, "Binance Futures Liquidation Protocols", "Introduction to Futures Insurance Funds" and "What Is Auto-Deleveraging (ADL) and How Does It Work?" https://www.binance.com/en/support/faq/360033525471 https://www.binance.com/en/support/faq/binance-futures-liquidation-protocols-360033525271 https://www.binance.com/en/support/faq/introduction-to-futures-insurance-funds-360033525371 · Hyperliquid Docs, "Funding" https://hyperliquid.gitbook.io/hyperliquid-docs/trading/funding · BitMEX, "Perpetual Contracts Guide" https://www.services.bitmex.com/app/perpetualContractsGuide · Coinbase, "US Perpetual-Style Futures 101" https://www.coinbase.com/learn/futures/us-perpetual-style-futures-101
  18. BitMEX leverage: The Block, "BitMEX's bitcoin perpetual swap now offers 250x leverage ahead of halving" (19 Apr 2024) https://www.theblock.co/post/289766/bitmexs-bitcoin-perpetual-swap-250x-leverage-halving
  19. 10 October 2025: CoinDesk Research, "Market Spotlight: Inside Crypto's $19 Billion Liquidation Event" (17 Oct 2025) https://www.coindesk.com/research/market-spotlight-the-19-billion-liquidation-that-shook-crypto
  20. Regulation: Regulation (EU) 2023/1114 (MiCA) https://eur-lex.europa.eu/eli/reg/2023/1114/oj · ESMA, "Statement on the end of transitional periods under MiCA" (2026) https://www.esma.europa.eu/sites/default/files/2026-04/ESMA75-113276571-1679_Statement_on_the_end_of_transitional_periods_under_MiCA.pdf · CRS Insight IN12553, "Stablecoin Legislation: An Overview of the GENIUS Act of 2025 (P.L. 119-27)" https://www.congress.gov/crs-product/IN12553 · A&O Shearman, "The GENIUS Act: transforming US stablecoin regulation" (21 Jul 2025; effective date) https://www.aoshearman.com/en/insights/ao-shearman-on-fintech-and-digital-assets/the-genius-act-transforming-us-stablecoin-regulation · CoinDesk, "Crypto Clarity Act flames out in failed U.S. Senate vote" (15 Sep 2026) https://www.coindesk.com/policy/2026/09/15/crypto-clarity-act-flames-out-in-failed-u-s-senate-vote · SEC, Chair Gensler's statement on spot bitcoin ETPs (10 Jan 2024) https://www.sec.gov/newsroom/speeches-statements/gensler-statement-spot-bitcoin-011023 · NYDFS, virtual currency businesses (BitLicense) https://www.dfs.ny.gov/virtual_currency_businesses · FCA, "A new regime for cryptoasset regulation" (updated 22 Sep 2026) https://www.fca.org.uk/firms/new-regime-cryptoasset-regulation