dYdX logo
dYdX logodYdX icon

Blockchain Oracles: What They Are and How They Work in Crypto

Blockchain Oracles: What They Are and How They Work in Crypto

Cryptocurrencies have a communication problem. 

The intricate algorithms on blockchains like Bitcoin (BTC) and Ethereum (ETH) securely process transactions within their self-contained systems, but there’s no easy way to introduce external (or “off-chain”) data to crypto networks. Since most off-chain data feeds come from centralized servers, they pose an existential threat to blockchain’s foundational feature: decentralization. 

On the other hand, if crypto developers don’t bring off-chain data to their systems, blockchains have limited real-world applications. 

Crypto oracles promise to bridge the “data gap” between on-chain and off-chain systems without sacrificing blockchain’s decentralized design. Here, we’ll explore how blockchain oracles work and how they open Web3 to the wider world. 

What is a Blockchain Oracle?

A blockchain oracle is any third-party entity or system that transfers data between decentralized blockchains and centralized real-world data sources. Because oracles pass information between two programs, they’re often likened to “middleware” software systems. Blockchain oracles are typically “inbound” protocols, meaning they transfer external data from real-world sources to cryptocurrency networks. However, “outbound oracles” specialize in sending information from on-chain sources to interested external clients.

Whether developers use an inbound or outbound oracle, these programs typically link with blockchain-based “smart contracts.” A smart contract is a software program with pre-coded instructions to automatically fulfill a task when it recognizes a specific set of conditions. If oracles want to incorporate off-chain data into their “if/then statements,” programmers link them to an oracle to gather and share this information. 

For example, suppose two friends make an on-chain bet on which hockey team will win an upcoming game. In this scenario, the smart contract needs off-chain data feeds from the hockey game via an oracle to automatically distribute the funds from the smart contract wager to the winner’s crypto wallet.  

What is the Oracle Problem in Blockchain? 

The decentralized structure of blockchain technology poses a unique problem for oracle providers. Although it’s possible to transmit data through centralized servers and application programming interfaces (APIs), this communication strategy negates the inherent decentralization of blockchain systems. Once a centralized oracle sends data feeds to a blockchain, it introduces a single point of failure — and potential manipulation — into the cryptocurrency’s design. 

Also, if blockchains rely on centralized sources for external data, they need to trust the authenticity of their oracle, which goes against the “don’t trust, verify” ethos in the cryptocurrency community. Crypto commentators often use phrases like “the oracle problem” or “the oracle dilemma” to describe the challenge of bridging on-chain and off-chain data in a trustless manner without compromising decentralization.  

Overcoming the Oracle Problem: Decentralized Oracles Explained

To address the blockchain oracle dilemma, some oracle developers incorporated decentralization into their protocols to avoid transmitting data from a single source. Chainlink is a prominent example of a decentralized blockchain oracle that communicates on-chain and off-chain data through a peer-to-peer (P2P) computer network. 

On the Chainlink blockchain, computers (or “nodes”) need to lock (or “stake”) the cryptocurrency LINK to submit bids on inbound or outbound data transfer proposals. The Chainlink algorithm automatically screens, selects, and cross-references the data nodes sent through the oracle network to clients, and it rewards validator nodes with LINK tokens.

Although Chainlink interacts with centralized sources such as crypto exchanges, market price aggregators, or meteorological websites, it routes all of this data through a trustless blockchain program before it arrives in a crypto protocol’s smart contracts. Chainlink’s algorithm also aggregates the information sent from nodes to further remove points of centralization and provide off-chain data to blockchains. 

Competing decentralized oracles like Band Protocol and Witnet use similar techniques where P2P node operators collect data and deliver trustless, manipulation-free feeds.

Hardware, Software, and Human Oracles: What’s the Difference? 

Inbound oracles pull data from the outside world to a blockchain’s ecosystem, but they don’t all get their info from the same source. There are three major categories that help blockchain developers know where and how their oracle partner collects its data.

Hardware Oracles

A hardware oracle gathers data using physical devices like motion detectors or weather sensors and sends this info to a blockchain. For example, if a hardware device in a vehicle detects damage after a crash, it sends this info to a smart contract responsible for auto insurance claims. Hardware oracles are also convenient for home or farm insurance, as they track extreme temperatures or hazardous phenomena like floods, hurricanes, or hailstorms.

Software Oracles

Instead of relying on physical devices, software oracles fetch, translate, and transfer data between digital sources. A common use case for software oracles is providing decentralized finance (DeFi) applications with average prices for digital assets. Typically, software oracles aggregate prices for cryptocurrencies like Bitcoin or Ethereum from multiple centralized exchanges so that decentralized exchanges (DEXs) like Uniswap, lending protocols like Aave, or cross-chain bridges like Synapse have up-to-date market prices for crypto assets. 

