1/ Since a lot of people are waking up to see their perps positions closed and wondering what the hell “Auto-Deleveraging” means, here’s a quick and dirty primer.
What is ADL? How does it work? And why does it exist?
2/ First of all it’s helpful to zoom out and think about what a perp market is and what it does at a very abstract level.
When you have a perps market like BTC, a fun fact is there’s no actual BTC in that system at all. There’s just a big pile of cash sitting doing nothing.
3/ All a perps market (or any derivatives market for that matter) does is shuffle a big pile of cash around among its participants. It uses a set of rules engineered to create a synthetic BTC like instrument within a system that actually has no BTC
4/ The most important rule: There are longs and there are shorts, and longs have to exactly balance shorts. Or else it doesn’t work. And both put cash (in the form of margin) into the pile.
The pile then gets shuffled around depending on if the price of BTC goes up or down
5/ Along the way, the price of BTC moves too far and some participants lose all their cash. At that point, they’re kicked out (“liquidated”)
Remember longs can only win if shorts have money to lose (and vice versa). So no more money means you can’t play at the table anymore.
6/ And every short has to be exactly balanced by a solvent long. If a long in the system has no more money left to lose, then by definition that means a short on the other side has no more money left to gain. (And vice versa)
7/ So if a long is liquidated, exactly one of two things must happen. Either A) a new long position must enter the system, with fresh cash to refill the pile.
Or B) a short on the other side must close out to bring the system back into balance.
8/ In the happy path this all happens through normal market forces. Nobody has to be forced to do anything, as long as we find willing buyers at fair market prices.
In a normal liquidation this starts by using the same order book ordinary perps market trading happens on.
9/ In a healthy, liquid perps market this should be fine. A liquidated long gets sold into the book. The best bid in the order book fills it, and now that bid replaces the original as a new long in the system with fresh cash to top off the pile. Everybody’s happy.
10/ But sometimes there just isn’t enough liquidity in the book. Or at the very least enough liquidity to fill the trade without the original position losing more money than it has left.
That would be a problem, since it means not enough cash to go around for everyone else.
11/ Typically the next step in the waterfall is a “vault” or “insurance fund” that steps in. The vault is a special pool of capital supported by the exchange. It’s willing to step in and absorb the other side of liquidations during extraordinary liquidity events.
12/ And typically the vault tends to be quite profitable over time because it has the chance to buy at deep discounts and sell at high spikes. For example the Hyperliquid vault made about $40 million in an hour tonight.
13/ But the vault is not magic. It’s just one more participant in the broader system. Like anyone else it has to put cash in the pile, follow the same rules, and only has a finite amount or risk and capital it can contribute.
There has to be a final step in the waterfall.
14/ And that’s when we reach auto deleveraging. It’s the last resort and a (hopefully) rare occurrence because it involves forcing people out of their position instead of paying them.
It happens infrequently enough that even seasoned perps traders are often barely aware of it
15/ One way to think of it is like an overbooked airline flight. First use market forces to solve the overcrowding. The airline offers higher and higher bids for any passenger willing to take the night flight. But eventually if no one bites, someone has to be kicked off the plane
16/ If the longs are out of money, and no one is willing to come in and take their place, then the system has no choice but to send at least some shorts home and close their positions.
The process used to select who and at what price to close out varies a lot between exchanges
17/ Typically what happens is the ADL system will select positions on the winning side to close out using a ranking system based off 1) most profit; 2) leverage; and 3) size.
Ie the biggest, most profitable whales get sent home first.
18/ People naturally get upset at ADL because it feels unfair. You’re forced out of a position right when you’re winning the hardest. But it does need to exist at some level. No exchange no matter how great can guarantee you an infinite stream of losers on the other side.
19/ Think of it like being on a hot steak in poker. You show up to a casino and crush everyone at the table. And then you go to the next table and crush everyone there. And then the next table. Eventually everyone else at the casino runs out of chips. That’s ADL
20/ The beautiful thing about perps markets is they’re all zero sum, so the system can never be insolvent in the aggregate
There’s not even real BTC to lose value. Just a big boring pile of cash. Like thermodynamics, in the system as a whole, value is never created or destroyed
21/ ADL is kind of like reaching the end of the Truman Show. Perps markets build this very beautiful simulation of the underlying spot
But at the of the day it’s all imaginary. Most of the time we don’t have to think about it… but sometimes we hit the edge of the simulation
• • •
Missing some Tweet in this thread? You can try to
force a refresh
2/ Caveat. I'm going off public docs, there's always the possibility that there's functionality for these extreme scenarios that aren't in the docs, or like the JellyJelly scenario, the validators hard fork to add new functionality to handle an extreme scenario.
3/ Since BTC is a 40X market, liquidation will occur when the remaining margin is 1.25% of the position margin. At $1.1bn, this would represent about $14mn of equity on the position.
1/ This is good analysis and the most plausible bull case for DA. But I think the part that will definitely not come true is DA ever getting close to 50% of L2 fees.
There are structural economic reasons why sequencing will always accrue way more value than DA...
2/ Blockchains are basically in the business of selling blockspace. And because blockspace is not easily fungible between chains, they are close to monopolies.
But not all monopolies earn excess profits. The key is the ability to price discriminate between your consumers.
3/ Without price discrimination, monopoly profits are barely above commodities
Think how airlines segment price insensitive business flyers from bargain seeking consumers. Or how the same SUV car model is sold under VW, Audi, and Lamborghini labels at very different prices.
1/ Finished a preliminary deep dive into the Kyber exploit, and think I now have a pretty good understanding of what happened.
This is easily the most complex and carefully engineered smart contract exploit I've ever seen...
2/ First thing to note is this exploit is specific to Kyber's implementation of concentrated liquidity
There's no reason to believe that other reputable concentrated liquidity dexes, like Ambient or Uniswap, are at risk from this exploit. (Though Kyber forks obviously are)
3/ We'll look at the first pool the attacker drained on Ethereum, ETH/wstETH. Though all of the other pools followed a similar strategy.
The attack on this pool can be found in this transaction:
This meta-study claims to overturn the long established pattern that moderate drinkers have lower mortality than abstainers. After adjusting for confounders there was "no significant reduction in mortality". Very misleading...
2/ At the bottom of the chart, you see moderate drinkers have a 0.86 RR (i.e. 13% lower mortality). The 95% confidence interval is 0.83-0.88. This is extremely significant
This study then throws in a kitchen sink of confounder variables. Everything from BMI to publication year
3/ If you look at the top of the chart, after all those adjustments are made, moderate drinkers do look not quite as healthy as before. The RR moves about closer to one at 0.93 (i.e. 7% lower mortality)
However even after all that, moderate drinkers *still* look healthier
1/ A thing I keep hearing more and more is that RFQs are always better for swappers. This is wrong
We can all agree that the RFQ provider has a free option. The value of that option comes at the expense of someone. Most people think it comes entirely from the passive LPs. Not so
2/ The simple mechanics behind pre-chain RFQs is that the RFQ provider is given "first look" at the swap intention. The RFQ provider is given the option to fill at a better price than the indicative on-chain AMM price. If the RFQ provider passes the swap is routed to the AMM.
3/ Surely this must be better from the swapper's perspective. The swapper can only get price improvement, and the worse case is just the base case (swap against the AMM), without the RFQ. Right?
Wrong. The key distinction is between indicative AMM price and true arrival price
Recently it’s become fashionable in crypto circles to be critical of that app-layer governance tokens. Builders are encouraged to build public good and carefully think twice whether adding a token is really necessary
This is psyops…
2/ At best the notion is misguided. At worse, it’s proffered by L1 bag holders, cynically trying to retain all value accrual at the chain layer, leaving the app layer out in the cold
Regardless it’s near impossible to build sustainably decentralized apps without a token
3/ Anything beyond the simplest protocol is going to require some level of governance that can’t be reduced to an autonomous algorithm.
For example lending protocols have to constantly and intelligently update collateralization parameters as market conditions shift.