Lightning Talk: Provably Honest Oracle Service

Devcon 1 · November 2015 · 4:50

Thomas Bertani presents Oraclize, a set of tools and APIs that extend the power of smart contracts by pushing external data onto the blockchain. The Devcon 1 lightning talk addresses how contracts can receive outside information and how an oracle service can show that the data it delivers is honest.

Speakers

Topics

From Devcon 1, hosted by Ethereum Foundation.

Transcript

hi everybody I am Thomas Bethany and I try to briefly explain what the point of Oracle is so we keep talking about the potentials of smart contracts but one of the main limitations of smart contracts is that we have to rely on on chain data only so in the previous presentations they already seen something like BTC relay or other prize feeds which are essentially from contracts from where you can get some data which should be updated by an external data provider so essentially this means that there is a party an external centralized party that is pushing some data in with some

cryptographic proof to this contract so that you can fetch this information from another contract so the approach of Oracle eyes is rightly different what we are built here is a contract interface so that you can use from your own contract our service to fetch API is and data feeds from the internet so since we are a centralized party because the fetching cannot be done on chain and directly with some of course all things are dead how can you trust us we are sending TLS natori proof which is proving that a center a certain content was given as a result by a certain server at a specified time so in this

way you don't have to trust us not to alter your data and you are 100% sure that the data coming from us is not altered so to explain with some code with what they just said oops I just show that acne on the website so if you go through this subdomain def dot or alkalis dot a here there are some sample codes that awfully now will be loading and calling your class is very easy because essentially we are providing a solidity file to to import

directly in your code and after that you have a base contract which is called using oracle eyes so essentially you can write your code we and in the definition you can extend you can inherit our contract by just typing is using oracle eyes so this is providing some functions such as oracle eyes underscore query the code is not loading so this is a little bit difficult to explain let's see if at least a documentation is working yeah so essentially you are sending us an

asynchronous request and this is the syntax so you just type oracle eyes underscore it and as first argument you specify the data source the data source in this case is Wolfram Alpha but obviously you can get even you can use directly any HTTP API you want just by typing as data source URL so this is a synchronous and then I'm say we are sending back a transaction which is calling a callback method in your contract so the only thing you have to do is to implement a callback method which is described in the documentation here callback function and then here you decide what to do with this data

so essentially you can write in just ten lines or something like a data feed which is always keeping updated the price of either taking the price from tracking or things like that there are even some utilities you can use because obviously we are sending back this as string so we have some JSON and XML helpers so you can just fetch some fields if you don't need the old response back from the API and there are some Alpers so that you can do string comparison string concatenation and all this kind of stuff thank you for your attention