CryptoCoinsInfoClub.com

Ethereum Oracle Definition

Smart Oracles: A Simple, Powerful Approach To Smart Contracts

Smart Oracles: A Simple, Powerful Approach To Smart Contracts

- Nick Szabo, Formalizing and Securing Relationships on Public Networks (1997) Smart oracles provide a simple, flexible way to implement "smart contracts", which encode business logic, laws, and other agreed-upon rules. Smart oracles build on the idea of oracles, or entities that provide smart contracts with information about the state of the outside world, and combine information gathering with contract code execution. In such a system, rules can be written in any programming language and contracts can interact with any service that accepts cryptographically signed commands. This includes, but is not limited to, cryptocurrency networks. We introduce an implementation of smart oracles, called Codius (based on the Latin ius meaning law), which uses Googles Native Client for code sandboxing. In this paper, we begin with some definitions and background on the concept of smart contracts. From there, we move into our proposal for smart oracles and describe some of the technical implementation details and the security threat model for the system. In the final sections, we describe some of the financial and non-financial applications and the greater potential for this approach to smart contracts as a whole. The Cornell Legal Information Institute defines a contract as: An agreement creating obligations enforceable by law. The basic elements of a contract are mutual assent, consideration, capacity, and legality [] Possible remedies for breach of contract include general damages, consequential damages, reliance damages, and specific performance. Smart Contracts are programs that formally encode certain conditions and outcomes. The code is agreed upon by the contracting parties in advance and must be faithfully executed by a disinterested, neutral system. The three key steps in Continue reading >>

Why Many Smart Contract Use Cases Are Simply Impossible - Coindesk

Why Many Smart Contract Use Cases Are Simply Impossible - Coindesk

Why Many Smart Contract Use Cases Are Simply Impossible Dr Gideon Greenspan is the founder and CEO of Coin Sciences, the company behind the MultiChain platform for private blockchains. In this opinion piece, Greenspan discusses blockchain-enabled smart contracts and why this application of the technology may be suffering from inflated expectations. As the developer of a popular blockchain platform, Isometimes gets asked whether Ethereum-like smart contracts are on the MultiChain roadmap. The answer I always give is always: 'No, or at least not yet'. But in the hype-filled world of blockchains, smart contracts are all the rage, so why ever not? Well, the problem is, while we now know of three strong use cases for permissioned bitcoin-style blockchains (provenance, company recordkeeping and lightweight finance), we've yet to find the equivalent for Ethereum smart contracts. It's not that people don't understand what they want smart contracts to do. Rather, it's that so many of these ideas are simply impossible. When smart people hear the term "smart contracts", their imaginations tend to run wild. They conjure up dreams of autonomous intelligent software, going off into the world, taking data along for the ride.Unfortunately, the reality of smart contracts is more mundane. A smart contract is a piece of code that isstored on an blockchain, triggered by blockchain transactions and which reads and writes data in that blockchain's database.That's it. Really. A smart contract is just a fancy name for code that runs on a blockchain, and interacts with that blockchain's state. And what is the code? It's Pascal, it's Python, it's PHP. It's Java, it's Fortran, it's C++. If we're talking databases, it's stored procedures written in an extension of SQL. All of these languages are Continue reading >>

Oracles, Data Outside Of The Blockchain

Oracles, Data Outside Of The Blockchain

Tutorials and jobs for Ethereum enthusiasts. Smart contracts requirements may need to do actions depending on results of real world events and dont have any native way to communicate with data on the internet.In the context of blockchains, the oracle pattern is the principle of linking real world data that lives outside of the blockchain to actors living inside the blockchain: mainly smart contracts that consumes data in order to decide which action to take. We published an article that present the basics of what is an oracle and how to implement one for the Ethereum blockchain. In this article youll see different uses cases and where to use an Oracle. We also cover a simple oracle implementation in Solidity that mimic a basic insurance contract on the blockchain. As Oracle can take many forms, our second article explains how to use the Oraclize platform to fetch data from the internet and use it in your smart contract . Our example shows how to fetch the current USD price of Ethereum from a web API. Continue reading >>

Oracles In Ethereum - A Simple Guide

Oracles In Ethereum - A Simple Guide

