What is a Crypto Oracle
8 Nov 2023 by Harry Newman 7 min read
What is a Crypto Oracle

Crypto Oracles are computerized systems that allow a smart contract or blockchain to interact with external data. 

The external data can include real-world events, market prices, weather information, sports scores, and virtually any other type of data that a smart contract might need to interact with.

Crypto Oracles serve as a source of truth for smart contracts, providing them with accurate, real-time data from the external world outside the blockchain.


What is a Crypto Oracle

Crypto Oracles are most commonly used for price feeds on decentralized exchanges, they act as an interface to the world outside of the blockchain, querying, verifying and authenticating external data before relaying it to the blockchain.

Crypto Oracles are necessary because smart contracts cannot, by default, access information stored outside the blockchain network.

Giving smart contracts the ability to execute using off-chain data further extends the utility and value of decentralized applications.  

The data feeds can come from software or hardware sources, if an oracle solely tracks information on the web, it may pull data from APIs on centralized crypto exchanges.

Without an oracle, a smart contract would be limited entirely to on-chain data.

Crypto Oracles serve as a source of truth for smart contracts, providing them with accurate and real-time data from the external world.


The Blockchain Oracle Problem 

There exists an oracle problem that showcases the challenges when using blockchain oracles for smart contract inputs. 

Smart contracts rely on accurate Oracle data, the data from an Oracle must be correct for a smart contract to execute properly.

This problem occurs when an oracle is compromised and as a result the smart contract too. Typically, this is the case with centralized oracles, as they are controlled by a sole entity and are the only data source for a smart contract.

How can we confirm that the data provided is unaltered and sourced correctly, and how do we ensure the data remains accessible and updated consistently?

Different oracles offer various solutions to this, based on their ability to handle the correctness of data, ensuring that the oracle data is authentic and unchanged before reaching the blockchain. 

An oracle should not delay or prevent smart contracts from executing actions and triggering changes, this means that data from an oracle must be available on request without interruption.

An oracle should incentivize off-chain data providers to submit correct information to smart contracts, this involves attributability and accountability incentives.

Attributability and accountability incentives involve the linking of a piece of external information to its provider, holding data providers accountable for the information they give, giving them rewards or penalising data providers based on the quality of the information provided.  


Types of Oracles 

Oracles can be distinguished in a few ways:

  • By whether they retrieve external data for use by on-chain contracts, these are called input oracles, these are typically the most useful oracles, as they help use real-world situations and external data to affect how a blockchain is functioning.

  • Send information from the blockchain to off-chain applications, these are called output oracles, performing in an opposite way to input oracles.

  • Computational oracles perform computational tasks off-chain. Typically they have both an inbound and outbound aspect, a computational oracle receives data from the blockchain, computes it off-chain and then inputs it into the blockchain. 

  • Humans can also be oracles, they tend to be people with specialized knowledge of mathematical or financial fields, it usually involves more than just a person reading about the news and making a change in the blockchain as a result. Human oracles are trusted to verify the authenticity and accuracy of certain information. 

  • Contract-specific oracles are typically designed to manage a single smart contract. Contract-specific oracles tend to only be used for specific circumstances as they can take time to set up, best used for a one-off transaction.

  • Centralized oracles are oracles set up by a single person or a group, who provide all its information sources and actions, the oracle is centralized if it is only collecting data from a single source. This can be risky, as a single piece of bad information can harm the whole system.

  • Decentralized oracles can be challenging, decentralized oracles need multiple network participants to achieve consensus before creating smart contracts, benefiting from many different data sources. 

  • Software oracles pull information from online sources, such as asset prices or weather reports, software oracles use software to connect with digital sources of information, and then pass this onto the blockchain. Software oracles often focus on publicly available information from the internet. 

  • Hardware oracles require a few extra steps to set up, hardware oracles involve items such as barcode scanners, motion sensors or thermometers, they relay information from the sensors to the blockchain, where the data can be used for smart contracts. 


Examples of Crypto Oracles 

Chainlink is perhaps the most well-known and largest crypto oracle, offering a decentralized oracle network that connects smart contracts to various data sources. Connecting the world to blockchains. Chainlink is the industry standard for decentralized oracles, 

More can be found out about Chainlink here.

Band Protocol is a decentralized network of oracles that provide real-world data to smart contracts running on a blockchain. Band Protocol provides data cross-chain, offering tamper-proof data feeds for smart contracts which use the BandChain.

Tellor is a transparent and permissionless Oracle protocol for smart contracts. 

The protocol incentivizes an open, permissionless network of data reporting and validation, ensuring that data can be provided by anyone and checked by everyone.


How Does a Crypto Oracle Work

Crypto Oracles connect smart contracts to off-chain data sources, acting as intermediaries that securely fetch data from these sources and feed the data into smart contracts.

Below we will run down how that would typically work.

  1. Crypto Oracles collect data from various sources, such as APIs, online databases or websites, the quality and reliability of this data depends on the selected sources.

  2. Crypto Oracles aggregate data from multiple sources to reduce the risk of relying on a single point of failure or tempered information. Verifying the authenticity and integrity of the data.

  3. Once the data is collected and validated, oracles send this information to smart contracts or a blockchain network. Typically using a predetermined format that smart contracts can easily interpret. 

  4. Smart contracts utilize the incoming data to execute predefined conditions or trigger actions based on the data, for example, automatically settling a bet based on a sports event outcome.

  5. Oracles employ various mechanisms to ensure the accuracy of the data they provide. This might involve multiple oracles cross-referencing data to reach a consensus, or relying on trusted data providers.


Pros and Cons of Crypto Oracles 

Pros 

  • Crypto oracles contribute to the decentralization of blockchain networks, providing access to external data without having to rely on a single, centralized source.

  • Crypto oracles reduce the need for trust in external data providers, by verifying and delivering data through decentralized mechanisms.

  • Using multiple data sources, data validation and consensus mechanisms enhances the security and reliability of the data, reducing the risk of tampering or malicious involvement.

Cons 

  • The reliability of data is highly dependent on the quality and trustworthiness of selected data sources, any inaccurate data can lead to smart contract failures.

  • Integrating and managing crypto oracles can be very complex, requiring careful consideration of data sources, consensus mechanisms and economic models.

  • An oracle is a third-party process that requires a user to work with a provider, who then connects them to the blockchain, as the oracle provider is a sort of middle man it can cause problems with centralization.


Final Thoughts 

Crypto oracles serve as an essential bridge between the real world and the blockchain.

Oracles enable smart contracts to interact with real-world data and execute the contract based on this data.

Without oracles, smart contracts and blockchains would have very limited use cases. Blockchains are a closed system that cannot change and react to external events, crypto oracles help to bridge this gap.


Want More Cutting-Edge Crypto News? 

Follow Us: X TikTok Instagram Telegram LinkedIn 

Sign up to our newsletter at the bottom of the page

Check Out Our Top 10 Crypto Currencies of 2023

This article is intended for educational purposes and is not financial advice.