Tarun Chitra Profile picture
Dec 9 30 tweets 9 min read Read on X
Did @HyperliquidX autodeleverage (ADL) $650m of PNL that it didn’t have to?

Was this 28x more than the minimal necessary?

Did almost every exchange (incl. @binance) copy-pasta a Huobi heuristic from 2015?

Can we do better in 2026?

𝐘𝐞𝐬 (+ a new paper)
On 10/10, a Truth Social post shocked the market and set off the largest liquidation cascade in history

This forced Hyperliquid and others to 𝗿𝗲𝗽𝗲𝗮𝘁𝗲𝗱𝗹𝘆 trigger ADL

ADL is a worst-case loss socialization: winning trader profits are haircut to cover bad debt Image
But what is ADL and why did it fail so badly? @0xdoug covered the basics, but to quantify why the ADL algorithm common to both Hyperliquid and Binance failed so spectacularly, we first need to describe ADL in geometric, mathematical terms via 𝘸𝘢𝘵𝘦𝘳-𝘧𝘪𝘭𝘭𝘪𝘯𝘨 𝘢𝘭𝘨𝘰𝘳𝘪𝘵𝘩𝘮𝘴
Water-filling algorithms are easy to draw

Below is the set of equity values (= cash + PNL) for each position ranked from smallest to highest

Negative equity = bad debt (e.g. lost more in PNL than collateral)

ADL haircuts winning traders ("removes water") to cover bad debt Image
ADL algorithms have 2 parameters:
1. Severity: Fraction of debt that is socialized
2. Haircut vector: What % of profit is haircut from each winner

Water-filling constraint:
area of the yellow haircuts (water outflow) = area of the purple bad debt covered (water inflow) Image
What water-filling algorithm do @HyperliquidX and @binance use?

Greedy Queue algorithm:
1. Rank traders by PNL % x Leverage
2. Fully close positions until the deficit is covered

This algorithm 𝐨𝐯𝐞𝐫𝐬𝐡𝐨𝐨𝐭𝐬 (e.g. liquidates more PNL than the deficit requires) Image
Why do they use this algorithm?

As @CryptoHayes details in his latest post, Huobi first created this algorithm as a heuristic for dated crypto futures

BitMEX later repurposed it for perpetuals futures and since then most exchanges copy-pasta'd it

cryptohayes.substack.com/p/adapt-or-die
Why is this algorithm bad, especially on decentralized exchanges?

1. If ADL is used repeatedly, overshoot 𝗰𝗼𝗺𝗽𝗼𝘂𝗻𝗱𝘀 (much like a liquidation cascade)
2. Not Sybil resistant — can split positions to avoid being ADL'd

On 10/10 the overshoot was 𝗺𝗮𝘀𝘀𝗶𝘃𝗲 ($650M) Image
You might be asking: but wait, I thought I saw a viral post that claimed "traders made money" on Hyperliquid

This analysis was statistically misleading at best, malicious at worst

It measured 𝘤𝘰𝘯𝘥𝘪𝘵𝘪𝘰𝘯𝘢𝘭 PNL of surviving traders — conditioning on the Queue mechanism
Making a causal claim about profitability requires:
1) Counterfactual comparison (how would the optimal ADL algorithm have done?)
2) Comparison of the qty of bad debt relative to profit closed by ADL (did the exchange ADL more PNL than needed for solvency?)

@yudapearl would give this poor attempt at causal analysis a D-
When you do analyze these, you find that the Queue algorithm spectacularly overshot by 28x — there was only ~$23m of bad debt, yet the ADL mechanism closed $650m of PNL

This is not "trader PNL was increased" in aggregate (not only conditioning on survivors), this was a net loss
Unlike the bombast of this abysmal analysis, @chameleon_jeff had a measured response with a research challenge:

ADL should be improved, but it seems like you can't do it in a 𝘱𝘳𝘪𝘰𝘳-𝘪𝘯𝘥𝘦𝘱𝘦𝘯𝘥𝘦𝘯𝘵 manner (e.g. not relying on historical correlations/vol).. right?
Challenge accepted!

Can we beat the Queue algorithm? Two other approaches are used:
- Pro-Rata [used by @DriftProtocol, @paradex]
- Central Clearing [used by crypto exchanges prior to 2015]

Both of these have pros and cons that differ from Queue

arxiv.org/abs/2512.01112
Pro-Rata takes the deficit and splits it across all winners based how much profit they contribute

It can be viewed as haircutting everyone by a constant percentage and it is what @paradex and @DriftProtocol do with "socialized losses" Image
It satisfies three properties:
- Sybil Resistant
- Scale Invariant — scaling up all positions doesn't change haircuts
- Monotone — if you had the kth highest profit before ADL, you have the kth highest profit after ADL

These are 𝘧𝘢𝘪𝘳𝘯𝘦𝘴𝘴 properties that benefit traders
But it has one fatal flaw: not robust to multiple price shocks