Motivation: Ive been trying to find a tutorial on building an Oracle in Ethereum, only problem is that the articles online are either out of date (pre web3 v1.0.x) or the source code provided is structured in such a way that makes it incredibly tough to follow (having python, c# and javascript in one project with no clear description of what each language is doing and why its necessary). This guide assumes you have a basic understanding of the solidity language Goal: By the end of this guide, I hope to have helped you build and deploy your Oracle onto your own private testnet >>> Click here for the boilerplate project <<< An Oracle is, simply put, a smart contract that is able to interact with the outside world, in the world of Ethereum that is known as off-chain. I put smart contracts in quotations because some people argue that Oracles arent exactly a real smart contract. Example: Say youre writing a smart contract that needs to retrieve weather data, however your contract cant make arbitrary network requests on-chain. You need something that trustable (all user input arent) and is able to listen and respond to specific events on the blockchain. The solution: Oracles. This guide will be building a simple Oracle that retrieves bitcoins total market cap from coinmarketcap and store it into the blockchain. { "total_market_cap_usd": 198558465250.0, // This is that we want to store "total_24h_volume_usd": 4974818568.0, "bitcoin_percentage_of_market_cap": 61.65, "active_currencies": 896, "active_assets": 360, "active_markets": 6442} Ill be using the truffle framework and testrpc for this guide. You can install them by running: npm install -g truffle ethereumjs-testrpc Im using truffle because is has some really nice abstractions that allows me to interact with web3 (almost Continue reading >>

Decentralized Oracles, The Truth & Nothing But The Truth. : Ethereum

Decentralized Oracles, The Truth & Nothing But The Truth. : Ethereum

On chain smart contract incentivizing Oracles to provide "truthful" data.Using Proof Of Stake to ensure consensus of the "truth". Alice & Bob disagree about the weather. Bob claims the temperature will be greater than 30 deg c, at a specific coordinate, on a specific day and hour.Alice insists it will be less than 30 deg c.They are so adamant, they enter into a wager using a weather oracle smart contract and wager 100 ETH each that they are correct.The contract is simple (sort of), winner takes all. Bob communicates his intent to the smart contract, something like IKnowHowHotItWillBe(100, >30, 2018-02-01T13:00:00 UTC, coordinate deg) Alice lists open wagers from the contract and sees bob's wager, she responds with. IKnowHowHotItWillBe(100, <=30, 2018-02-01T13:00:00 UTC, coordinate deg) The contract has several existing weather services "registered", which can provide weather information.This was transparent to both Bob and Alice at the time they submitted their wagers, listOracles().Only these Oracles can provide information for this wager. It is, however, unknown to Bob & Alice which Oracles will publish results. The wager is fulfilled and ETH transfered to the lucky party, once all the oracles have responded.If less than x oracles respond within time (see below definition of time) bet is off.If greater than x oracles respond but not all oracles, the winner can still confirm wager after the time as expired. Each oracle publishes results with the following terms:- If they tell the truth, they are rewarded (x % of wager / total number of oracles) + transaction fees used.- If they lie, their stake is slashed x % of the wager and they are not refunded transaction fees.- They must submit their "truth" within 11520 blocks (~48hours) from the first block which has the select Continue reading >>

Understanding Oracles

Understanding Oracles

This post is to discuss about what we think oracles really are and to cover some common misconceptions around the matter. To us an oracle is a third party you have to talk with when you need some data you dont want to (or you cannot!) fetch by yourself. The reasons for this can be many. On one side, you might not trust a single entity while signing your Bitcoin multi-signature transaction. Lets say for example that you want some funds to be moved just under certain conditions. Instead of doing this on your own (which doesnt give any guarantee to external parties) or delegating this to a third party (which you dont want to put the trust in, as he could behave badly), the Bitcoin-way to enforce your logic is to split the transaction approval process to different signing parties (oracles?) via multi-signature transactions. The way to leverage N-of-M multi-signature transactions is to ensure each oracle owns just one private key so that he can put one signature whenever he thinks its the right time to do so, but the transaction will be valid just once N-of-M oracles will have a consensus on which transaction to sign. This is much stronger than trusting a single external party since the chosen oracles might be competing ones and with a low change of being all fraudolent. The idea of having a distributed oracles network has been there since years, however finding a consensus on an inter-oracle communication protocol (Orisi attempt?) is hard. Finding parties willing to join that network is even harder since a good incentive process needs to be in place and a proper design on how to interact with this oracle network is something there is still not a consensus on. Other than this, a major limitation can be the data-source you want to use to get your data some of these might not Continue reading >>

Ethereum And Oracles

Ethereum And Oracles

One of the more popular proposals for implementing smart contracts differently from the way they are typically presented in Ethereum is through the concept of oracles. Essentially, instead of a long-running contract being run directly on the blockchain, all funds that are intended to go into the contract would instead go into an M-of-N multisig address controlled by a set of specialized entities called oracles, and the contract code would be simultaneously sent to all of these entities. Every time someone wants to send a message to the contract, they would send the message to the oracles. The oracles would run the code, and if the code execution leads to a withdrawal from the contract to some particular address then the oracles circulate a transaction sending the funds and sign it. The approach is still low-trust, as no single oracle has the ability to unilaterally withdraw the funds, but it has a number of particular advantages: Not every node in the blockchain needs to perform the computation only a small number of oracles do It theoretically does not require as a platform anything more complicated than Bitcoin or Ripple as they currently stand Contracts have a somewhat higher degree of privacy although exit transactions are still all visible, internal computations may not be. The scheme can also be augmented with secure multiparty computation protocols so the contract can even contain private information (something that would take efficient and secure obfuscation to work directly on Ethereum) Contracts can rely on external information (eg. currency prices, weather) since it is much easier for N nodes to come to consensus on the result of an HTTP request than an entire blockchain. In fact, they can even rely on data from proprietary APIs, if the oracles subscribe to Continue reading >>

What's A Blockchain Oracle? Information Oracles & External Data Feeds

What's A Blockchain Oracle? Information Oracles & External Data Feeds

There are different types of oracles based on the type of use. We differentiate between software oracles, hardware oracles, consensus oracles and inbound and outbound oracles. Software oracles handle information available online. An example could be the temperature, prices of commodities and goods, flight or train delays, etc. The data originates from online sources, like company websites. The software oracle extracts the needed information and pushes it into the smart contract. Some smart contracts need information directly from the physical world, for example, a car crossing a barrier where movement sensors must detect the vehicle and send the data to a smart contract. Another use case is RFID sensors in the supply chain industry. The biggest challenge for hardware oracles is the ability to report readings without sacrificing data security. Oracalize proposes a two-step solution to the risks, by providing cryptographic evidence of the sensors readings and anti-tampering mechanisms rendering the device inoperable in the case of a breach. These provide the smart contract with data from the external world. Example use case will be an automatic buy order if the USD hits a certain price. These provide smart contracts with the ability to send data to the outside world. An example would be a smart lock in the physical world which receives a payment on its blockchain address and needs to unlock automatically. Prediction markets like Augur and Gnosis rely heavily on oracles to confirm future outcomes. Using only one source of information could be risky and unreliable. To avoid market manipulation prediction markets implement a rating system for oracles. For further security, a combination of different oracles may be used, where for example 3 out of 5 oracles could determine t Continue reading >>

How Oracles Connect Smart Contracts To The Realworld

How Oracles Connect Smart Contracts To The Realworld

How Oracles connect Smart Contracts to the realworld Ethereum-based Smart Contracts are simple but effective forms of code designed to provide services or goods in exchange for certain values (be they monetary or time-based) being fulfilled. However, as they are wholly-based upon the Ethereum network, the input of information must be limited in order to not overwhelm the lightweight nature of the Blockchain. In essence, the Smart Contract is a judge, yet it needs a solid and reliable source of information to make correct judgements. This is where Oracles come in. Oracles are trusted data feeds that send information into the Smart Contract, removing the need for Smart Contracts to directly access information outside their network, thus lightening their workload. Oracles are usually supplied by third parties and are authorized by the companies that use them. Of course, critics will highlight the irony of using third parties to solve an issue on a decentralized platform that boasts of reducing the need for such intermediaries. But Oracles are a necessary step forward in the practical utilization of Smart Contracts. The utilization of real world data in Smart Contracts requires reliable Oracles. This all sounds quite easy on the surface, but in fact the issue of transferring information through Oracles is a subject of much debate among Smart Contract users and developers. In many businesses cases such as simple service retail or travel services, Oracles handle their task quite well, supplying basic yet crucial information to Smart Contracts that can then decide what to do afterwards. Imagine, for instance, a Smart Contract being fed information by a trusted banks API and the delivering the said amount to the user. Pretty simple, right? But In the case of more complex tasks Continue reading >>

How Do Oracle Services Work Under The Hood?

How Do Oracle Services Work Under The Hood?

I have read many questions about oracle services, but I do not understand how they work.Often I read answers like this: Smart contract can not access an external environment... But how do "Oraclize" or "RealityKeys" work, and how can I build My own oracle service on a public blockchain? Basically what needs to happen is that somebody says what data they want, the trusted service provides an ID that identifies it (in our case a hash of the data) and a key they'll sign the result with, and somebody sends a transaction to the contract. Then we wait for the result. Once the result is known, the trusted service signs it with their key, somebody sends another transaction containing the signed data to the contract, and the contract does whatever is supposed to happen. This can be done either on-chain or off-chain. We do this off-chain, so we just provide signed data and a key, and users grab this data off our site and send it to their contracts themselves. This would normally be part of a DApp, so for example PredictionToken have a screen that creates a transaction to grab the ID from our site and sets up a contract, and another screen to grab the signed data from our site and send a transaction to settle the contract. Oraclize do it on-chain, so your contract sends a request to their contract, and their contract writes an event to the event log and returns an identifier. They have a process watching the event log, and when the data is ready they send it as a signed transaction to your contract, which checks the sender of the contract (this is another way of checking who signed the data) and does whatever it's supposed to do. From a developer's point of view the advantage of doing it on-chain is that you only have to deal with requests to one place (your node's RPC interface) Continue reading >>

