Streetwise Professor

May 14, 2022

So What Lunatic Thought That Algorithmizing A Doom Loop Was A Good Idea?

Filed under: Cryptocurrency,Economics — cpirrong @ 6:45 pm

Despite all the hype over DeFi, there is nothing really new under the financial sun. Yes, the platform or technologies may differ, but most (if not all) of what is being hyped as revolutionary today is closely analogous to something that has been around for a long time.

Case in point: stablecoins. As I pointed out in a post several years ago (and as many others have pointed out as well), they are functionally equivalent to notes issued by banks prior to the National Banking Act of 1863. And they have the same fundamental problem: they are liabilities backed by opaque balance sheets that make them subject to runs. Uncertainty about the value of assets backing the notes can induce a run.

How to address this? Well, an algo right? Because don’t algorithms fix everything?

That is the idea behind stablecoin TerraUSD and its companion cryptocurrency TerraLuna. The algo was that the holder of the TerraUSD has the right to exchange $1 of TerraUSD for $1 of TerraLuna. Since the value of TerraLuna fluctuates, the number of TerraLuna exchanged for $1 of TerraUSD must fluctuate as well to maintain the peg. So in essence, TerraUSD is backed by Terra Luna. And TerraLuna is backed by: GEE! LOOK AT THAT SQUIRREL!

But here’s the thing. Regardless of what it is backed by, or not, or what people think that it is backed by, it almost certainly has a downward sloping demand curve: More Luna, lower price. And that’s where the problem lies.

The Magic Algo broke down when many people tried to exchange TerraUSD for Luna, and the supply of Luna exploded . . . and hence the value of Luna crashed. (The story behind what caused the surge of redemptions is convoluted, and really is beside the point for explaining the flaw in the algo: spikes in demand to liquidate can occur for many reasons–sunspots, anyone?–and any one of them can cause the problem.)

The crashing Luna increased the incentive to liquidate TerraUSD which accelerated the downward spiral.

If this problem sounds familiar, it should, and is another illustration of nothing new under the financial sun. Anybody know what I’m thinking about?

That’s right. Enron. Enron set up various special purpose entities in which it placed dodgy assets. Enron protected investors in the SPEs by promising to sell Enron stock to cover losses. When the losses crystalized, Enron had to sell more and more stock, driving down its stock price, a process that eventually resulted in Enron’s messy demise.

The analogy isn’t exact, but it surely rhymes. A scheme intended to prop up the value of one thing by promising to sell more of another thing is inherently unstable because performing on the guarantee undermines the value of what you are guaranteeing it with (because you have to issue more of it), which makes the guarantee worth less, which creates incentives to run to cash in on the guarantee while you can, which triggers a lot of issuance of what you are guaranteeing it with, driving down its value.

It’s an inherently unstable structure. It’s arguably less stable than a traditional stablecoin aka digital bank note because it essentially mandates fire sales in increasing quantities in response to liquidation shocks. With a downward sloping demand curve (e.g., for Luna) the fire sales cause price declines that can–and in this case did–cause the entire structure to implode.

So why did anybody think algorithmizing a doom loop was a good idea? Lunatics, apparently. Quite literally.

I guess I understand the allure of algos, especially to the tech/computer savvy. They seem transparent. Superficially they take out guesswork and human error and human judgment and weird human behavior. But it is exactly their mechanical nature that some find appealing that can lead to disaster, because they often encode positive feedback loops that are triggered by humans behaving like humans when they interact with the algorithm. And in financial markets, positive feedback almost always has negative effects.

And that is what the TerraUSD-Terra Luna algo did.

Algos can be exactly like the broomsticks in the Sorcerer’s Apprentice. They do exactly what they are told. And as in the Sorcerer’s Apprentice, that can be a big problem.

