Thanks to smart contracts (or smart contracts), it is possible to automate transactions if the conditions necessary for their execution are met. Basically, the verification of the terms of these contracts is done on the database stored in the Blockchain .
But what happens when this information is not available on said computer network? In this article, you will find out what a blockchain oracle is, what it is used for, what types of blockchain oracles exist and what are the limits to the emergence of these tools.
What is a blockchain oracle?
Oracles are services used by smart contracts to access information outside the Blockchain (also called off-chain data ).
Nowadays, the amount of computer data recorded on the Blockchain remains limited. The reason is that the use of this decentralized database is still very rare among companies and individuals.
Therefore, the majority of the relevant information that smart contracts need for decision making is stored in centralized systems, outside of the Blockchain.
Oracles then act as interfaces between smart contracts and the real world, providing them with information such as the temperature of a city at a specific time, the result of an election or the status of a flight.
To do this, they extract said information from external sources (website, connected objects, humans, etc.), verify them, before sharing them with smart contracts.
What are the different types of blockchain oracles?
Oracles can be grouped into categories based on the following characteristics:
- the nature of the data source : this is whether the information concerned comes from a software, hardware or human instance;
- the direction of flow : is information transmitted from the outside to the Blockchain or from the Blockchain to the outside?
- trust : is the data collection and validation structure centralized or decentralized?
Software oracles and hardware oracles
Software oracles are the most common type of oracle. Here, the data is collected from the Internet network (databases, servers, websites, …). The information collected can be for example the exchange rate, the classification of a championship or the weather forecast. This data is transmitted in real time to smart contracts in order to indicate to them whether or not they should be triggered.
For their part, hardware oracles exploit the information provided by hardware devices operating in the real world such as data collection terminals (IoT sensors, RFID readers, barcode readers, etc.). The information thus collected makes it possible to follow the routes of objects along the supply chain thanks to the history of events recorded and published on the Blockchain.
Sometimes smart contracts receive information directly from human sources. As oracles, they are responsible for researching and verifying the authenticity of the information required. Then, they digitize them in order to make them understandable by smart contracts. Thanks to the cryptographic processes exploited by the Blockchain, there is little risk that hackers will impersonate these oracles to provide inaccurate data to smart contracts.
The entry and exit oracles
Entry oracles transmit information from external sources to the Blockchain (or more precisely to smart contracts). They automate various actions that depend on off-chain data. For example, one can imagine an entry oracle allowing the initiation of a smart contract whose purpose is to transfer assets as compensation if an airline cancels one of its flights.
Conversely, exit oracles send information from smart contracts to the outside world. These oracles can be used, for example, to act on connected objects if a transaction is validated on the Blockchain. A concrete use case is that of a beverage vending machine that accepts payments in cryptocurrency.
Centralized and decentralized oracles
Centralized oracles have the particularity of depending on a single data source. It is the latter that provides and verifies the data that will be used by smart contracts. This type of oracle is less secure since the provider can pass erroneous data to smart contracts. In addition, if the service in question stops functioning, smart contracts will no longer receive the data necessary for decision-making.
Conversely, decentralized oracles integrate a distributed data collection and verification process. Thus, these operations are carried out collectively and simultaneously by several independent nodes. These must reach a consensus to validate the various information collected. This is why we often talk about a consensus oracle .
The challenges of blockchain oracles?
The main challenge for blockchain oracles is trust . Indeed, for oracles to be more widely used, users would need to be sure that these sources of information are reliable, whether it is a server, a barcode scanner or a computer. ‘an individual.
As mentioned above, these are third party services that do not directly belong to the blockchain infrastructure. Therefore, they are not subject to the same security protocols as the latter. Fortunately, there are technologies and methods that can be harnessed to enhance the sense of security, including diversification of information sources and consensus data validation.
When it comes to centralized oracles, reputation is a factor that should not be underestimated. Indeed, providers providing this type of service have every interest in providing smart contracts with reliable data so as not to lose their credibility.
In addition, since communication between smart contracts and oracles takes place mainly via the Internet, there is a risk of “ man-in-the-middle ” type attacks. This practice consists of intercepting encrypted messages between two servers. The hacker can then receive messages from both parties and send replies to one party pretending to be the other. Again, there are techniques to prevent these intrusions.
The question of the robustness of oracles is of utmost importance since smart contracts need them to make decisions and trigger specific actions.
This issue is also an obstacle to the widespread adoption of smart contracts. Nevertheless, there are solutions such as Chainlink and Band Protocol which clearly stand out in the market.