Blockchain Oracles, Explained

Blockchain Oracles, Explained

Ethereum has made possible the creation of DApps - decentralized applications that operate entirely on a Blockchain. These apps can offer some great advantages, but communication with the outside world might not be as easy without oracles. Ethereum has made possible the creation of DApps - decentralized applications that operate entirely on a Blockchain. These apps can offer some great advantages, but communication with the outside world might not be as easy without oracles. Blockchain,DApps,Smart Contracts,Applications,Decentralization,IBM,Microsoft,Communications Blockchain oracles sound like something from ancient Greek mythology, and in a way, they function in a similar role. In ancient stories, people didnt have enough information to make decisions and turned to oracles for information beyond their understanding. In the same way, Blockchains like those of Bitcoin and Ethereum, do not have ready access to information outside of the chain, and so there is no direct way to validate the conditions that smart contracts are based on. An oracle is, simply put, a translator for information provided by an outside platform. Oracles provide the necessary data to trigger smart contracts to execute when the original terms of the contract are met. These conditions could be anything associated with the smart contract - temperature, payment completion, price changes, etc. These oracles are the only way for smart contracts to interact with data outside of the Blockchain environment. Oracles are radically important. Just like the ancient stories could never have occurred without proper external information, smart contracts cannot function without some data source. Without access to these sources of information, use cases for smart contracts drop to just a tiny fraction of their pot Continue reading >>

