Blockchain oracles are the intermediaries which help blockchain access real-time data from outside world such as sports results, crypto prices and other event related data. These oracles help increase the automation in blockchain technology by making smart contracts execute themselves when a specific criteria is fulfilled or an event has occurred.
Table of Contents
The first blockchain oracle was likely the Bitcoin oracle which was developed in 2012
MakerDAO was the first project to successfully run a reliable blockchain oracle on the Ethereum blockchain.
The Oracle Problem and Need for Blockchain Oracles in Crypto
The Oracle Problem was that blockchains could not talk to external systems on their own. They were basically like computers with no internet connection. Unverified external data could compromise the blockchain and therefore some kind of validation was necessary just like a computer virus.
Blockchain Oracles solved these problems by acting as a Anti-Virus software. This helped smart contracts perform a majority of their functions including:
- NFT auctions
- Automated Market Makers
- Decentralized Finance
- On-chain Money Protocols
- Algorithmic Stablecoins
- Yield Farming
- On-Chain Collateralized Loans
- Decentralized Exchanges
- On-Chain Contracts
- On Chain Proof of Stablecoin Reserves
How Blockchains Eliminate Third-Party Risk
Blockchain use node operators to eliminate third party risks. Different node operators verify the incoming data to a blockchain through a decentralized network of nodes, all independently. The data is then collected and validated after which it is sent to a blockchain system.
Also, each node operator has to submit some type of collateral (typically as a cryptocurrency) which is slashed and a portion of it is collected as fine.
Further, each node has its own documented history available as on-chain records. These pieces of history serve as reputation systems for the node.
Working of Blockchain Oracles
From my experience in working with blockchain oracle companies since 2021, I have tried to explain the working of such oracles in a simple manner.
- A data request originates from a blockchain smart contract which is then sent to the oracle.
- The oracle fetches the data from a real world source such as an exchange or any other source.
- Then the data is verified by a validator, which operates similar to a proof of stake validator and also uses a consensus mechanism.
- Finally, verified data is fed to the blockchain.
Types of Blockchain Oracles
There are several types of blockchain oracles such as
- Hardware Oracles
- Software Oracles
- Inbound Oracles
- Outbound Oracles
- Contract Specific Oracles
- Human Oracles
- Consensus-based Oracles
Oracles have hugely benefitted smart contracts by accessing real time data. However, there are other benefits too:
- Improved reliability of data
- Greater interoperability between blockchains
- Better security as a blockchain can now be more aware of its state and on-chain assets
- Emergence of newer technologies such as blockchain enabled IoT robots
Some Examples of Blockchain Oracles
Chainlink is one of the most popular blockchain oracles in existence. Basically it is a software that enables non-blockchain systems to connect with blockchains in a safe and secure manner.
It has been widely used by several well known blockchains. Few of which are
Hacks, Attacks and Exploits
Chainlink claims that it has secured a total of $21.01 billion in value through its oracle. However, the platform has also suffered an attack on August 30, 2020 and was drained of 700 ETH from the wallets of Chainlink Node Operators.
Disclaimer: I have worked with QED in collaboration with a marketing agency.
QED is also a blockchain oracle provider and helps secure the interaction of non-blockchain systems with blockchains.
QED basically does the same as Chainlink but on a very different principle. When QED finds a node performing in an unexpected manner, it imposes a fine and cuts down the collateral posted by the node operator. But opposite to Chainlink, the slashed collateral is released to the customer (as compensation) who suffered a loss.