Print Friendly, PDF & Email


  1. “But it is exactly their mechanical nature that some find appealing that can lead to disaster, because they often encode positive feedback loops that are triggered by humans behaving like humans”

    Portfolio insurance, Leland O’Brien Rubinstein. “Sunshine trading” (tell the market your orders before you actually try to execute them. Since the market knows that you’re not executing because of a forecast, but just because of a rule, they will assume you have no information, and of course they won’t front run you. that was the theory, anyway.)

    Down 22% in a single day hilarity ensues.

    Comment by Tony C. — May 14, 2022 @ 9:21 pm

  2. heard one trading house lost 1.5B in the downdraft. hasn’t come out in the wash yet and I guess if it goes back up they haven’t “lost”. Don’t see how it recovers.

    At a Bitcoin conference, I was almost booed off the stage when I said I didn’t see a huge use for stablecoins pegged to a dollar. Why not just use the dollar?

    Until crypto builds something of value that someone can use every day, it’s pure speculation and the people that say it is a fraud will feel like they are right. I do see a lot of uses for crypto, but not necessarily as a medium of exchange. is pretty cool and could take on the telco monopoly. Because demand curves do slope down and because it can be expensive for traditional businesses to filter into all markets so their mr=mc, crypto can enable it driving more efficiencies there. It also can be a effective alternative in countries like Zimbabwe.

    But, it’s not there yet.

    Comment by Jeffrey Carter — May 15, 2022 @ 8:35 am

  3. There is an investment asset available in Britain that’s free of (British) income tax, Capital Gains Tax, Value Added Tax, and stamp duty: gold sovereigns.

    Will I ever grasp the nettle and buy some? It’s more likely than my buying crypto. But how would I protect them from government confiscation à la FDR?

    Comment by dearieme — May 15, 2022 @ 10:30 am

  4. Crypto bros said the state can’t take your crypto. Why would they if they are worthless?

    Oh and I bought some sovereigns. Plus they are interesting gifts as years of issue = birth years of children. They are hidden.

    Comment by Andrew Again — May 15, 2022 @ 2:04 pm

  5. “Plus they are interesting gifts as years of issue = birth years of children.” I did that with bottles of port. If the port doesn’t prove a good investment they can always drink it.

    Comment by dearieme — May 15, 2022 @ 5:23 pm

  6. Fun + games. I see lots of the kids have lost money. Oh well, there’s a lesson in there somewhere.

    I’ve flirted with the idea of buying actual gold – easy to stash away and gift etc. Seems like a good prospect at the moment, but don’t buy it on my say-so.

    @deari: Funny you should mention that. I’ve been carting a crate of port around with me for nigh on 40 years. I’ve lost touch with the mate who went halves with me on it, and can’t stand the stuff anymore. Also it was a crap investment, despite all the hype at the time it didn’t turn out to be a vintage year (a bit like cryptos then).

    Comment by David Mercer — May 16, 2022 @ 2:57 am

  7. We once turned a tidy profit on a bottle of “Penfolds Grange”, a wonderful Aussie red. We bought it to age a bit and then drink: when we saw in the papers what it was worth we couldn’t bring ourselves to open it. Our propensity to “truck, barter, and exchange” won the day.

    Comment by dearieme — May 16, 2022 @ 6:30 pm

  8. I had this idea during the 20017-2008 unpleasantness, and now think that DeFi and smart contracts might make it work better. I’d love to hear what the SWP thinks of it:

    Consider an investment vehicle to which individuals could open accounts with cash, the money would be collectively invested (perhaps via some DAO governance rules if we want to be au courant), and individuals could withdraw their share in cash as they wished EXCEPT for a “liquidity turnstile”. This would provide a pre-specified negative feedback on mass withdrawals, either by a random queue, a quantity limitation, or a “haircut” reduction. The system would automatically log how many people were trying to pull out cash at the same time and administer the mechanism choking this off (in normal times with uncorrelated withdrawals there would be no choke-off at all). Firms could offer different combinations of balance-sheet cash ratios (which could reduce the designed likelihood of the mechanism being triggered at various withdrawal levels) and return-chasing.

    That sort of mechanism seems like exactly the sort of thing one would want to embed in a smart contract.

    Comment by SRP — May 17, 2022 @ 11:17 am

  9. TerraUSD’s stablecoin model wasn’t new even for the crypto world. The Nubits project worked on basically the same principle, and held its dollar peg from 2014 until erosion of Bitcoin’s price by 90% during the “crypto winter” of 2018 broke the peg. Bitcoin, of course, has recovered and exceeded its 2017 highs, too late for the credibility of the Nubits project, but that doesn’t seem to stop people from buying into a new project that is basically the same thing. (The much smaller-cap UXD stablecoin–same basic design but on the Solana blockchain–broke its peg the next day.)

    By the old saw, “You can’t eliminate risk, only move it around,” stablecoins trade volatility risk for counterparty risk. Of course, if your counterparty is a central bank, then counterparty risk is inflation risk. For an algo-stablecoin, the counterparty is the market for the backing token. I would dispute, though, our SWP’s description of stablecoins having opaque balance sheets. The balance sheet is out in the open for anyone to see; whether anyone bothers to check is, however, a separate question. For now, MakerDAI is the big dog among algorithmic stablecoins, and being backed by ETH at a 155% ratio, is in a bit better shape because (a) the ETH token is a 50x bigger market than DAI so a run on DAI is less likely to crash the price of ETH, and (b) there are some tricks in the algorithm that encourages backers to shore up the token during a long price decline of the sort that took down Nubits. Even so, I doubt DAI can hold its peg if we get another crypto-winter-like 90% drop in the price of ETH.

    So why didn’t the TerraUSD project use Bitcoin as the backing token and have the advantage of its larger market to absorb panic selling? Well, they announced an intention to do so at the MIT Bitcoin Expo the *very day* before the crash, so it seems they were aware of the problem. I think the core problem here is that projects like these get off the ground quickly by selling tokens to investors who are looking for big returns, which means native tokens bought by insiders early on, inadequate staking ratios, and so on. Meanwhile, more conservatively-designed stablecoins don’t get big investment, and the result is an adverse-selection dynamic where the worst stablecoins grow big and then crash. Perhaps, over time, the more conservatively-managed…er…-programmed stablecoins will gradually gain a reputation advantage over their over-hyped brethren. One can hope, at least.

    Comment by M. Rad. — May 17, 2022 @ 9:09 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress