This is the second part of our article series on the upgrades required to make blockchain technology ready to deliver on all we have been promised these recent years. In part one, we looked at scalability, which is arguably the most pressing issue if we want cryptocurrencies to be of any use as a daily payment system and for many other blockchain applications.
In this second part, we will look at the need for blockchains to interface with the rest of the world through reliable oracles.
Blockchains Don’t Trust Outsiders
Blockchains are not very good at interfacing with external data providers. Despite all the talk about the Internet of Things and data-intensive AI application, it is very difficult to get a blockchain-based smart contract to work with external data feeds.
Let’s say your smart contract requires information about the price of a cryptocurrency or the weather in a location. The only way to do this is via an external transaction, sending this information to the blockchain. However, there are a number of problems associated with this. First of all, we need to push this data to the smart contract. It is much harder for a smart contract to pull this data by itself. In fact, a smart contract on a platform such as Ethereum cannot simply call an external API. Secondly, if we do manage to request external data, we are leaving the decentralized world and lose all the data integrity and source verification properties of the blockchain. How can we trust this centralized feed of external data? Is this way of working not just like going back to the old days of centralization?
In blockchain terminology providers of external data feeds are called Oracles. Providers, such as Oraclize take away the complexity of interfacing with external data sources by providing a smart contract interface. A contract can send a query and request to receive the result through a future transaction call.
This works very well in terms of getting the actual data into the blockchain conveniently but does not resolve any of the trust issues. How can we make sure the data has not been compromised off-chain?
Making Oracles Safe
Centralized data feeds introduce the exact same problem the blockchain was meant to solve, namely trust. To solve this issue, some approaches that have been suggested use alternative off-chain trusted computing models, such as TLSNotary proofs. Special purpose hardware solutions, for example, Intel’s Software Guard Extensions can be used in combination, providing an extra level of security.
However, these techniques make sure that the data has not been compromised and come from the correct source. How can we trust the data source itself? The answer is we should not trust a single source. A viable approach could be to use a network of oracles for multiple sources and use an incentive mechanism to encourage oracles to tell the truth. The Chainlink Oracle service works in such way.
Putting it Together
Imagine we have solved the scalability issue introduced in part one of this series and have found a way to reliably use external data. Now we need a number of tools to make use of this exciting new blockchain in innovative ways. In the third and final part of this series, we will look at cryptoeconomic primitives and how they can provide a new digital economy.