Blockchain oracles: types and functions

icon DATA
Photo - Blockchain oracles: types and functions
Oracles are mediators between blockchain and smart contracts. They transfer the necessary data from external sources to the contract. What are the types of blockchain oracles, and where are they used? Let’s find out!

Content

1. What are blockchain oracles?
2.Why are oracles needed?
3. Types of oracles.
4. Spheres of use.
5. Conclusion.

What are blockchain oracles?

Blockchain oracles are services that enable the transfer of information between smart contracts and external data sources. In fact, they become the third party linking the blockchain and the outside world.

Why are oracles needed?

Many smart contracts require additional external information to work effectively, for example, to calculate the market value of digital assets. However, they are basically able to receive data only within their network, which significantly limits the users’ options. Ecosystem elements like blockchain oracles are designed to remedy this situation.

Oracles are not sources but channels for the transmission of information. Their functions include:
  • data-request;
  • validation;
  • transmission of relevant information to smart contracts.

The operating principle of a blockchain oracle depends on its type and purpose.

Types of oracles

The classification of blockchain oracles is based on different parameters: the source of information, the direction of data transfer, and the way of organizing. At the same time, one service can combine several criteria.

Inbound and outbound

Depending on the direction of data transfer, oracles can be inbound and outbound:
  • inbound receive information externally and deliver it to smart contracts;
  • outbound ones transmit data from the smart contracts to external sources.

Software-based and hardware-based

Software oracles receive data from online sources. These can be servers, databases, clouds, and websites. This type of oracle transmits information in real-time, which makes it one of the most popular and effective.

The data sources for hardware services are physical devices - chips, sensors, barcode readers, etc. Such oracles transform real-world processes into numerical values and transmit them to smart contracts for further operations.

Centralized and decentralized

The first representatives of this category of services were centralized oracles. They had only one source of information and were controlled by a single individual or legal entity. Because of the high risks of attacks and vulnerabilities due to a single subject of control, centralized oracles have not become widespread. 

Decentralized oracles are considered more reliable. In this case, a smart contract interacts simultaneously with several services responsible for certain parts of the request. The main difference between oracles, often called consensus-based oracles, lies in the high reliability of the data obtained.

Contract-based

Time-consuming and expensive solutions that are developed only for a single smart contract. If several contracts need to be deployed, an individual oracle is created for each of them.

The advantage of this type of service is the maximum adaptation to the requirements of a particular smart contract. But for several companies, the implementation of resource-intensive developments is unreasonable. 

Cross-chain-compatible

These oracles transfer data between different blockchains. They eliminate a problem such as incompatibility between networks. 

Human oracle
In some cases, humans can become oracles. Qualified specialists receive requests, study the relevant information, assess its reliability, and transmit it to smart contracts.

Spheres of use

Blockchain oracles’ main task is transmitting reliable information to smart contracts. This is particularly important in the DeFi sector, where there is a need for current quotes of numerous digital assets. Thus, in everyday operations, oracles are used by companies engaged in trading, lending, and insurance.

Mediators are often used to transfer information in a particular format between different systems – blockchain networks, trading platforms, and DApps. Oracles ensure their compatibility and guarantee data correctness.

Conclusion

Oracles are the key to the adequate functioning, development, and widespread use of blockchain technology. However, to make the communication between a smart contract and external data sources secure and efficient, special attention must be given to combating the influence on algorithms and the falsification of information.