Human Oracles 

Sometimes, oracles transfer data sent by specific individuals or groups to smart contract programs. Typically, the people behind these “human oracles” have specialized knowledge or accreditations, and they must use advanced safety features like a biometric log-in to cryptographically verify their identity before submitting data. For example, a paleontology professor uses a human oracle to confirm the authenticity of a newly discovered Tyrannosaurus fossil and adds this data to a smart contract database.  

Use Cases for Blockchain Oracles 

With secure and decentralized blockchain oracles, developers have the power to bring the entire world into their decentralized applications (dApps). While blockchain oracles open limitless possibilities for crypto technology, a few features have already taken off in Web3

  • Tokenized real-world assets: The data feeds from external oracles make it possible to track the value and ownership history of asset categories like real estate, fine art, and equities on blockchains. With oracles, developers have an easier time tokenizing multiple asset categories to take advantage of the liquidity and transparency of blockchain technology. 

  • Decentralized finance (DeFi): DeFi dApps like DEXs, staking providers, or lending protocols need oracles to provide up-to-date feeds on the latest market prices for crypto assets. By aggregating cryptocurrency prices from multiple external sources, DeFi programs offer traders reliable rates whenever they want to swap, borrow, or stake their tokens. 

  • Insurance processing: Oracles have the potential to automate the insurance filing process. Instead of calling insurance agents and manually submitting claims, smart contracts retrieve external data and send payouts whenever their “if/then” standards meet a policy’s stipulations. 

  • Fantasy sports betting: Pro sports fans don’t have to worry about centralized intermediaries when placing wagers on oracle-powered betting protocols. On a decentralized fantasy sports platform, smart contracts only reward players when they register the official score of a game sent through an oracle. 

  • Randomness for game rewards: Video games sometimes incorporate randomness functions like random number generators (RNGs) as an unbiased way to reward players. If developers want to use these random features in their blockchain-based games, they link their protocol with an oracle to fetch data from external RNGs, which helps reassure users that the in-game rewards mechanism is fair.

Upgrade Your Crypto Knowledge with dYdX Academy 

Learning about Web3 technologies and crypto terminology may seem overwhelming, but dYdX is here to break down the blockchain revolution. Visit dYdX Academy for more beginner-friendly guides on dozens of crypto topics, including hardware wallet safety, DeFi, and advanced trading strategies. dYdX also offers eligible traders a decentralized derivatives exchange with access to dozens of crypto perpetual contracts. For more info on the latest news and features on dYdX, visit our official blog, and eligible traders can start trading on dYdX today. 


The content of this article (the “Article”) is provided for general informational purposes only. Reference to any specific strategy, technique, product, service, or entity does not constitute an endorsement or recommendation by dYdX Trading Inc., or any affiliate, agent, or representative thereof (“dYdX”). Use of strategies, techniques, products or services referenced in this Article may involve material risks, including the risk of financial losses arising from the volatility, operational loss, or nonconsensual liquidation of digital assets.  The content of this Article does not constitute, and should not be considered, construed, or relied upon as, financial advice, legal advice, tax advice, investment advice, or advice of any other nature; and the content of this Article is not an offer, solicitation or call to action to make any investment, or purchase any crypto asset, of any kind.  dYdX makes no representation, assurance or guarantee as to the accuracy, completeness, timeliness, suitability, or validity of any information in this Article or any third-party website that may be linked to it.  You are solely responsible for conducting independent research, performing due diligence, and/or seeking advice from a professional advisor prior to taking any financial, tax, legal, or investment action.

You may only use the dYdX Services in compliance with the dYdX Terms of Use available here, including the geographic restrictions therein. 

Any applicable sponsorship in connection with this Article will be disclosed, and any reference to a sponsor in this Article is for disclosure purposes, or informational in nature, and in any event is not a call to action to make an investment, acquire a service or product, or purchase crypto assets.  This Article does not offer the purchase or sale of any financial instruments or related services.

By accessing this Article and taking any action in connection with the information contained in this Article, you agree that dYdX is not responsible, directly or indirectly, for any errors, omissions, or delays related to this Article, or any damage, injury, or loss incurred in connection with use of or reliance on the content of this Article, including any specific strategy, technique, product, service, or entity that may be referenced in the Article.

Want more content? Check out these articles:

What is a Chainlink?

Golden Cross Pattern

What is Proof of Reserves?

What Is a Satoshi? Explaining the Tiniest Bits of Bitcoin

What Is DCA in Crypto, and What Are Its Pros and Cons?

What Is a Ledger in Blockchain?

What Is Tokenization and How Does It Work?

DeFi Tokens: A Beginner-Friendly Guide

What are Crypto Bridges?

Utility Tokens 101