Paradigm

The Cartoon Guide to Perps

Mar 08, 2021 | Dave White

Contents

Illustrations by: Chelsea Myers

About a month ago, I realized I didn’t understand perps.

For the cost of $1, a 100x bitcoin perp (short for “perpetual swap”) behaves like $100 of bitcoin. This is a pretty neat trick, especially considering you can’t redeem the perp for bitcoin or anything else.

My vague idea of how they achieved this (“funding rate,” right?) seemed lacking for an instrument that traded tens or sometimes hundreds of billions of dollars per day.

I spent some time puzzling it over with some brilliant people, including the creators of some of the world’s most popular perps.

In this post, I’ll share what I learned: four very different (but mathematically identical) mental models for what perps are, how they work, and when they don’t.

Perp anatomy

Let’s start with the basics.

Unlike bitcoin, which can be traded anywhere, your standard perp is native to a particular exchange and can only be traded there. Perp implementations can also vary quite a bit from exchange to exchange. This post models a simplified version of the FTX perp.

A perp’s value at any given time is represented by its mark price. This is the price used to calculate profits and losses and trigger liquidations. It is generally based on the trading price of the perp on its exchange.

The basic idea of the perp is that, ignoring complicating factors like inflationary rewards, it should be worth about the same as its underlier (i.e. bitcoin). The underlier’s value is represented in the system by the index price, which is generally calculated from its trading price on some external exchange.

When the index price and mark price are the same, the perp is worth the same as the underlier, and all is as it should be.

When the index price and the mark price diverge, the system transfers a funding fee between those who are long the perp (have bought it) and those who are short the perp (have sold it). In our example perp, the funding fee paid by the longs to the shorts is $(mark price - index price) per contract per day. When this number is negative, the shorts pay the longs.

Traders must also put down collateral, known as margin. When the mark price moves against the trader, the resulting losses are deducted from this margin. If the margin balance gets too low, the trader will be liquidated, meaning their position is automatically closed out.

Taken together, these pieces explain what a perp is, but not what it does.

Perp as thermostat

A thermostat is an example of a feedback control system, which keeps a value near a set point by applying increasing force as it strays. The hotter your house gets relative to your desired temperature, the higher your thermostat will crank the AC.

Similarly, our perp wants its mark price to equal its index price. It attempts to achieve this by charging the funding rate of $(mark price - index price) per contract per day. The more expensive the perp gets relative to the underlier, the larger this difference will be, and the more the longs will have to pay the shorts.

Compared to the situation where there is no funding fee, longs might be marginally more inclined to close their positions, and traders in general might be marginally more inclined to open new shorts. This increase in selling should push down the price of the perp.

However, markets are notoriously hard to predict. How do we know how much more selling the funding fee will induce, or how much impact that selling will have on the price? And what if there are other factors we haven’t considered that are pushing prices in the opposite direction?

Perp as PNL loan

Let’s follow along with Alice and Bob, two crypto enthusiasts who don’t know about perps because their friends shamefully neglected to send them this post.

We join them with the price of bitcoin at $100k. Alice wants to go long a bitcoin and Bob wants to go short one, but Alice doesn’t have $100k and Bob can’t find a bitcoin to borrow.

They make a deal: they will pretend Alice bought a bitcoin from Bob for $100k (the mark price). As the price of bitcoin (the index price) changes, they will settle profits and losses in cash, moving the mark price. Until settled, losses are treated as debt with an interest rate of 100% per day.

The next morning, the price of Bitcoin jumps to $110k.

Alice has $10k of profit on the pretend trade, which Bob needs to pay her. However, it will take him an hour to get the money. During that hour, Bob pays Alice interest on her unrealized profit. At the rate of 100% per day, this comes out to $10k/24 ~ $400 in interest.

After that hour, Bob also transfers Alice her $10k in profits, so that they are back to even. Now it is as if they had just made their deal with Bitcoin at $110k, the new mark price.

They have, of course, re-invented the perp: Bob must pay Alice $(index price - mark price) per day until he transfers over her profits and resets the mark price to the current index price.

While there is no guarantee that Bob will ever pay Alice her unrealized profits, as long as he remains solvent Alice will be receiving 100% interest per day on her missing capital. This is a good deal whenever her cost of capital is less than 100% per day, which should be almost always.

Perp as loan swap

Let’s rejoin Alice and Bob with the price of bitcoin back at $100k. Alice wants to short the dollar against bitcoin, and Bob wants to short bitcoin against the dollar.

