What Are Blockchain Oracles?
At TheMoneyMongers we have a knack of bringing new topics around blockchain and cryptocurrencies in a simplified manner.
And today we are going to talk about Blockchain Oracles, but before diving in Oracles, we should know what smart contracts are?
Smart Contract: A Smart Contract is a computer program that runs on the top of Blockchain, where different parties perform an agreement, and when a specific set of rules and preconditions are met, then the agreement is automatically enforced.
Smart Contract ensures trust and transparency in this process.
One should ask “ What are the set of rules or preconditions”?
The contract developer sets these sets of rules as per to contract’s usecase.
They can be basic rules for secure implementation; for example, until both parties will sign, the contract will not be executed.
OR can be raw data or external data needed for running on-chain Smart Contracts. Now, how to get external data on Blockchain?
- A Blockchain-based exchange that deals with gold prices but on blockchain, we have no options to know current prices unless we use some third party for prices.
- In the Supply chain application, one has to feed or verify the object’s location on Blockchain physically.
So Basically, we need something that provides a connection between the external world and Smart Contracts. Here comes “Oracle.”
Oracles: What are oracles in blockchain?
Oracle is a Bridge between physical or real-life occurrences and Blockchain-based Smart Contract that retrieves, verify and passes the information to Smart Contracts for execution.
Analyzing and filtering raw data on-chain can be expensive due to heavy cryptography and computation. Here Oracles can come for rescue due to their off-chain implementation.
A third party service acts as Oracle and provides relevant information needed for the execution of Smart Contracts. Web APIs, market feeds, scrappers, webhooks, hardware sensors, etc. are used as Oracles.
Let’s Understand clearly in Types of Oracles.
Types of Oracles:
Hardware Oracle: Hardware oracles are nothing but electronics sensors which are used as RFID, Temperature detectors, etc
For example, An IOT system that runs no the top of Blockchain have no jurisdiction over electrical appliances; here Hardware Oracles plugs in, different sensors act as Hardware Oracles and passes the data to Blockchain.
Software Oracle: Software oracles are those third-party services that provide data directly from the web or online using APIs, webhooks, etc. For example. Smart contracts need to be executed on a particular date and time. The blockchain is not aware of the date and time; a third party software is needed for date and time for execution on that exact time and date.
Consensus-based Oracle: Consensus-based oracles are the future of oracles as third-party services, oracles have a point of failure. But if data is passed through a consensus-based system, we can rely on that data to be accurate.
Now let’s take an example, Election between Modi and Rahul are carried out, voting is done. Then the whole decision is based on the third party, i.e., Election Commission. Now both the parties trust EC for a clear and clean result. In our case, EC is the oracle; the election is the smart contract; political parties are different parties.
But, What if the third party has gone rogue?
One of the fundamental pillars of the blockchain is trust. People have opted Blockchain for it is trustless and secure. With an oracle (i.e., Third party) What if Oracle starts providing wrong data? These lead to the -:“ The Blockchain Oracle Problem.”
The Blockchain Oracle Problem
Oracle has the immense responsibility for providing correct data to Smart Contract.
We are giving Oracle enormous power over Smart Contracts because the supplied data from Oracle can change the whole execution. This can result in the wrong implementation of Smart Contract and remember Smart Contracts if on a public blockchain are irreversible. This leads us to ask the questions “Can we rely on Oracles”? Or “There is some solution”?
Some platforms are working towards making consensus-based Oracles protocols, like Delphi, Oraclize, Chainlink.
But Augur has developed and implemented, a complex and secure Oracle Protocol. Augur is a Decentralized prediction marketplace where you can place bets on the future event; these events are real-life occurrences. So far Augur’s Oracle protocol is providing good results.
What does future hold for Oracle?
One thing is sure; Oracle is vital for Smart Contracts and Blockchain as it’s the only connection with the real world.
As AI is introduced with the blockchain, Oracles will play an essential role in the total autonomous implementation of smart contracts in the blockchain. With more platforms working towards Oracle protocols, we will not be surprised to see fault-tolerant Oracles in the near future.
- Oracle is the connection between the physical world and Smart Contract via the third party.
- Oracle Problem: What if the third party gone rogue, Blockchain is supposed to be a Trusted platform?
- Platforms are coming up with new protocols, are making Oracles more decentralized.