Main reason: Pro-rata isn't risk-aware

2 positions: same size, one has 10x the leverage of the other

Haircut the same by pro-rata

But if there is another shock, the 10x leverage one is more likely to have bad debt
Also, by the way, pro-rata (which @paradex calls socialized loss) *is actually* an ADL algorithm despite what you might read

This becomes clear once you see it via the lens of water-filling algorithms— its just one that makes different trade-offs than Queue
What about central clearing? This is where the exchange holds the bad debt on their balance sheet. It has the positive of not liquidating your best customers — so revenue is preserved.

But it is fundamentally not 𝘴𝘤𝘢𝘭𝘢𝘣𝘭𝘦: as the exchange grows, its ability to successfully preserves solvency decays

@cryptohayes documents that exchanges doing this faced an enormous amount of adverse selection and 𝘮𝘰𝘳𝘢𝘭 𝘩𝘢𝘻𝘢𝘳𝘥 [and blew up]Image
So where does that leave us?

- Queue: Horrible overshoot, lowers revenue (e.g. liquidates high revenue generating customers)
- Pro-Rata: fair to traders, not robust
- Central Clearing: Not scalable, not decentralized, but preserves revenue

Can we get the best of all three? Image
Surprisingly, the answer is 𝒏𝒐.

In my new paper, I prove an 𝗔𝗗𝗟 𝗧𝗿𝗶𝗹𝗲𝗺𝗺𝗮: no ADL mechanism can simultaneously optimize for:
- Solvency
- Fairness
- Long-Term Revenue

This is a fundamental limit on ADL!

arxiv.org/abs/2512.01112
Does this negative result mean its time to pack it all up and follow @vladtenev + @drwconvexity into the land of centralized clearing?

Not so fast: crypto is a place where a trilemma never stopped anyone

The blockchain trilemma is beat with probabilistic strategies — same here?
We show that one can construct an infinite set of easy to compute risk-aware strategies that non-uniformly haircut winners (see below) and both theoretically and practically outperform Queue and Pro-Rata in terms of solvency, fairness, and revenue Image
Moreover, we backtest a number of these strategies against the real data from @HyperliquidX on 10/10 and show that virtually all of these algorithms would have 𝐬𝐚𝐯𝐞𝐝 >$𝟓𝟎𝟎𝐌 𝐨𝐟 𝐭𝐫𝐚𝐝𝐞𝐫 𝐏𝐍𝐋 Image
We also show that these algorithms outperform on fairness and revenue

The trilemma implies that they have to trade-off solvency for this(e.g. the exchange has to hold some bad debt on its balance sheet)

But the magnitude of loss is 10x smaller with optimized ADL algorithms Image
Image
What does this mean for real exchanges?
- Counter to the intuition @chameleon_jeff initially had, there 𝐞𝐱𝐢𝐬𝐭 𝐩𝐫𝐢𝐨𝐫-𝐢𝐧𝐝𝐞𝐩𝐞𝐧𝐝𝐞𝐧𝐭 ADL mechanisms that are easy to implement
- These methods trade-off solvency, revenue, and fairness to traders in different manner
- Exchanges can choose to optimize within this trade-off space — with the limits to optimization bounded by the trilemma
- The trilemma, by the way, is so close to formally verifiable that maybe @jessemhan / @llllvvuu can prove it for more generic set of revenue functions
- Both CEXs and DEXs benefit from this research!
Takeaway: we don't need to be in the dark forest of central clearing, even if @RobinhoodApp just bought LedgerX (best central clearing IMO)

We can use math to design better verifiable mechanisms that
will 𝘢𝘤𝘵𝘶𝘢𝘭𝘭𝘺 𝘣𝘦 𝘢𝘣𝘭𝘦 𝘵𝘰 𝘩𝘰𝘶𝘴𝘦 𝘢𝘭𝘭 𝘰𝘧 𝘧𝘪𝘯𝘢𝘯𝘤𝘦
I want to thank @conejocapital, @hydromancer_xyz, @sonarx_hq, and @xulian_hl for helping me procure, verify, and clean data from October 10.

The dataset used can be found on @conejocapital’s Github.

I want to also thank @jdmaturen, @theo_diamandis, @victatorships, @MaxResnick1, @hosseeb, @alexhevans, @theyisun, @ani_pai, @conejocapital, @dara_khan, @perpsjesus, @udaiparvatha, @MatheusVXF, @vnovakovski, Murat, and @angeris for helpful feedback on the paper or this post.

If you made it this far, you don’t want to know how much longer it was before @hosseeb and @MaxResnick1 yelled at me
@ConejoCapital @SonarX_HQ @xulian_hl @jdmaturen @theo_diamandis @victatorships @MaxResnick1 * @hydromancerxyz
@ConejoCapital @SonarX_HQ @xulian_hl @jdmaturen @theo_diamandis @victatorships @MaxResnick1 @hydromancerxyz I also forgot @RiskRinger !

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Tarun Chitra