They make another deal: Alice will borrow $100k from Bob, and Bob will borrow one bitcoin from Alice. Since they are each borrowing equivalent amounts, no cash or bitcoin actually needs to change hands.

Each will pay interest on their debt at a rate of 100% per day. With the price of Bitcoin at $100k, these interest payments cancel out perfectly. If their debt amounts ever get out of balance, each agrees to let the other equalize the debt by means of a cash transfer.

The next morning, once again, the price of Bitcoin jumps to $110k.

At the 100% per day interest rate, Alice owes Bob $100k in interest per day on her borrowed $100k, while Bob now owes Alice $110k in interest per day on his borrowed bitcoin. Netted out, Bob must pay Alice $10k in interest per day, or around $400 per hour, until he transfers an additional $10k to her to equalize their debts.

Once again, Alice and Bob have re-invented the perp. The $(index price - mark price) funding rate arises when we net out the interest on Alice’s cash debt (the size of which is equivalent to the mark price) with the interest on Bob’s bitcoin debt (the value of which scales with the index price).

Once again, our perp makes sense as long as both parties remain solvent and the cost of capital is less than 100% per day.

Perp as one-day future

Let’s consider a new pair: Anon and Bot. Nobody knows who Anon is, and Bot isn’t even a person.

These two can’t talk to each other, let alone structure complex deals. Can their interactions tell us anything universally true about perps? I thought not, until the inimitable Sam Bankman-Fried showed me a theoretical scheme to let them gradually transform a perp into its underlier.

Imagine the price of Bitcoin is again at $100k. Anon is long one bitcoin perp (Bot is short) and would like to trade it in for one bitcoin. Unfortunately, the mark price of the perp, which we will in this example define as its trading price, is only $90k. If Anon were to sell her entire perp position, she would get only $90k for it, and would need an additional $10k to buy a whole bitcoin.

However, if she were to sell just 1/24th of her position, she would need only $10k / 24 ~ $400 extra to buy 1/24th of a bitcoin from Bot. This happens to be precisely the amount of funding fee she receives from Bot every hour.

So, Anon waits an hour, collects her funding fee, and trades that and 1/24th of her perp position for 1/24th of a bitcoin. Now she owns 23/24ths of a bitcoin perp and 1/24th of a bitcoin. If she keeps transforming her position in this way, within a few days it will be almost entirely bitcoin.

Amazingly, Anon’s time-weighted exposure to bitcoin through the perp during this process ends up being the same as it would be if she were holding a futures contract expiring in exactly 24 hours. Ignoring interest rate term structure, this means the two should be priced roughly the same.

Now we have a way to interpret the constant factor on the funding rate. If the funding rate were, say, 50% of $(mark price - index price) per contract per day instead of 100%, it would take Anon twice as long to transmute her perp, which would then be equivalent to a two day future.

Pretty crazy, right?

Margin and liquidations

All of our examples so far have relied on funding rates actually being paid when they are due. While Alice and Bob simply trusted each other, Anon and Bot must put down margin to enter into their positions. This is meant to cover any losses that might occur before the positions can be liquidated.

Let’s say Anon wants to go long $100 worth of Bitcoin via a 100x perp. She must deposit at least $1 of margin, but she deposits $1.50 to be safe.

Almost immediately, the mark price of the perp drops by 1%, so that she has lost $1. This $1 is removed from Anon’s margin account, which now contains only $0.50. This is below the minimum threshold set by the exchange, so she is liquidated and will have to pay a penalty. Ultimately, she may get back only $0.25.

Now imagine that the price had dropped 2% before the system was able to liquidate her. In that case, her losses would have totaled $2, and Bot, who was on the other side of the trade, would have made $2. However, Anon only had $1.50 of margin posted, so that Bot’s last $0.50 of profit would have had to come from somewhere else. On most perp exchanges, this place would have been the insurance fund.

Generally speaking, the system is safe to the extent that liquidations happen quickly enough and the insurance fund is sufficiently capitalized.

Perpetual innovation

There you have it: how I see perps as they exist today.

Are you working to change how all of us will see them tomorrow?

I’d love to help. You can email me at dave@paradigm.xyz or DM me on Twitter.

Written by:

Disclaimer: This post is for general information purposes only. It does not constitute investment advice or a recommendation or solicitation to buy or sell any investment and should not be used in the evaluation of the merits of making any investment decision. It should not be relied upon for accounting, legal or tax advice or investment recommendations. This post reflects the current opinions of the authors and is not made on behalf of Paradigm or its affiliates and does not necessarily reflect the opinions of Paradigm, its affiliates or individuals associated with Paradigm. The opinions reflected herein are subject to change without being updated.