Background to the Terra crisis

The Terra ecosystem was predicated on the dual currency mechanism of the native LUNA token and the native Terra algorithmic stablecoin. The mint-burn mechanics of the stablecoin, most commonly denominated in UST, enabled one to burn 1 UST for 1 dollar’s worth of LUNA at the existing market price. However, starting on May 7, UST lost its peg to the US dollar, which led to a massive bank run and firesale of UST and LUNA. This led the price of both to drop precipitously throughout the week to lows from which they have not recovered. Over the course of the week, the price of Terra dropped more than 99.999%, and about 99.9999% from its all-time high.

During this crisis, as with other periods of great market volatility, the reliability of an on-chain price oracle is paramount—with regard to both availability, or uptime, and accuracy of the price feeds. And during this crisis, oracle failures and lapses with regard to the LUNA price alone caused huge losses across different blockchain ecosystems, including Binance Smart Chain and Avalanche. The Pyth LUNA/USD price feed remained resilient and active throughout this time, continuing to broadcast robust prices and confidence intervals that accounted for the heterogeneity of prices across different exchanges.

Pyth uptime during the crisis

Update latency (slots) Uptime (% of slots)—5/7 through 5/13
5 62.04
10 71.1
25 81.64
50 88.26
100 93.25
150 95.27
250 96.81

The Pyth LUNA/USD price feed remained available throughout the crisis, even as different publishers experienced the challenge of ensuring accurate and timely quotes while the price of LUNA continued to drop. Between May 7 and the end of May 13, prices were updated within 5 Solana slots (i.e., ~2 seconds) about 62% of the time, and within 50 slots (i.e., ~20 seconds) over 88% of the time. Even as the crisis worsened and the LUNA price cratered to fractions of a penny, leading some exchanges to cease LUNA trading and disrupting publishers whose quotes were based on trades on or quotes from those exchanges, the LUNA/USD price feed remained resilient. Below is a plot showing the percentage of updates that happened within a variable threshold of number of slots. As can be seen, the aggregate price was almost always updated on an order of seconds, and protocols building on top of the Pyth price feed did not have to worry about downstream issues that could be caused by oracle failure or price feed disappearance during a volatile period in the market.

Untitled

Pyth conformance during the crisis

The Pyth LUNA/USD not only demonstrated high uptime during the crisis; it also displayed good accuracy.

In the plot below, we examine the Pyth aggregate price and confidence (shaded in blue) and compare it with prices from different exchanges (calculated according to last trade price within the second interval). We focus on prices from five exchanges that hosted a majority of LUNA trading: Binance, FTX, OKX, Kucoin, and Gate.

Untitled

Zooming into a few granular time periods, we can see the benefits of the Pyth confidence interval in action. Looking at the 45-minute stretch from 5/11 below, we see that the Binance price was significantly off from the rest market, possibly owing to the frozen withdrawals across exchanges that stifled easy arbitrage opportunities. Gate prices also jumped away from the rest of the market at times, and generally, the five major exchanges had relatively large deviations from one another. For most of this stretch, the Pyth price remained close to most of the market, and throughout this time period, the confidence interval was well-calibrated to be wide, encompassing most of the exchanges’ prices and indicating that there was great marketwide uncertainty in the price of LUNA.

Untitled