1/ A traditional AMM (like PancakeSwap where SQUID traded) works by always keeping the two sides of the pair in exact balance (in this case SQUID and BNB).

Let's say the price of SQUID in the pool starts at 5.0 BNB. That means the AMM has 5.0 BNB tokens for every SQUID tokens.
2/ User goes to "sell" SQUID. They send their tokens to the pool. The AMM now says "I have too much SQUID and not enough BNB". It corrects by a mixture of 1) moving the exchange rate down and 2) sending out its excess BNB back to the seller. Until it's back in line.
3/ The more SQUID a user sells relative to the size of the pool, the more the AMM has to adjust the price to restore balance... And the more BNB reserves the user takes out of the pool.
4/ At small sizes this behaves linearly. A user who sells 1% of the SQUID of the pool will push the price down by about 2% from 5.0 to 4.9. Their fill happens almost exactly halfway between the starting and ending at 4.95.
5/ Because this is all a fraction, the effect goes from linear to parabolic as a user who executes increasingly large size relative to the pool the. A user who sells 900% of the SQUID in the pool will push the price down 99%, sucking out 90% of the BNB reserves for themselves.
6/ Typically a "rug" is when someone's coming in and trying to sell over 100% of the liquidity reserves in one swoop. Usually some whale who's trying to convert as much funny money into hard currency as quickly possible.
7/ The AMM makes the fill price terrible on the way down. But the rugger is thinking more in terms of just grabbing the precious hard currency sitting vulnerable in the AMM.
8/ This is why so many projects incentivize users adding token liquidity to the AMMs. The larger the liquidity pool the harder it is for anyone one party to rug in size. The paradox is the larger the pool, the more "hard currency" is sitting vulnerable for would-be rug pullers.
9/ It's also a limitation of the "capital inefficiency" in classic AMMs. In some sense an AMM is like a limit order book, but you can't quote at specific price levels. You have to provide liquidity at every single level from zero to infinity or not at all.
10/ To provide liquidity for SQUID to trade around 4.5-5.5 BNB you also have to provide liquidity as SQUID falls from 4.5 to 0.00001. Liquidity providers who support normal trading are unfortunately implicitly subsidizing would-be rug pullers.
11/ Limit order books solve this dilemma by letting market makers quote large size tightly around current trading ranges. But thin out quotes at far away prices. That supports healthy trading, but forces whales to patiently work their large orders instead of spamming Tsunamis.
12/ That's why I'm really excited for the wave of innovation in next generation AMMs-- particularly around "concentrated liquidity". That kind of functionality gives liquidity providers individual control over where and when they provide liquidity.
13/ Over time as LPs get more skilled with concentrated AMMs, the economics will increasingly dissuade rug-pulls. (While at the same time improving liquidity and price discovery in normal trading.)
14/ That doesn't magically turn bad assets into good ones. SQUID was probably doomed from the start. But it will mean that instead of instant flash to zero, we'll see more normal "crashes" where price discovery takes place over hours-- not all within a single transaction.

• • •

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

Keep Current with Doug Colkitt

Doug Colkitt 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 @0xdoug

3 Nov
1/ Zillow made the same mistake that every new quant trader makes early on: Mistaking an adversarial environment for a random one.
2/ I know exactly how the conversation at Zillow went, because I've seen it play at dozens of desks across banks, funds, and prop firms everywhere:

"Our model is capturing X% of the variance. With large enough N, the remaining noise will wash out. We now have real edge. 🥂"
3/ The next chapter in this tragedy is going live. The lofty hype just keeps disappointing...

As if cursed, every single bad assumption or source of noise or component not explicitly covered by the model, just happens to realize in the exact way that screws you the most.
Read 13 tweets
21 Oct
Extremely speculative hypothesis:

1. BITO hits BTC futures position limits and the CME doesn’t make an exception. (Big *if*)
2. BITO must rotate to longer dated contracts to outrun the limits. That increases their portfolio’s duration and blows out contango across the curve.
3. Higher cash-and-carry on the CME futs sucks out capital from the basis trade on perps at FTX and Binance. That blows out the basis in altcoin perps.
4. Attracted by higher carry, crypto native basis traders sponge up all available DeFi capital to finance leverage
5. That blows out the yields in DeFi. First from direct demand for lending. But second from higher liquidity fees from a frenzy of activity.
6. Already high DeFi yields blow out, attracting significantly more capital to the space. TVLs pump hard across the board.
Read 4 tweets
1 Oct
1/ Great, thread. But I strongly disagree with this sub-point. The vast majority of HFT MM alpha realizes in under 1 second post-fill. Even to the extent that retail flow is toxic cuz “apes strong together”, it’s impossible for WSB to sync activity at millisecond timeframes.
2/ You don’t have to take my word for it. Just look at the relative distribution of which firms excel in which areas. If PFOF was linked to an informational advantage, we’d expect the firms with the most captive retail flow to have the strongest alphas.
3/ And we’d expect the firms with the strongest alphas to have the highest rate of liquidity taking aggressor trading on the lit exchanges. Larger magnitude alphas mean you’re more likely to have signal which exceed [spread]+[fees]
Read 18 tweets
25 Sep
1/ Agree. Without the benefit of hindsight, it’s hard to distinguish network externalities from pure Ponzis. In their growth phase they sure look similar: “this thing has little intrinsic value now, but we‘ll get rich by getting new people in, who in turn will get more new users”
2/ Facebook’s a trillion dollar company primarily because everyone uses Facebook. Its early users contributed enormous value to the company. If not for outdated securities laws, it would been fair and made sense for early Facebook users to receive equity in the network.
3/ The more users and activity they brought into the network, the more equity they should have received. That would have felt very Ponzi-ish from the outside.
Read 8 tweets
14 Sep
1/ Over the past year DeFi has been heavily colonized by HFT emigres. A lot of us come in with an arrogant attitude that we’re much smarter than the DeFi native folks. We naturally assume that however we did things in CeFi must be better. (🙋‍♂️I’ve certainly been guilty of this)
2/ Unfortunately I think Serum has been a victim of this attitude. AMMs have served DeFi very well. But the HFT folks behind Solana and Serum naturally assumed that limit order books must be superior because that’s how CeFi does it.
3/ CLOBs have a lot of major advantages in terms of price discovery and capital efficiency. But they’re much less resilient than AMMs. Today’s outage shows a major downside with CLOBs.
Read 8 tweets
31 Aug
1/ A lot of quant traders (including myself at many times) have a knee jerk instinct to believe that if a strategy is technically challenging it must mean there’s more alpha underneath.
2/ Anyone with experience will tell you this just isn’t true. Even knowing this, it’s still hard to think outside the implicit bias of hard equals lucrative.
3/ I’ve seen insanely complex strategies requiring teams of PhDs, where the alpha was competed down to next to nothing. These teams persisted picking up scraps well past the point it made any economic sense.
Read 12 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

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

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(