Github - Johnhckuo/oraclize-tutorial: Some Basic Introductions For A Useful Oracle Service

Github - Johnhckuo/oraclize-tutorial: Some Basic Introductions For A Useful Oracle Service

Some basic introductions for a useful oracle service Oracle service build the bridge between blockchain and the real world, and the following image describes the underlying mechanism of the Oraclize . It uses the TLSNotary to make its serivce trust-worthy, and pre-fetch the real world data for all the nodes within the network to achieve consensus, which cannot be easiliy done without oracle serivce. The following example shows a simple contract using the orcalize serivce //this import should be replaced by oraclizeAPI.solimport "dev.oraclize.it/api.sol";contract YoutubeViews is usingOraclize { uint public viewsCount; function YoutubeViews() { //OAR = OraclizeAddrResolverI(resolve_addr); //add this line if you are using Oraclize in private chain environment update(0); } function __callback(bytes32 myid, string result) { if (msg.sender != oraclize_cbAddress()) throw; viewsCount = parseInt(result, 0); // do something with viewsCount update(60*10); // update viewsCount every 10 minutes } function update(uint delay) { oraclize_query(delay, 'URL', 'html("watch-view-count")]/text())'); }} The example shows three steps to utilize the oraclize service: Constructor will first call the update function, which will trigger the orclize_query transaction and commence data fetching process. You also have to specify the delay (in seconds) from the current time or the timestamp in the future as first argument. Once the data query returns the result, it will call the __callback function with the result passed into the function. We can now do some operation using the code defined in __callback function, and you can also call update function again if you want to execute the query once in a while. Caution! Please note that in order for the future timestamp to be accepted by Oraclize it must Continue reading >>

Trust Your Oracle? Cornell Launches Tool For Confidential Blockchain Queries

Trust Your Oracle? Cornell Launches Tool For Confidential Blockchain Queries

