The Terra (LUNC -0.45%) blockchain is powered by two cryptocurrencies: Terra and Luna. Terra is a stablecoin tied to the value of fiat currencies. For example, TerraUSD (USTC -1.61%) is pegged to the U.S. dollar. And Luna is used to absorb stablecoin price volatility.

Earlier this week, TerraUSD lost its peg and the stablecoin saw its price plunge to $0.30. It has since regained some of its value, though its price is still well-below the $1 target. Not surprisingly, spooked investors have sold Luna hand over fist in an effort to distance themselves from the catastrophic meltdown. In fact, Luna has lost 99% of its value in the last few days.

Is this a buying opportunity? Or is the Terra blockchain in trouble?

How does the Terra blockchain work?

Arbitrage is the simultaneous buying and selling of an asset to capitalize on small price discrepancies in different markets. The Terra stablecoin maintains its price through a built-in arbitrage mechanism. Here's how it works.

Let's say demand for TerraUSD drives its price up to $1.02. To restore its peg, the blockchain allows traders to burn $1 worth of Luna to mint one TerraUSD coin. The trader can then sell that TerraUSD coin to earn a profit of $0.02. At the same time, the arbitrage mechanism increases the supply of TerraUSD, which eventually brings its price back to $1.

The system works the same in reverse. If a sell-off pushes the price of TerraUSD down to $0.98, traders can burn one TerraUSD coin to mint $1 worth of Luna. Once again, the trader makes a $0.02 profit and the arbitrage mechanism restores the peg, increasing the price of TerraUSD by reducing its supply.

An Investor watches a downward trending price chart.

Image source: Getty Images.

The bull case for Luna is (or was) straightforward: Prior to this crash, Terra was the second largest decentralized finance (DeFi) ecosystem, and the thriving array of DeFi applications on the blockchain created demand for TerraUSD. For instance, the Anchor protocol was particularly popular with investors, as it paid 20% APY on TerraUSD deposits. That's orders of magnitude better than you'd get from a traditional savings account.

Thanks to the built-in arbitrage mechanism, the demand for TerraUSD created by Anchor and other DeFi products on the platform ultimately leads to the burning of Luna, and that makes the cryptocurrency more valuable (i.e. because it is more scarce). Put another way, the more Terra is used, the more Luna is worth. And given Terra's runner-up position in the DeFi industry, investors had good reason to believe demand for TerraUSD would continue to rise.

The downfall of an algorithmic stablecoin

Terra is known as an algorithmic stablecoin. Its price is kept stable by the computer code behind the arbitrage mechanism. That differs from a fiat-backed stablecoin like USD Coin, which is supported by cash and cash equivalents. In other words, for every USD Coin in circulation, there is one dollar (or its equivalent) held in a reserve account. As a result, USD Coin has never fallen below $0.97 for any significant period of time.

That highlights the risk with algorithmic stablecoins. When the supply spiked and TerraUSD lost its peg earlier this week, the arbitrage mechanism failed to resolve the problem. At that point, Terraform Labs' Bitcoin reserve was supposed to correct the problem, but that has yet to happen. Instead, the price of the stablecoin has continued to plunge, and panicked investors have been selling, adding to the downward pressure. Moreover, because the arbitrage mechanism would need to significantly increase the Luna supply (and decrease its value) to restore the stablecoin's peg, investors have also been selling Luna.

The result has been a catastrophic meltdown. At the time of writing, TerraUSD trades at $0.38, well-below its target price, and Luna has fallen over 99% from its high. Given the selling pressure on both sides of the Terra ecosystem, things look bleak. It is possible that TerraUSD never regains its peg. If investor confidence has been irreparably damaged, money will continue to flow out of the ecosystem and it will eventually collapse.

For what's worth, I have previously been bullish on Luna. But this situation has changed my outlook. I would encourage investors to stay away from Luna (and TerraUSD), at least for the foreseeable future.