WTF Are Blockchain Oracles and How They Make Smart Contracts Smarter
Open blockchain smart contracts does not have the capability to guarantee information reliability outside of their own network, they can only read the data saved on their respective blockchain. Oracles seeks to tackle this problem by providing a best-effort claims about the real world and feeding them to smart contracts in a trusted and secure manner, thus bridging the gap between smart contracts and the real world.
“Oracles are trusted entities signing claims about the state of the world.”
- Eric Larchevêque, co-founder and CEO of Ledger
The data provided by an oracle can be any type of data like for example temperature or current dollar value. An oracle can be part of smart contract where for example the original parties sign a contract where funds are released only if an oracle provides a certain value and signs the smart contract with that value. There are different kinds of oracles based on different use cases. In this thesis we distinguish between software, hardware, consensus, inbound and outbound oracles.
Software oracles acts as information bridges in the digital world. They handle information from online sources such as the price of gold or current temperature and communicates it to smart contracts. The online data is originated from several online sources such as company websites or online stock market websites.
Some smart contracts is programmed to trigger on data from the physical world. Sometimes this data only exists within specific persons or objects. Thus measurements has to be performed locally and often in real time. Each oracle has to have a private key to sign report readings from a hardware sensor such that outgoing data such is cryptographically attested. The sensor also needs an anti-tampering installation that deletes the private key and corrupts the data feed in case of manipulation.
These oracles provide smart contracts with real world data. These oracles trigger smart contracts based on this data. For example a smart contract could automatically place an order to buy something if the value of USD hits a certain threshold.
These oracles gives smart contracts the capability to send data to the real world outside of the blockchain. For example when renting out an apartment a smart lock could be used to grant keys and access to visitors when a payment has been received.
Using one source of information can be unreliable and risky. Thus, to avoid manipulation of data and smart contract outcome, several data sources has to reach consensus on the state of the world before the data is sent to a smart contract.
Oracles are third party services that are not integrated into the trusted blockchain mechanism. Thus the challenge with oracles is that they need to be trusted sources of information.
Whether the information comes from the wisdom of the crowd, a sensor or a website, the information has to be trusted. An example of a smart contract and an oracle working together is to sell a stock at a certain price.
This contract is programmed into a smart contract that listens to several inbound stock price oracles. When the oracles listening to the stock price detects that the price has passed a certain threshold and all the oracles reach consensus, the smart contract is notified and the contract is executed.
Subscribe to get your daily round-up of top tech stories!