avtarsehra / Open-Oracle-Project

Open Oracle project is a public utility to inject web/API data into the Ethereum Classic Blockchain to trigger smart contracts easily, securely and cheaply.
6 stars 0 forks source link

Ethereum Blockchain Feed Contract #1

Open avtarsehra opened 7 years ago

avtarsehra commented 7 years ago

On the Open Oracle Project Slack Channel it was suggested that http://feedbase.io/ could be used for the Ethereum blockchain component of the solution. This issue is for exploring the feasibility of this, or identifying another appropriate approach.

avtarsehra commented 7 years ago

I have been reviewing the http://feedbase.io/ and https://github.com/nexusdev/feedbase

Based on my understanding this is the way it work:

  1. Once you install feedbase and run your ethereum node
  2. You can utilise the feedbase contract to setup a "feed", which essentially maps your account (address) to a variable in for that feed in the Ethereum based smart contract.
  3. The owner that set this feed can then set various details for the feed e.g. label, price etc.
  4. The owner can then also push data updates to the feed, which can be accessesed by other smart contracts - either just for the execution gas price or for an extra price that is set by the owner.
  5. The owner can also assign the feed to another owner, who can then control details and updates, as well as receive the fees.
  6. The setup and operation of the feedbase solution is designed to be simple and fast for a single 32byte data feed
  7. The feed needs to be defined and set in advance by the owner, then other contracts can call it to access a particular data points and pay for the data. A test solidity contract can be seen here: https://github.com/nexusdev/feedbase/blob/master/contracts/feedbase_test.sol
avtarsehra commented 7 years ago

The limitations of this solution are as follows:

  1. The feed needs to be predefined, and users hav to call that particular feed to access the data
  2. This means that many different feeds will need to be setup, and for every new data point a new feed would be need to be set
  3. The end-user contracts only request the data from a particular feed, so they do not need to define what that data they need
  4. The end-user must rely on the honesty and consistency of the feed provider i.e. they can only call the feed and access the data so this depends on the feed being updated regularly and correctly by the owner i.e. the user can't make a request and the updated data is collected and sent
  5. This means a directory of feeds would need to be setup that would need to update the feeds periodically in case a call is made i.e. there is no way to identify a request and then update the feed.
avtarsehra commented 7 years ago

My feeling so far is that this is probably not effective as a general data feed relay, as end-user contracts can’t make a request for data, which would then be fetched live from a web/api feed. The way feedbase.io currently works, is that the smart contract feed owner would be expected to keep a feed updated regularly incase it is requested by users.

However, using feedbase as an initial prototype for the web/api bridge may be useful.