Blockchain Oracles are one of the most exciting new developments in blockchain technology, and they're the missing piece to the smart contract puzzle. Oracles are the bridge between traditional software and blockchain. They provide data to smart contracts, so that they can be executed when certain conditions are met. Oracles are often classified based on different parameters, including source, direction of information, and trust..
Classification by Source
By source, blockchain oracles can either be software or hardware oracles.
These are one of the most common types of blockchain oracles. Software oracles connect to data sources over the internet and relay that information in real-time to the blockchain smart contract. Web pages, websites, blogs, and online databases are examples of online data sources.
These blockchain oracles collect data from physical world events and convert it to the data value that smart contracts can understand. These real-world events could include when a football match is scheduled to start, the number of cleared fans in a stadium, or supply chain management, such as when a truck carrying drinks checks into the loading bay, among other things.
Classification by Direction of Information
Blockchain oracles are classified by the direction of information into
Inbound Blockchain Oracles
These send data to the blockchain smart contract from other sources. For instance, the arrival time of a truck at the loading bay
These transmit data from the smart contract to an external device/platform. For example, funds locked in a smart contract could be transmitted to the driver’s wallet for completing the task of getting the supplies to the loading bay within a designated time.
Classification by Trust
Blockchain oracles are classified by the trust into
These types of oracles are controlled by a single entity or central body. These could be companies in charge of the oracle or those that control how the oracle works and the type of data collected.
Examples of centralized oracles include the types used to relay information in IoT systems. Centralized oracles can be considered quite risky as information relayed to the smart contract comes from just a single source, which could be prone to vulnerabilities and malicious attacks, thereby threatening the reliability of the smart contract.
The use of decentralized oracles, the smart contract doesn't rely on a single source of information. Information relayed to the smart contract is queried across several other oracles to prove the authenticity and reliability of the information provided.
Specific people with specialized knowledge in a particular field can occasionally serve as oracles. They can gather data from a variety of sources, verify its authenticity, and convert it into smart contracts.
The possibilities of a fraudster spoofing a human oracle and providing tampered data are slim since they can use cryptographic algorithms to verify their identity.
A contract-specific oracle is designed for just a particular type of smart contract. Since contract-specific oracles are designed for just one type of smart contract, running several operations in a company requires running several contracts together.
Developers can tailor contract-specific oracles to specific requirements because they can be built from the ground up to serve a specific use case. However, contract-specific oracles are usually expensive to maintain, considering the number of individual contracts needed and that they take more time.
Oracles can be used to perform any arbitrary "off-chain" high computational solution, which is especially useful given Ethereum's intrinsic block gas constraint and high computation cost.
Rather than simply relaying the results of a query, computation oracles can be used to compute on a set of data and revert a calculated result that would otherwise be impossible to compute on-chain.
The Blockchain Oracle Problem
Smart contracts rely on blockchain oracles to get information across for proper functioning. This means that the smart contract is dependent on the reliability of the information relayed by the blockchain oracle. This then poses a problem.
If the blockchain oracle is compromised, the smart contract could also be affected and lose functionality. This is known as the oracle problem.
Attacks such as man in the middle attacks where a malicious hacker could take advantage and tamper with data from the flow of data from the third party link which is then transmitted to the smart contract.
Uses of Blockchain Oracles
Blockchain oracles are used to transmit data as third-party links to smart contracts in several industries, such as
- Supply chain
- weather predictions and so much more.
The global adoption of blockchains requires a secure mechanism that improves communication between smart contracts and the outside world. Smart contracts would have to rely on information already in their networks if they didn't have blockchain oracles, which would severely limit their capabilities.
Oracles enhance blockchain networks' capabilities by providing access to all external resources needed to implement efficient automation smart contract use cases that go beyond simple data preprocessing.