97 points · by denotational · 4y ago · 122 comments
Setting aside for the moment the basic question of whether UST was structurally unsound, I've thought for a while now that the slowness of on-chain transactions coupled with lack of liquidity are two of the most important differences between cryptos and real FX markets. This paper just shows how chronic this problem is.
> During a seventy-five minute span on Saturday, May 7, a series of critical transactions first pushed UST off the peg.
> At 21:44 GMT, Terraform Labs (TFL) withdrew $150 million in UST liquidity. > At 21:57, a relatively-inactive account ("Wallet A") swapped $85 million UST for USDC in this pool. (This was the largest swap transaction in that particular Curve pool ever.)
> From 22:32 - 22:38, another account ("Wallet B") swapped $75 million UST in the pool across three transactions. By this point, the pool was severely imbalanced.
> At 22:52, Terraform Labs withdrew another $100 million in UST liquidity. This made the pool slightly more balanced, but it was still heavily imbalanced and — more critically — tiny at this point, leaving it vulnerable to even small transactions.
> At 22:59, Wallet B swapped another $25 million UST in the pool.
So over 75 minutes, the curve pool wasn't able to absorb $435M of transactions. To put this in context a major FX cross eg (USD/GBP) will have trillions of dollars of liquidity at the touch (ie for immediate trading), with FX marketmakers responding in milliseconds to price movements. That liquidity has the effect of absorbing the market impact of trades so you would have to trade probably 10000x larger in size in order to make any kind of meaningful dent in the liquidity and even then the market would reach equilibrium again in milliseconds rather than hours/days/never as happened here.
Looks like someone found a financial zero day and exploited it!
Now who would benefit from crypto's crashing? https://www.coindesk.com/policy/2022/02/09/russia-to-license... https://money.usnews.com/investing/news/articles/2022-05-31/...
In fact banks are not allowed to take this much unbounded risk with their deposits to begin with.
web3 people are cynical about the traditional system but they often forgot how much protection existing regulations offer and that the bad things are often due to bad actors slipping through cracks and make a big impact. Such as the Korean hedge fund manager that leveraged himself beyond what regulations allow in spirit by hiding his exposure.
In crypto there are not just cracks, there are gaping holes.
Retail investors try reading it, give up, and quietly agree that the emperor’s new clothes are lovely
For AMMs, same applies to Uniswap. Their whitepapers(V1,V2,V3) are both accessible and formal enough to be useful.
Also this paper from Curve https://curve.fi/files/stableswap-paper.pdf
Projects like Terra and Anchor are messy enough (some might say willfully misleading and opaque) that you want to be able to recognize lingo and patterns (and, ideally, source code) to come out with somewhat useful results. In some cases, you'll need to be monitoring their Discord, Twitter, and/or Telegram groups to follow them properly - though in those cases, I've taken that as enough of a red flag in itself to disqualify the entire project from my attention.
For a great read on this and more, check out Vitalik's post: https://vitalik.ca/general/2022/05/25/stable.html
Terra (Classic): https://docs.wcdc.me/docs/index.html
I'd read up on the Uniswap constant product invariant (xy=k) and consider reading the Uniswap v2 code (it's a pleasure to read) [0].
Then check out the StableSwap paper by Curve founder Michael Egorov [1]
Finally if you want a well-documented implementation to read in Solidity, check out Saddle [2]. Disclaimer, I helped write the first iteration.
[0] https://github.com/Uniswap/v2-core [1] https://curve.fi/files/stableswap-paper.pdf [2] https://github.com/saddle-finance/saddle-contract/blob/maste...
HN is better than this.
Remember that "conservative" in finance means not taking risks, rather than the current political meaning of "right wing authoritarian".
Source: was supposed to get in a call with a few people with @solana.com email addresses, got a calendar invite with same names @jumptrading.com addresses.
Source for this? I can't seem to find this claim anywhere.
Crypto markets fall apart as quickly as they go up. Most who entered the market in late 2021 are down and will be down for years (forever if they're holding some dead altcoin).
Absent a central authority that determines legitimacy, it's not clear why we should simultaneously accept the cryptocurrency community's churlish attitude towards financial stability and the crocodile tears around being the victims of said volatility.
It has been known for years that algorithmic stablecoins cannot survive a bank run so maybe Wallet A knew that their withdrawals had a probability of triggering collapse, but I still wouldn't blame them.
The run is indeed a self-fulfilling and a positive feedback loop, since a small disturbance in price could trigger some of the conservatives to withdraw at a tiny loss, and this could snowball.
But it is also possible that someone intentionally did it, like soros did for the english pound back when it got depegged. But i imagine you'd have to be able to borrow large amounts of luna and/or UST, sell it short, then trigger this run, in order to make profit. Is there any evidence that someone did such a large borrow?
Literally everyone who sold first, that is, the $hundreds of $millions of dollars that were sold on Saturday, May 7th, as described in this article.
That's the thing about bank-runs. The *first* person to sell benefits. As the whole community slowly realizes what is going on, they all rush to sell at the same time. This causes the death spiral.
The depeg of UST is more akin to a short of Herbalife than the Soros GBP attack. Remember the weakness of Terra was orders of magnitude easier to expose than that of a national currency.
There was a lawsuit a few years ago, but Jump was able to convince the courts that they could not reveal their source code because it would damage their business. Citadel was never able to prove that their code was stolen.
Ken Griffin could certainly be strongly motivated to employ such an attack. And if he did... you have to admit it was pretty brilliant. This is something straight out of "Billions".
Hoping to add more accuracy to the information available
>If UST’s market value was well above peg, say $1.10, an arbitrageur could purchase $1.00 worth of LUNA and swap into UST via the on-chain mechanism — providing the $1.00 of LUNA in exchange for one newly minted UST, worth $1.10. ...
>In the inverse scenario where UST’s market value was below peg, say $0.90, an arbitrageur could purchase the discounted UST and swap into LUNA via the on-chain mechanism.
Am I reading that right? That sounds like the LUNA protocol is effectively writing two options: to convert 1 UST to $1 worth of LUNA at current market price, and vice versa. But writing an option inherently means exposure to a risk of significant loss from high volatility?
I don't know where I'm going with this but it seems like writing those two options in any other context would be insane.
It's everywhere, everyone can get some, work in a crypto place, accept crypto in their store, convert their entire salary.
What is so wrong about it that we call this 14 year old dinosaur tech "early". We've seen it, we don't want it, time to try someth else.
"Abstract. A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required[...]"
so much for the whitepaper I suppose
And you'd (rightly) get called a sucker for storing your coins at an exchange, negating really all of the benefits of using Bitcoin.
Unless the exchange suspends trading or goes down for unscheduled maintenance right when you want to sell.
Of course, that is assuming the exchange doesn't simply take your coins and run.