Before delving into the oracle's concepts, we need to understand why they are needed. We already know what a blockchain is (You don’t? Follow me to learn all about the blockchain), but something that most people don't know is that blockchain is an isolated network that cannot connect to the external world. Also, we know that some advanced blockchains like Ethereum come with programmable codes known as smart contracts to automatically execute transactions and agreements without requiring the help of an intermediary authority.
Despite all their benefits, these smart contracts face some limitations. The major limitation that comes with them is that they cannot autonomously access the data outside the blockchains to execute all the agreements based on real-world information. Also, the more data they have, the wider range of uses come with them. Therefore the blockchain and especially its smart contracts require data providers to continue their operation. The type of data needed by smart contracts can include information on price feeds, weather information, or even random number generation for gambling.
To have a better perception, let's check out an example. Imagine your best friend and you are attempting to bet on a sports competition. Both of you go through a smart contract, agree on the bet's terms and conditions, and lock your funds in a smart contract. Wait! Smart contracts cannot interact with external data, so how will they be informed of the result of the game when the game is over? And How does the smart contract know whether to give the money reward to you or your friend? This is where the smart contract needs to rely on some third-party verification of the events in the real world, in the form of an oracle.
Do you think the oracle is a concept of modern times? Think again! Interestingly enough, the oracle term originates from ancient Greek mythology. An oracle was a person who would act as a bridge from the people to the gods and bring the knowledge of the future. It is what happens with the oracles now; they act as a bridge between the blockchain and the physical world. Since many years ago, any source with good information would have been called oracles!
In the blockchain, smart contracts are the fire, and oracles are the fuel. Oracles connect blockchains and smart contracts to external systems and provide a link between off-chain and on-chain data. They also provide accessibility for the Web 3.0 ecosystem to deliver the data from external environments.
As oracles are the bridge between the two worlds, they are known as blockchain middleware. Although the oracles remove the limitations and open the doors for blockchain to have a broader connection, it is essential to know the data sources and their validation. How do we know the information provided by oracles is entirely correct? Factually, you know there is no garden without its weeds! Scroll down to find out the issues and also the solutions!
The central aspect of the blockchain ledger refers to decentralised manners and their beneficial outcomes, i.e., security, authenticity, and trust. On the one hand, the primary purpose is to keep those features between the execution of smart contracts and oracles and not depreciate the decentralisation. On the other hand, blockchain implements a centralised entity to link on-chain and off-chain data together, but some risks and significant privacy issues come with these centralised oracles.
Centralised oracles vitiate the benefits of smart contracts, and due to their control over the smart contracts, they make them work like regular contracts. Oracles depend on a single source and oppose the entire purpose of using decentralised blockchain. Oracles are not capable of providing trustless verification. If a single oracle goes offline, the smart contract will not have access to the data required for execution or will execute improperly based on stale data. On top of that, if their central authority makes an error or becomes corrupted, the entire system is at risk. Disappointed? No, wait! Don't worry about the issues! The article doesn't end here! Let’s explore some solutions to these problems.
Now we know what oracles are and what their function is. You may ask yourself, how we could embed oracles with decentralisation? How would we know whether our data is accurate if the oracle is faulty or compromised? Is it possible to overcome both access to outside data and the centralisation of smart contract problems?
Fortunately, the answer is YES! The solution settles in a Decentralised Oracle. They deliver the information to smart contracts more reliably by not depending on a single source. Many Ethereum applications use oracles. Also, some platforms tackle the oracle problem and offer a decentralised ledger like ChainLink, which seems like a super promising project! Check here to learn about Chainlink, from A to Z.
A decentralised oracle, just like other oracles, interacts with external data. What makes decentralised oracles unique is that they drive out any single point of failure in a smart contract by utilising multiple data inputs and bringing end-to-end reliability. Also, they make viable other high-value smart contracts with a lack of trust and offer an extra layer of immutability against all sorts of attacks and manipulation. Since the smart contract employs multiple oracles to determine the validity and accuracy of the data, decentralised oracles can also be referred to as consensus oracles.
Decentralised oracles do not depend on a single source of truth and data. Instead, they pull data from multiple independent oracles to feed information to smart contracts and enable hybrid smart contracts to combine off-chain and on-chain data to support advanced decentralised applications (dApps). Hybrid smart contracts are contracts powered by two decentralised networks, i.e., the Blockchain and the Decentralised Oracle Network.
So far, we have identified centralised and decentralised oracle types. Software, hardware, input and output oracles are some other kinds that we will go through below.
This type of blockchain oracle connects to the network, originates from online sources, and spreads the data and information to the blockchain. This information could be anything, including temperature, prices of commodities and goods, flight or train delays, etc.
Unlike the software oracles, hardware ones are designed to get information directly from the physical world and let smart contracts interact with them. Such information could be relayed from electronic sensors, barcode scanners, and other devices with the ability to read information. For example, electronic sensors or barcode scanners are hardware oracles.
Input oracles are among the most effective types of blockchain oracles, which are widely used. Input or inbound oracles pick up data from the real-world (off-chain) and distribute them from external sources to smart contracts.
On the bottom side of the input oracles, output or outbound oracles fetch the data from smart contracts and enable them to send data to the external world.
Since oracles create a bridge between blockchain and external data and are being used by so many projects, various oracle networks have been launched to expand the oracles utilisation. Chainlink is the first major one that gave the green light to create this bridge in the case of the oracle network. Also, there are other projects, including The Band protocol, Witnet, Provable, AP13, DIA, iExes RIC and UMA. Each project offers unique features to provide data and make an unbreakable bridge.
Blockchain expands day by day and increases its productivity and variety in many fields. It's like a wizard that offers practical solutions to integrate many things with decentralisation methods. It also enables us to interact directly and in a trustless manner. Oracles work as a bridge to provide interactions to connect blockchain with the external world. The only certain path to move forward and go through the roof in each concept of the blockchain is to educate ourselves. At Cryptologist.st, we help keep you abreast of every progress and latest development in the blockchain and cryptocurrency. Stay tuned!
Any advice contained in this website is general advice only and has been prepared without considering your objectives, financial situation, or needs. You should not rely on any advice and/or information contained in this website and before making any investment decision we recommend that you consider whether it is appropriate for your situation and seek appropriate financial, taxation, and legal advice.
© 2022 - Created by Cryptologi.st