8

The documentation example for a complex bet contract includes a "Weather feed" service. How would such a feed/service/contract work?

For a weather feed, either there needs to be a temperature sensor hooked up to a computer running an Ethereum node, or someone needs to be manually entering the feed data? Is this a contract where it would have to be reputation-based and powered by some maintainer (the owner of the contract is the only one allowed to use an addFeedEntry method, which fires events)?

Or is there a way to bind some data source (remote website, or sensor off the computer running the node) more provably, so the trust in a maintainer doesn't need to be there?

5

Ultimately you're going to be relying on somebody to tell the truth, because somebody is going to have to be in charge of the thermometer.

The information from the thermometer then needs to be transmitted to your Ethereum contract in such a way that the contract can believe it came from the thermometer: Some computer somewhere owned by someone will either sign the original reading, in such a way that it can then be fed to the Ethereum blockchain, or create a signed Ethereum transaction with the data in it and send that to the blockchain.

The main mitigation to the obvious trust problem here is to use multiple independent data sources; For example, when people here in Japan didn't trust the government to be telling the truth about radiation levels, they formed the SafeCast project where lots of people are equipped with geiger counters and send that data back to a website. Many of these people are known to their social networks, so there's a certain amount of defence against sybil attacks and it would be hard to produce a lot of bogus data and convince people it was real.

In a lot of cases we already have data sources that we at least partly trust to give us accurate information, but they don't provide that information in a form that Ethereum contracts can understand, so there are a couple of projects that bridge the gap between the existing data source and an Ethereum contract. My project, Reality Keys, takes information from various data sources and publishes it along with ethereum-compatible signatures that can be used in an Ethereum contract. We also allow people to object to that data and pay for further investigation from other available sources, as many data sources aren't secured with smart contracts in mind and would likely be hacked or corrupted if people started basing significant financial transactions on them. Another is Oraclize, which just gives you the data off a website and sends it to your contract. In both cases you have to trust the intermediary who is sending the data from the existing data source not to lie or get hacked. In some cases Oraclize will give you a proof to show that the data they sent your contract was really the data they got from the website, but that's generally something you could trivially check anyway; The problem is that by this point, you've already lost your money. This will become more interesting if and when they come up with a way to check this proof inside the contract.

Another approach to getting reliable data is to try to copy the Bitcoin approach of getting anonymous participants to report on what they think happened, and to try to make a system that incentivizes them to tell the truth. This is the idea behind Augur, which, although their internal token is called "reputation", doesn't really rely on reputation as we would normally use the word. There are also a lot of potential hybrid approaches in between, like this proposal by Martin Koeppelmann: http://forum.groupgnosis.com/t/the-ultimate-oracle/61

-1

General example of the price feed:

https://live.ether.camp/account/1194e966965418c7d73a42cceeb254d875860356

post about the implementation

http://ethereumj.io/blog/2015/09/09/friendly-ether-bot/

  • A link to a potential solution is always welcome, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. – Joris Bontje Mar 19 '16 at 21:20
  • sometimes less words is better – Roman Mandeleil Mar 20 '16 at 9:39
  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Waqar Lim Apr 9 '16 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.