AIMultiple ResearchAIMultiple Research

Guide to Oracles in 2024: What Are They, Types & Use Cases

Smart contracts can be used for much more than cryptocurrency transactions. In order to realize their true potential, smart contracts must interact with data and information that are outside of the blockchains. Oracles are the bridge that enables the communication between the blockchain and external sources. In this article, we will explore oracles and their use cases in smart contracts. 

What are oracles?

Oracles are the link between off-chain information and on-chain information. 

Why are oracles needed?

Oracles are needed in smart contracts to make them useful for complex real-life activities such as insurance, borrowing, and lending, or gaming.

In a blockchain system, all nodes must validate(i.e. verify transactions) the information.In order to validate that they all must reach the same results. If they don’t, then the transaction will not be validated. In other words, every input in a blockchain should result in the same output every time. 

This is simple for a static transaction that has no variable. For example, person A has $10 and person B has $15 in their wallet. If person A sends $5 to person B, the blockchain can easily validate this transaction as it is static and has no variability in it, so all nodes can validate that $5 (fixed amount) has been sent to person B. A’s wallet balance gets reduced by $5 and B’s wallet balance increases by $5. This transaction when validated always returns the same result.

Now if we add a variable component we will run into problems. Let’s say person A wants to transfer $5 worth of Ethereum to person B. In this transaction, the amount of Ethereum that gets transferred depends on the ETH/USD variable. An API is needed to get this information.

But the value of ETH/USD changes in seconds so a node that wants to validate this transaction will not reach the same result as another node. In this situation, the transaction can not be validated. This is where oracles come into play. 

Figure 1. Variability caused by using API in a blockchain

Source: Better Programming

An oracle receives data from an outside source such as an API or a combination of different sources, and posts it in the blockchain. Every time that a node checks this transaction, it will reach the same results since the data in the blockchain is immutable. 

Types of Oracles 

Inbound vs outbound oracles

The direction of the information determines if an oracle is inbound or outbound. 

Inbound oracles

Inbound oracles receive off-chain information and bring them to the blockchain so it can be used in the smart contract. For example, oracles that get the price information of cryptocurrencies or assets from exchanges are inbound oracles.

Outbound oracles 

Outbound oracles are less common, they transmit information from the blockchain to an outside source. An oracle that transmits the circulating supply of a cryptocurrency to a website or a smart lock that unlocks when the payment has been made in the blockchain are examples of outbound oracles.

Software vs hardware vs human oracles

The source of information for oracles can be different. 

Software oracles 

Software oracles get their information from digital sources such as APIs, databases, and websites. 

Hardware oracles 

Hardware oracle’s information comes from real-world sources such as sensors and IoT devices. For example, Chainlink has developed oracles that can interact with RFID sensors and collect data. 

Figure2. How a Chainlink decentralized oracle network feeds IoT data to smart contracts

Source: Chainlink

Human oracles

Individuals with specialized knowledge or talents in a specific sector can sometimes act as oracles. They may gather information from a variety of sources and check if they are legitimate. Because human oracles may use cryptography to authenticate their identity, the chances of a fraudster impersonating them and giving tampered data are slim. 

Centralized vs decentralized 

Centralized 

Centralized oracles are controlled by a single entity and rely on a single data source. Centralized oracles are risky as they are a single source of failure if they get hacked, manipulated, or shut down. This leads to counterparty risk which defeats the purpose of smart contracts as they are supposed to be trustless.

For example, if the data source of an oracle that is supposed to provide a football match results for a smart contract is manipulated, the funds will be transferred to the wrong party and because blockchains are immutable there won’t be a refund. 

Finding reliable and collectible information depends on the information type. It is relatively easy to find many data providers for cryptocurrency and stock prices but finding reliable sources that provide weather data can be challenging. For example, Ethersic, a decentralized insurance provider uses a centralized oracle that uses US satellite data for monitoring weather activities that are used in their weather insurance product. This puts them in a vulnerable position. However, they mention that the data source is very reliable and it would be too costly for someone to try to manipulate the satellite images to just receive an insurance claim. 

Decentralized 

A decentralized oracle does not rely on a single oracle node and data source. It combines independent oracle operators and different data sources and brings them into the blockchain to reach a single conclusion. Decentralized oracles solve the problem of single source of failure in centralized oracles. If one of the oracles fails to function as intended for any reason, the smart contract will be able to function as planned. 

Use cases of oracles

Insurance 

Oracles can be used to get information such as weather information and flight delays that can be used in insurance products. For example, Ethersic provides flight delay and crop insurance products. It uses oracles to get information about flight and weather status that is used to validate automatic claim payments.

NFTs 

Oracles have been used to create a verifiable randomness function (VRF). They can be used so the rarity of NFTs is randomly assigned when it is minted. For example, Aavegotchi has used VRF to ensure the randomness of attributes for its NFTs avatars.

DeFi

Financial data such as market prices of different assets can be retrieved by oracles to be used in DeFi smart contracts. They are used to calculate the user’s borrowing capacity and collateralization level. For example, AAVE, a DeFi platform uses price feed oracles to obtain prices of assets to be used in its smart contracts. 

Cross-chain services

Oracles can solve the interoperability problem between different blockchains. This can enable building cross-chain applications and services. Data can be transmitted between blockchains easily without the need for chain-specific integration. They enable:

  • Cross-chain yield harvesting
  • Cross-chain collateralized loans
  • Low-cost transaction computation

Further reading 

Find the Right Vendors

This article was originally written by former AIMultiple industry analyst Arshia Mojtahedi and reviewed by Cem Dilmegani.

Access Cem's 2 decades of B2B tech experience as a tech consultant, enterprise leader, startup entrepreneur & industry analyst. Leverage insights informing top Fortune 500 every month.
Cem Dilmegani
Principal Analyst
Follow on

Cem Dilmegani
Principal Analyst

Cem has been the principal analyst at AIMultiple since 2017. AIMultiple informs hundreds of thousands of businesses (as per similarWeb) including 60% of Fortune 500 every month.

Cem's work has been cited by leading global publications including Business Insider, Forbes, Washington Post, global firms like Deloitte, HPE, NGOs like World Economic Forum and supranational organizations like European Commission. You can see more reputable companies and media that referenced AIMultiple.

Throughout his career, Cem served as a tech consultant, tech buyer and tech entrepreneur. He advised businesses on their enterprise software, automation, cloud, AI / ML and other technology related decisions at McKinsey & Company and Altman Solon for more than a decade. He also published a McKinsey report on digitalization.

He led technology strategy and procurement of a telco while reporting to the CEO. He has also led commercial growth of deep tech company Hypatos that reached a 7 digit annual recurring revenue and a 9 digit valuation from 0 within 2 years. Cem's work in Hypatos was covered by leading technology publications like TechCrunch and Business Insider.

Cem regularly speaks at international technology conferences. He graduated from Bogazici University as a computer engineer and holds an MBA from Columbia Business School.

To stay up-to-date on B2B tech & accelerate your enterprise:

Follow on

Next to Read

Comments

Your email address will not be published. All fields are required.

0 Comments