Trust Your Oracle? Cornell Launches Tool for Confidential Blockchain Queries May 17, 2017 at 12:30 UTC|UpdatedMay 17, 2017 at 23:47 UTC Smart contracts are touted as havingthe potentialto do all kinds amazing things. But, to fulfill their promise, they need a way to communicate with the outside world. That is not so easily done. Due of the nature of a blockchain (all nodes need to agree on any change in state of the database), smart contracts cannot simply fetch data on their own. A key part of the smart contract ecosystem, oracles allow smart contracts to access information, like commodity, currency, derivative pricing and more, from websites, and then use that data to implement the terms of a smart contract. But oracles come with their own set of challenges. For example, an oracle needs to be able to provide a tamper-proof source of information. So, if your smart contract offers insurance against flight cancellations, you want to make sure that the data you are getting on flights is accurate, and has not been altered at any point after being scraped from the website. Confidential queries are another issue. Say, a smart contract needs information on a personal bank statement or a medical record. A query from the oracle to the website would need to contain login, password or other private information. And you don't want anyone seeing that. To that end, researchers at Cornell's Initiative for Cryptocurrencies and Contracts (IC3) have launched an oracle service that allows ethereum smart contracts to obtain trustworthy information and to securely send confidential queries to websites. Unlike other oracles, Town Crier, as the service is called, gets its added security from Intel's Software Guard eXtensions (SGX). IC3 has already implemented SGX on Teechan, a proposed off- Continue reading >>

How To Build A Twillio Oracle On The Ethereum Blockchain

How To Build A Twillio Oracle On The Ethereum Blockchain

How to Build a Twillio Oracle on the Ethereum Blockchain At its core Ethereum is a decentralized world computer. Like any computer itneeds inputs and outputs. One way to get data into our out of the blockchainis something called an Oracle. Oracles are centralized services which othersmart contracts can interact with. One example is a Ethereum price Oracle. Aperson could create price oracle and assert that the price of Ethereum is$50/Ether. Other smart contracts could then act based on that value (possiblya crowdfunding tool could refund everyone if the price dropped too low). Anissue with Oracles is that youre relying on one party or group to be honest.Theres nothing to stop the Oracle from saying that the price is $25. Ideallywell need Oracles less and less. For example, once an on chain tradingsolution emerges well no longer need a price Oracle. Smart contracts will beable reference the trading data directly. In the mean time as long as you trust them, Oracles are a good stopgap that allow smart contracts to interact with the real world in all sorts ofways. In this tutorial Ill walk through setting up a Twillio Oracle whichwill allow smart contracts to send text messages. First well need to set up the smart contract that will recieve requests for text message deliveries. First initialize the project: $ mkdir twillio-oracle$ cd twillio-oracle$ truffle init $ rm test/\* contracts/ConvertLib.sol contracts/MetaCoin.sol Lets use TDD and start by creating a failing test: // test/twillioOracle.jsvar TwillioOracle = artifacts.require("./TwillioOracle.sol");contract('TwillioOracle', function(accounts) { it("logs when message request events are recieved", function(done) { TwillioOracle.deployed().then(function(twillio) { var events = twillio.Message().watch(function(error, res Continue reading >>

Oracles Are The Real Smart Contracts

Oracles Are The Real Smart Contracts

Smart Contracts need Oracles, Oracles need Governance, Governance needs Sidechains. Ethereum cannot support Oracles, and has no use-cases. When Shackles Empower: The Autonomy - Coordination Tradeoff Some freedoms contradict each other. By oppressing contradictory freedoms, total freedom can actually increase. Skip this section (To The Anarchy of Ethereum) if you already buy this (obvious) premise. Imagine a world where we all had the ability (freedom) to fold a magic paper airplane and throw it into the sky, at which point it would travel magically toward, and into, the suncausing the sun to magically explode, destroying all life on this planet. Obviously, in this world, governments would be (with the utmost diligence) scanning the skies for paper-airplanes, and burning them down with long range space-lasers (or something), and then tracking down those responsible. What would society do to someone caught throwing such a doom-plane? Jail them at the very least. What if other objects (fireworks, kites, baseball, ) interfered with plane-scanning systems? Obviously these previously-enjoyed activities would all be totally banned. We would lose some of our freedoms, and thats sad. But, dead people arent free to do anything (and anything includes fireworks), so not-banning is more-sad. Less-extreme versions of that restrict options to maximize them story play out every day. Intellectual property / copyright is one example : if bootleggers can copy an original Star Wars (1979) and sell it for Low Cost = {Their Labor + Blank VCR}, these sales will be competitive (guaranteeing this person a job) and they would tend to displace all sales of the original Star Wars (which must sell at High Cost = {Low Cost + Film Production Costs}). The problem with this seemingly-good, cheap Star Continue reading >>

More in ethereum