Tarun Chitra Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @tarunchitra

Feb 12
⚠️ New week, New Paper

Q: What was the best way to profit market volatility in DeFi over the last year?

A: @JupiterExchange's JLP pool

How does this pool work? Is this yield real? Is it safe?

@theo_diamandis, @RiskRinger, @perpsjesus, @ns_gauntlet, and I explain! Image
@weremeow @sssionggg Paper: arxiv.org/abs/2502.06028
Our journey begins by zooming out and asking, "why are centralized perpetuals exchanges so much more successful than decentralized ones?"

One aspect overlooked by 2020s era perps protocols is that centralized exchanges offer lending facilities to market makers and large traders Image
Read 30 tweets
Oct 30, 2024
TL: Financial nihilism 🌕
Me: Financial optimism ☀️

On-chain DeFi intrinsically embeds collateral reqs — TradFi often misprices collateralized credit risk due to transparency

Pitch to (mid) economists: If crypto works… who fucking needs Basel III vs. a validated state root?
The idea that on-chain finance needs undercollateralized lending has been an analogy searching for a solution

DeFi is most successful when you have assets where *verifiable* guarantees on collateral are paramount to position value

But: undercollateralized == not verifiable
Why is this?

Dumb answer: Being undercollateralized opens the can of worms of the binomial American option model: a protocol has to figure out a stopping time for when you’re “too” undercollateralized and need to exit the market — MEV ruins this!

So is on-chain finance over?
Read 16 tweets
Aug 6, 2024
Are Liquid Restaking Tokens (LRTs) essential to restaking security and even risk mitigation, vs. being a source of systemic risk?

Surprisingly, yes! New paper w/ @malleshpai shows that smart allocation to AVSs is crucial for security against cascading failures Image
@ether_fi @RenzoProtocol @swellnetworkio @puffer_finance @KelpDAO @Eigenpiexyz_io First: What does this have to do with LRTs? They are the largest allocators + should be 'smart money' (due to economies of scale), with outsized impact on restaking security (see, e.g., )

We *quantify* when LRTs have a positive impact on securityethresear.ch/t/the-risks-of…
Our paper builds off of the excellent work of @tim_roughgarden & Naveen that formulates cascade risk in combinatorial terms and argues that overcollateralization is needed for security — but we arrived at this via a circuitous path

First: Storytime 📗

Read 20 tweets
Jul 26, 2024
Repeated arguments over economic security + issuance are a reminder Proof of Stake's threat model is completely and utterly broken — BFT models assume the worst economic attack is a double spend

Doesn't make sense when:

stablecoin supply + non staked TVL in DeFi > ETH staked
2024: We should analyze principal-agent relationships vs. reducing everything to double spends

P-A model?
1. Users (principals)
2. Validators (agents)
3. Attackers (malicious agents)

Compute max profit for each principal-agent interaction (e.g. DS, oracle manipulation, etc.)
Example: Consider a rollup with a canonical bridge; there are many P-A interactions/attacks with different max profits:
1. DA layer down 💰💰💰💰
2. Sequencer censors execution 💰💰💰
3. Sequencer delays execution 💰💰
4. Sequencer sandwiches you / 'cheap' MEV attacks 💰
Read 13 tweets
Mar 6, 2024
Three items are behind a wall and a solver is going to get one of them for you

Do you get a goat or a car, anon?

@malleshpai, @ks_kulk, @theo_diamandis and I show you that if solvers have to do more work to deliver the item to you, they're not going to show up to the auction https://arxiv.org/abs/2403.02525
There’s been a lot of talk about `intents’. What are they?

Simply put: they're markets for transaction execution where third parties called solvers compete to satisfy user orders (and any constraints those orders come with)

Question: What are the principal-agent problems here? Image
tl;dr: We find broad conditions for oligopoly in intent markets

What is oligopoly here?
1. Fewer bidders, k, than the maximum possible, n, participate (i.e. k/n → 0 as n → ∞ or k=o(n))
2. Users get *worse* prices even though the number of (potential) solvers increases! Image
Read 20 tweets
Jan 16, 2023
While @artgobblers isn't exactly my cup of tea, the novel NFT auction mechanism ford is cool from an auction theory perspective— but is it incentive compatible (IC) for both buyers and sellers?

tl;dr: It is *not* IC but can be modified to be IC!

people.eecs.berkeley.edu/~ksk/files/GDA…
Quick recap: A gradual dutch auction (GDA) is a sequence of n auctions whose initial prices a_1 < ... < a_n are increasing but where the price of an auction decays as a_i * p(t) where p is non-increasing (e.g. p(t) = exp(-t) in the original paper)

paradigm.xyz/2022/04/gda
Why would you use such an auction? If you have a series of NFT auctions (e.g. an edition, a daily @nounsdao auction, etc.), you want to incentivize users to pick bundles (e.g. any subset of items to buy) without forcing all of the supply on the market (reducing auction revenue)
Read 27 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(