Smart contracts are smart enough to self-execute as written in the code. But they face severe limitations when enforcement requires information from the outside world.

How can a smart contract trigger an agricultural insurance payment if that execution depends on the amount of rainfall in a season?

In order to work, smart contracts often need information that lies outside the chain. This requires having a trustworthy way to introduce this information on-chain, a way able to resist attempts by malicious agents trying to subvert the system by submitting false information.

This is known as “the oracle problem”.

The Oracle at Delphi. People from all over Greece travelled there to ask questions to the high priestess, Pythia.

Realitio's Oracle

Realitio is a project building a cryptoeconomic mechanism for verifying real world events and introducing them on-chain.

Users can access the Realitio platform to ask any question with a publicly verifiable answer. For example:

  • What was the average daily price of BTC in 2018?
  • Who won the gold medal in the individual kata category in the Karate World Championship in 2004?
  • In which month and year was the first version of the game ‘The Curse of Monkey Island’ released?

When submitting a question, users need to send a reward, in order to incentivize people to provide answers. The reward will be collected by the user giving the final answer.

But there's a problem...

How to ensure that the answer provided is the right one? How to avoid malicious users submitting false answers to subvert the execution of the contract? How to prevent lazy users from giving a random answer without even doing the required research?

In order to create the right incentives, when answering the question, users are also required to post a bond. If other users believe that the answer is wrong, they can challenge it by doubling the bond and providing a new answer.

After each answer, a countdown period begins during which others can submit a different answer. When the countdown period expires, the last person to have posted an answer receives the bond, as well as the reward posted by the asker.

(For more details about how the system works, see Realitio’s documentation.)

The initial challenge for the Kleros "last appeal" 

Realitio Meets Kleros' Dispute Resolution

Read a more in-depth explainer here.

At any point of the answering process in Realitio, anyone can "apply for arbitration" to bring in an external arbitrator to resolve what the right answer is.

The arbitrator will either confirm the current answer (in which case, the party who provided the final answer receives the bond) or it will provide a different answer (in which case, the new answer is considered definitive and the party who paid the arbitration fees receives the bond).

So, how is the arbitrator selected?

When submitting a question, the asker needs to choose an arbitrator in case of a dispute. And one of these arbitrators is Kleros.

When asking the inital question, the user can choose Kleros as arbitrator in case a dispute arises.

In case of a dispute, a large pool of jurors is called (currently 500) to the General Court to adjudicate the case. The party who triggers the external arbitration in Realitio has to pay the arbitration fees. This decision will be considered final.

Kleros acts as a "last resort" for Realitio when there is a question to which many different answers were submitted and where the bond already doubled several times. At some point, it eventually becomes profitable to pay the arbitration fee to win that bond.

Kleros Court, Reloaded

From the point of view of Kleros jurors, the situation is not too different from other uses such as the escrow or the T2CR. Jurors vote and the answer that gets most votes wins. Incoherent jurors lose their PNK deposit, while all coherent jurors split the arbitration fees and the lost deposits.

What's novel in this new application of Kleros is the introduction of questions that might have more than two answers. Realitio questions can have answers that are binary (Yes/No), single-choice (one answer from a list), multiple choice (multiple answers from a list), a date or a number.

Oracles often require more sophisticated structures, such as inputting a number, a price (e.g., what was the price of Dogecoin in US dollars on May 21st, 2019 at 3pm UTC?) or a discrete answer from a set of given options (e.g., which team won the Football World Cup in 1954?).

In order to resolve these types of disputes, we just launched a new version of the Kleros Court which is able to handle multiple options in voting.

The option to insert a number as an answer in the juror interface has been added as well.

Oracles also have an advantage compared to other Kleros use cases: questions tend to be less subjective and even if there are multiple options to choose from, one choice is likely to receive overwhelming support.

Thus, situations where no option gets 50% of the votes - which can lead to tactical voting and unstable equilibria - are largely avoided.

We are actively researching Kleros applications with multiple choice outcomes in more subjective cases. For this purpose, we are adapting ideas from social choice theory to research what kind of voting systems will tend to produce just outcomes in a Schelling point, non-binary choice framework.

Once these ideas are implemented, we will be able to apply them to make future releases of the oracle even more robust.

A Contribution to the Decentralized Infrastructure of the Future

Solving the “oracle problem” will be a key part of the construction of the financial and legal infrastructure of the future.

The use cases are everywhere, encompassing gambling (e.g., betting on the result of a sporting event), trading (e.g., inputting settlement prices on-chain) and insurance (e.g., rainfall to trigger the payment of an agricultural contract), among many others.

With our oracle application, at Kleros we're happy to contribute to the construction of the infrastructure of the future.

Oh, Before You Go, Click Below and Become a Juror

Join the community chat on Telegram.

Visit our website.

Follow us on Twitter.

Join our Slack for developer conversations.

Contribute on Github.