• bitcoinBitcoin$63,939.00-0.95%
  • ethereumEthereum$3,148.24-0.47%
  • elrond-erd-2MultiversX$42.710.59%

What Are Oracles?

oracles explained

In this article, we will explain what blockchain oracles are. We will also briefly take a look at oracle types, their features, as well as the Oracle Problem.

 

What Are Oracles and Why Do We Need Them?

Blockchains and smart contracts are closed systems. On-chain smart contracts need external, off-chain data to have real-world applications. This is where oracles come into play. 

Oracles are computer programs that connect off-chain data, that is data from the outside world, with the blockchain world, or on-chain data. They act like an API (Application Programming Interface) that provides a bridge between blockchains and the world outside them. 

Oracles are not data sources by themselves. What they do instead is collect, query, verify, and authenticate off-chain data from different sources. They will then deliver it to the closed system or smart contracts. 

Transmitted data can be related to payments, price feeds, weather conditions, temperature from a sensor, and so on. 

 

Inbound and Outbound Oracles

Based on the flow of information between them and their sources, they can be of two types: inbound and outbound. 

Inbound oracles deliver off-chain or real-world data to the blockchain, while their outbound counterparts bring blockchain data to the outside world. Through them, data can therefore be sent in or transferred out.

A common programmable scenario for an inbound oracle could be the following. A person wants to buy an asset if it hits a certain price. The desired price is locked in a smart contract. The oracle provides price reporting, and when the set price is hit, the smart contract places a buy order. 

Alternatively, a smart contract can be programmed to unlock a smart lock in the real world if a crypto payment is received at a specific crypto wallet address. The smart contract sends this information via an outbound oracle to a mechanism that will then unlock the smart lock.

 

Hardware and Software Oracles 

Based on where they draw their data from, they are also classified into software and hardware oracles. 

Software oracles get and deliver data from internet-based services, such as servers, databases, and websites. They can deliver real-time information, including but not limited to price fluctuations and exchange rates.

Hardware ones receive data from information-reading gadgets, such as camera motion sensors and barcode scanners.

 

Centralized and Decentralized Oracles 

Oracles that rely on a single data provider are centralized and they act as the only data provider for a smart contract, being controlled by an entity. 

On the other hand, decentralized ones interact with multiple data sources, without being controlled by a single entity. 

Besides these types, there are also human oracles. Individuals with specialized knowledge in a certain field can collect, verify, and validate data for smart contracts. 

 

The Oracle Problem 

Oracles are key to a healthy blockchain ecosystem since smart contracts execute decisions based on the data they provide. However, if an oracle is compromised, then so is the smart contract that relies on it, which is known as The Oracle Problem. 

Centralized ones are controlled by a single entity and represent a single point of failure. Consequently, this can jeopardize a smart contract’s security. 

The reason why smart contracts were invented was to avoid reliance on third parties and counterparty risk. That’s why various blockchain projects, such as Chainlink, MakerDao, Band Protocol, and Augur, are developing centralized oracles as they have the potential to solve the Oracle Problem.

 

Conclusion for Oracles

Oracles facilitate the communication between blockchains and the external world. Such mechanisms are crucial for the global adoption of blockchains. Without them, the capabilities and use cases of smart contracts would be significantly reduced as they would depend only on data already within their networks. 

Previous articleNext article

Leave a Reply

Your email address will not be published. Required fields are marked *