A blockchain oracle is a third-party service for smart contracts. Oracles provide trusted information based on the outside-world sources to the on-blockchain smart contracts. An oracle typically encapsulates the real-world complexity outside of the blockchain. This provides different engineering advantages, chiefly that critical errors and potential points of failure are easier to mitigate off-chain than on-chain. [1]
For example, in a contract to automatically purchase bitcoins at a predetermined price, the fulfillment condition is based on the current exchange rate for the bitcoin; an off-chain oracle can constantly monitor the price to provide the triggering condition to the contract. [2]
Kustov and Selanteva list the following types of oracles: [2]
If an oracle relies on a single source of truth (centralized), that can lead to issues: the data source can be hacked in a man-in-the-middle attack, or altered by its owner, in order to sway smart contracts. Decentralized oracles (consensus oracles) increase the reliability of the information provided to smart contracts by querying multiple data sources, thus distributing trust between participants. However, this does not achieve trustlessness, since oracles are not part of the main blockchain consensus, and thus not part of the security mechanisms of public blockchains. [3]
Pyth Network is a decentralized pull oracle launched on the Solana blockchain in August 2021. [1] Unlike traditional push oracles that update data on a fixed schedule, Pyth uses a pull model in which applications fetch price updates on demand, reducing unnecessary on-chain transactions. Price data is sourced directly from institutional participants including trading firms and exchanges, and published with sub-second latency. Pyth price feeds are used by decentralized finance applications across multiple blockchains including Solana, Ethereum, and BNB Chain. [2] Each Pyth price update includes a published confidence interval (CI) representing the oracle's uncertainty about the price. Statistical analysis of historical Pyth Benchmarks data shows that CI calibration accuracy varies by asset class; a well-calibrated oracle's ±1σ band should capture approximately 68% of subsequent price moves. [3]
Chainlink is a decentralized oracle network that provides smart contracts with access to real-world data, APIs, and payment systems. It is among the most widely used oracle solutions across Ethereum and other blockchain networks. [4]