Contracts do not have a reliable and complete source of information about what is happening in the real world. As a result, there is an ambiguous situation: we can implement a complex logic in smart contract code, and the blockchain can provide its unconditional execution. And now, we are one hit from getting rid of need for a third party in concluding contracts (which was meant by “change the world” in the title). However, any logic describing processes of the real world needs to know what is happening in this world. Thus, we are separated from “trust revolution” by lack of information providers or oracles, as they are known in the smart contracts community. The solution to this problem would give a tremendous impulse to prevalence and applicability of smart contracts. Otherwise, this technology runs a risk of permanently remaining just as a platform for ICO.

“Abilities that have no use turn into nothing.” Sten Nadolny

Oracles

Oracle is a provider of information. It provides reliable data from the offchain world that is necessary for correct operation of contract. The main requirements for an oracle are reliability and completeness of provided information. Reliability here means the ability to validate/verify data, and completeness means the ability to provide data to a wide scope of events from the real world. Note that oracle is not a source of information, it supplies information to blockchain. Thus, the choice of the information source is one of the key parameters of an oracle, because the source must be reliable and complete in order for the oracle to be reliable and complete (we will talk about sources in the next section).

Let’s start with the reliability property of an oracle. Nowadays, there are two main approaches to achieving reliability of oracles. The first one is consensus of oracles. As the name suggests, this approach uses the consensus of several independent validators. The main problem with this approach (in terms of reliability) is creation of a network of independent validators. On the one hand, if we choose/appoint consensus participants (oracles), they will depend on the mechanism of choice/appointment. Thus, centralization will continue, although, in another guise. On the other hand, if anyone can become a member of consensus, the system becomes vulnerable to Sybil attack. In addition, it may be easier to compromise (to hack or to bribe) several small consensus members than to compromise one large validator, since security measures of large player are much more serious, and reputation costs are much higher.

Oraclize company provides an alternative solution: user chooses an information source on the Internet. It uses TLSNotary proof in order to prove correct oracle operation. This is cryptographic evidence that the data obtained from the selected source is transferred to the smart contract unmodified.

Anyone can check this evidence on the Internet using a network monitor for Ethereum (at the time of writing, it is unstable). On top of that, it is planned to implement the ability to verify evidence of TLSNotary directly by contract in the Ethereum network.

It is important to note that both approaches have a problem of trusting the source of information: both of them provide us some guarantee of the correctness of the data transfer from source to contract, but do not guarantee honesty of the source (even if we chose it).

Information sources

At the beginning of this section, we will discuss completeness of data provided by oracle. Achieving completeness means expanding scope of information sources, and this entails even greater questions about the reliability of these data. Let us consider two simple examples. If contract needs information about current ETH/USD rate, then large cryptocurrency exchanges can be considered as sources, consensus of which will be quite reliable. And in case contract needs to know whether the light is on in your bedroom, it will be extremely difficult to find independent witness. You can use a physical source, such as a camera in the bedroom, but it will be easy to cheat: put a bag on the camera and it will always be dark in the room. Thus, with increasing completeness of provided with oracle information problem of sources reliability becomes even more acute.

The most natural source of information is centralized. We are used to such sources in everyday life: we learn news on favorite website, we learn exchange rates on a website of Central Bank, etc. Most of us blindly believe these centralized sources, and this belief is most often justified because reputational costs for such large companies exceed potential benefits that can be derived by providing false information. There are two pitfalls. First, credibility: even when dealing with reliable centralized source, we still operate with faith, not knowledge. Second, and more importantly, completeness: the centralized source can be reliable only for a narrow scope of resonant events.

The first way to circumvent the disadvantages of a centralized source is to use a consensus of sources. We have discussed such an approach above, when we talked about consensus of oracles. As with oracles, this approach improves reliability and completeness of provided information, but its positive effect is limited and it has drawbacks (see the previous section).

Another approach to the problem of information sources is an indirect method. The idea is to extract information about event of interest from indirect sources.

These sources will be different for each type of event: for temperature — a photo from Instagram with appropriate geoposition and date, for results of a competition — posts in social networks with appropriate tags and date, etc. The success of recent years in the machine learning field will likely allow us to determine outcomes of past events from indirect sources with acceptable accuracy. What machine learning models are applicable to this, what will be accuracy, whether indirect sources are independent — all these issues should be considered for each specific event separately, and fact of their solvability will be criterion for applicability of indirect method for this case.

For quite simple tasks, such as determining result of a sports match on a sufficient sample of sports fans posts, this case seems to be solved. It is assumed that contract will address to the node on which calculations are performed (extracting the forecast from indirect sources). The reliability of calculations is proposed to be confirmed cryptographically, as it is implemented, for example, in Golem project.

This approach is the second step in the direction of completeness of oracles. This is not about light in the bedroom yet, but about the weather, about election results, about the success of the launch of Falcon Heavy.

To complete the picture of the sources of information, we will discuss prediction markets, such as Augur. The market uses “wisdom of the crowd” to predict future events. Users predict the possible outcome of these events by buying a share of the reward for the correct result (the winners will share the prize in proportion to the size of their bets). Thus, this approach implies economic motivation for participants of prediction: for the correct prediction, user receives a reward, and in case of incorrect one user loses invested funds. The forecast, in this case, is the weighted average expectation of all users. The use of prediction markets increases the completeness of the information provided, because you can predict anything (if there are enough users), and the economic motivation provides reliability of the prediction.