Skip to content

What we need to know about "Oracle" in the context of blockchain? #3

@maxisacoder

Description

@maxisacoder

1. What is Oracle? Why concern?

'Oracle', not that database 'Oracle', is a term come from complexity theory and computability theory. According to Wikipedia [8], an oracle machine is an abstract machine used to study decision problems. It can be visualized as a Turing machine with a black box, called an oracle, which is able to solve certain decision problems in a single operation. The problem can be of any complexity class, which means that the problem does not have to be computable. Even undecidable problems, such as the halting problem, can be used.

In the context of blockchain technology, blockchain is defined by all the information that is publically available on the decentralized network. However, there come certain situations where the blockchain does not have access to information that is off of the chain.
Oracles provide the data that is required for these smart contracts to execute. These are external data feeds that are provided by third-party services and are designed to be used with these smart contracts. They will provide information to the smart contract such as whether a payment has succeeded, a price has reached some limit or even other external factors like the weather.
Oracles are essential to the functioning of the smart contracts. They provide essential inputs for all of these smart contracts and allow for the legitimate interaction of these contracts with real world and external factors.

2. Oracle research in the academic community.

There are centralized oracles, which pipe Internet information into Ethereum. For example, Oraclize and Real Keys. These oracles substantially suffer from central failure points. Shapeshift built a custom centralized price feed for their exchange Prism. MakerDAO implemented an Oracle controlled by the team’s multisig for their first stable coin Sai. The oracle is often the only centralized unit of such systems.

Prediction markets, such as Augur and Gnosis, can theoretically be used as price feed providers. In practice, however, it’s unlikely to be feasible soon due to the overhead added by the generic nature of these projects.

We will review the following oracle project in this chapter:

  • SchellingCoin
  • Augur
  • Oraclize
  • Real keys
  • Casper

SchellingCoin

SchellingCoin is posted by Vitalik, a mechanism that allows you to create a decentralized data feed.

This mechanism is how SchellingCoin works. The basic protocol is as follows:

  1. During an even-numbered block, all users can submit a hash of the ETH/USD price together with their Ethereum address

  2. During the block after, users can submit the value whose hash they provided in the previous block.

  3. Define the “correctly submitted values” as all values N where H(N+ADDR) was submitted in the first block and N was submitted in the second block, both messages were signed/sent by the account with address ADDR and ADDR is one of the allowed participants in the system.

  4. Sort the correctly submitted values (if many values are the same, have a secondary sort by H(N+PREVHASH+ADDR) wherePREVHASH is the hash of the last block)

  5. Every user who submitted a correctly submitted value between the 25th and 75th percentile gains a reward of N tokens (which we’ll call “schells”)

Potential attack for this SchellingCoin system are: 1. 49% coalition. 2. Micro-cheating. The interesting part about SchellingCoin is that it can be used for more than just price feeds. SchellingCoin can tell you the temperature in Berlin, the world’s GDP or, most interestingly of all, the result of a computation. Some computations can be efficiently verified; for example, if I wanted a number N such that the last twelve digits of 3N are 737543007707, that’s hard to compute, but if you submit the value then it’s very easy for a contract or mining algorithm to verify it and automatically provide a reward. Other computations, however, cannot be efficiently verified, and most useful computation falls into the latter category. SchellingCoin provides a way of using the network as an actual distributed cloud computing system by copying the work among N parties instead of every computer in the network and rewarding only those who provide the most common result.

Oraclize

One solution is to accept data inputs from more than one untrusted or partially trusted party and then execute the data-dependent action only after a number of them have provided the same answer or an answer within some constrains. This type of system can be considered a decentralized oracle system. Unfortunately, this approach has severe limitations:

  • It requires a predefined standard on data format
  • It is inherently inefficient: all the parties participating will require a fee and, for every request, it will take time before reaching a sufficient number of answers.

The solution developed by Oraclize is instead to demonstrate that the data fetched from the original data-source is genuine and untampered. This is accomplished by accompanying the returned data together with a document called authenticity proof. The authenticity proofs can build upon different technologies such as auditable virtual machines and Trusted Execution Environments.
image

image

The following authenticity proof is supported by oraclize:

  • proofType_TLSNotary
  • proofType_Android
  • proofType_Native
  • proofType_Ledger
  • proofStorage_IPFS

Note that, the TLSNotary is an open-source technology, developed and used by the PageSigner project. TLSNotary allows a client to provide evidence to a third party auditor that certain web traffic occurred between himself and a server. The evidence is irrefutable as long as the auditor trusts the server’s public key.

The full detail of this protocol is out of scope of this review, we put the flow chart of TLSNatory for reference here:

3. Oracle Example in Lending

[] bzx: call Kybernet work

[] Lendroid

ethfinex
dydx
ethlend

4. Oracle in Vena

5. References

  1. https://people.cs.uchicago.edu/~teutsch/papers/decentralized_oracles.pdf
  2. https://arxiv.org/pdf/1808.00528.pdf
  3. https://blog.aeternity.com/blockchain-oracles-657f134ffbc0
  4. https://bitcoinexchangeguide.com/oraclize/
  5. https://www.coinbureau.com/education/what-are-blockchain-oracles/
  6. Verify dilemma: https://eprint.iacr.org/2015/702.pdf
  7. TrueBits: https://people.cs.uchicago.edu/~teutsch/papers/truebit.pdf
  8. Oracle Machine: https://en.wikipedia.org/wiki/Oracle_machine
  9. Introducing Oracul: https://medium.com/@roman.brodetski/introducing-oracul-decentralized-oracle-data-feed-solution-for-ethereum-5cab1ca8bb64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions