Pyth and LIBOR
Data aggregators on- and off-chain
Last week, on-chain market data aggregator Pyth made headlines by briefly reporting a price for Bitcoin of $5,402, while the market price was closer to $40,000. Pyth's team investigated the snafu and judged its root cause to be an interaction between 1) data provider error and 2) a design error on Pyth's part in the aggregation algorithm.
Launched only in August, Pyth aims to solve a key problem for the expansion of programmable unattended contracts—the availability of real-time data inputs from outside of the blockchain. A service that brings in data and provides it on-chain is called, in the language of DeFi, an oracle, which explains Pyth's choice of namesake. One could see this as hubris, but let's instead take it as an expression of interest in big ideas. In that spirit, we must agree to look a bit deeper before claiming to have found "root" causes.
Pyth's project is to aggregate off-chain data sources and make the information available as a feed on the Solana blockchain. Once a piece of data is on-chain, it can be an input for unattended algorithmic contracts. (Such contracts are frequently called "smart," but I am not yet convinced that that evaluation is sound. For now I prefer the more descriptive "unattended," meaning contracts that execute whether or not the counterparties are aware of all the terms.)
In one respect at least, Pyth's glitch has echos of the scandal that marked the beginning of the end of LIBOR as a reference point for interest-rate derivatives. The London interbank offered rate, recall, is calculated by asking banks to each day report the interest rate they are paying, or expect to pay, for interbank lending. In a scandal that unfolded largely from 2008 through 2012, it emerged that some traders were systematically misreporting their LIBOR quotes to the British Bankers' Association, so as to generate certain benefits, on which more below.
The scandal, we might observe, comes from bankers' failure to know themselves. Interbank lending is a business tightly focused on eking profit out of the smallest of interest margins, in which monetary gain is everywhere the measure and evidence of success. To be surprised when some traders put their thumbs on the scale is surely a failure to look carefully in the mirror.
The lesson for Pyth's developers, beyond "garbage in garbage out," might be this: any tech firm runs the risk of rushing a product's release. The problem is not that providers sent garbage data: it is that the aggregator failed to anticipate the garbage. The actual errors had to do storing the price of Bitcoin using the wrong numeric data type, the sort of bug that every Pyth developer has faced.
Surety, then ruin
The "oracle problem," the need for on-chain sources of data that can serve as an input to other on-chain programs, comes out of the rapid growth of decentralized finance. Interest in building decentralized financial products and services using unattended contracts means that Pyth's outputs could quickly be cemented as inputs into a large number of contracts with potentially intricate interactions.
In this light, the oracle problem, and Pyth's solution to it, is infrastructural. The whole point is for Pyth's output to become a ubiquitous input for other ventures. But then the integrity of the service becomes that much more important. Offering a data service for public benefit is one thing. Offering a data service with the intention that every byte of its output could be an input to a monetary contract payout is another.
The ancient (and philosophically difficult) maxim "surety, then ruin" might, in this context, be read as a variation on what monetary economists know as Goodhart's Law:
Pyth's ambition is to become, like LIBOR, a signal for derivative contracts. The cash flows associated with those derivatives will put pressure on the signal. Pyth's commitment to the integrity of the data is what makes its service valuable. That very commitment, however, can become a source of fragility, whether by creating opportunities for manipulation or just by angering customers when something goes wrong.
Nothing in excess
In the LIBOR manipulation scandal, traders were unable to lean too heavily on the scales. But they didn't really need to, because the interest rate was an input to hundreds of trillions of dollars' worth of interest-rate derivatives. Shifting the LIBOR fix by the tiniest of margins could redirect sizeable payment flows, plenty enough to steer a trader to provide false input to the process. There is no suspicion that Pyth's troubles came from anything beyond negligence. But size, scale and speed can magnify the impact of any miscalculations. The simplest policy might simply be one of restraint.
With Pyth, as with so much of blockchain finance, I think that deep problems have been mistaken for superficial problems: data for unattended contracts is not just a problem of high-speed, high-fidelity measurement, aggregation and access. It is also a fundamental problem about the place of information and knowledge in society, one that cannot be resolved easily or perhaps at all. In light of this limit to our knowledge, perhaps we can not do better than the ancients: