You may have heard of the oracle problem before. To understand it, you first need to know what an oracle is and why a blockchain needs one.
A blockchain knows everything that has happened on it and nothing about anything else. It has no idea what ETH costs in dollars, what the weather is, or who won last night's game. An oracle is how that kind of information gets in. An oracle takes information from off-chain sources and stores it on the blockchain, so Ethereum nodes can use it to compute state changes without breaking consensus.¹ Think of it as a bridge between the chain and the outside world. A stablecoin that accepts ETH as collateral, for example, needs the ETH/USD exchange rate to know how much it can issue.² The smart contract can't look that number up on its own, so something has to tell it.
The contract can't just fetch the price itself because every validator has to produce the same result when it runs the code. If nodes asked an outside source at slightly different moments, they could get different answers, and a network that can't agree on its inputs can't agree on its outputs.³ Posting the data on-chain solves this, because every node replaying the transaction reads the same data.³
The idea isn't new. On July 22, 2014, roughly a year before Ethereum's mainnet launched, Vitalik Buterin wrote about oracles, describing one design where a group of oracles controls an M-of-N multisig and an oracle that votes incorrectly loses its security deposit.⁴ The problem predates mainnet, a history we trace in our Evolution of Ethereum blog.
So what is the problem? The oracle problem is the conflict between security and trust that appears when a trustless blockchain needs real-world data. Blockchains are deterministic, closed systems. They can't look outside their own network without risking consensus, so they need an oracle, and now the oracle is the weak point. The appeal of a smart contract is that you don't have to rely on a middleman. If it depends on a single centralized data source or API, you have put a middleman back and undercut the decentralization you wanted.³ That source becomes a target for hacks, bribes, or downtime, and the contract will act on whatever it is told. An oracle is only as secure as its data sources.³
An oracle can also work as designed and still pass along bad inputs. On October 11, 2022, an attacker took more than $110 million from Mango Markets, a DeFi protocol, by buying large amounts of its MNGO token on three exchanges that fed the platform's oracle.⁵ MNGO's price went from about $0.038 to a peak near $0.91, and the attacker borrowed heavily against the inflated collateral.⁶ Mango said its oracle price reporting worked as it should. The weakness was thin liquidity on the market used as the price reference.⁶ The oracle accurately reported what the market said, and the market was easy to move.
The same weakness appears when an app uses a single decentralized exchange as its price feed. An attacker can move the price there and change what the app believes.³
A blockchain can be trustless, but only as far as the data it is fed. So how do builders make that data harder to fake, delay, or take offline? That is part two: how oracles are designed to reduce these risks, including how push and pull designs differ. Nant Global Finance has built on Ethereum for nearly a decade, and where a system's data comes from is one of the first questions we ask of anything on a blockchain. If you are working through it, reach our team at media@nantglobalfinance.com.
Sources: 1 ethereum.org (opens in a new tab) | 2 Optimism (opens in a new tab) | 3 Hardhat (opens in a new tab) | 4 Ethereum Foundation (opens in a new tab) | 5 Jones Day (opens in a new tab) | 6 BankInfoSecurity (opens in a new tab)
This blog contains “forward-looking statements” as defined in the Private Securities Litigation Reform Act of 1995. You can identify forward-looking statements as those that are not historical in nature, particularly those that use terminology such as “may,” “should,” “expects,” “anticipates,” “contemplates,” “estimates,” “believes,” “plans,” “projected,” “predicts,” “potential” or “hopes” or the negative of these or similar terms. The reader is cautioned not to rely on these forward-looking statements. This communication does not constitute an offer to sell securities or the solicitation of an offer to buy securities in any jurisdiction where such offer or solicitation is not permitted.
The Nant Global Finance, Inc (“Nant”) family includes entities that are members of FINRA/SIPC and/or the NFA. Investment services are only provided by the Nant subsidiaries that are registered with the SEC, FINRA, CFTC and/or the NFA. Investment products are not FDIC insured and are subject to investment risks, including the possible loss of all principal amount invested. Establishing an account with a Nant subsidiary does not establish a relationship with Nant or any other Nant subsidiary. Each Nant subsidiary has its own independent management team and operates under its own policies and procedures. Each subsidiary is responsible for the content on its own site.
AOS Inc. dba TradingBlock is a member of FINRA, SIPC and NFA. Digital Offering, LLC and NantX Global Capital, LLC are members of FINRA and SIPC. Equity Stock Transfer and BlockAgent are transfer agents registered with U.S. Securities and Exchange Commission.
Learn more about our subsidiaries registered with FINRA on FINRA’s Broker Check
Learn more about our subsidiaries registered with the NFA on the NFA Basic Search
