0.0402 s - время 43 - запросов

We use cookies in order to improve your experience while using our website. If you continue to use our site, you accept our Cookies Policy, revised Privacy Policy and updated Terms of Use.

BTC $ 4026.28682298 (-1.37 %)
ETH $ 136.355591411 (-2.82 %)
XRP $ 0.3113142758 (-2.3 %)
LTC $ 59.0463745116 (-2.37 %)
EOS $ 3.64764668 (-2.45 %)
BCH $ 154.40745017 (-3.76 %)
BNB $ 14.7149190784 (-4.12 %)
XLM $ 0.1069602663 (-4.26 %)
USDT $ 1.0101900892 (-0.1 %)
TRX $ 0.0225509834 (-1.69 %)

How Do Blockchain Oracles Interact With Smart Contracts?

20:25 12/12/2018
Blockchain oracles and smart contracts

Introduction

 

The concept of smart contracts has been used for a long time in the world of blockchain technologies. Bitcoin allows writing a program code obligating parties to mandatory follow the conditions of the agreement. The implementation of more complex programing languages to write contracts increased their potential and expanded their opportunities. Ethereum itself may be considered as a raw model of such smart contracts application.

 

Using smarts assures agreement execution once certain conditions are reached. But compliance with these conditions must be verified. If the deal is related to blockchain and its components only, there are no problems. Unfortunately, blockchain does not store any information about the off-chain world. Thus, such a kind of verification cannot be performed entirely through blockchain and smart contract.

 

Smart contracts flaws

 

Some blockchains solutions allow writing smart contracts so that it could address external data sources. Unfortunately, this involves various complications and unacceptable consequences. Because of different geolocations, network lags, distributed services, and other breaches of the computer network, two instances of the same smart contract might receive different results after calculations. If two similar contracts on different nodes come to different conclusions, the transaction inconsistency occurs. As a result, the transactions might never been added to the block or might even cause a fork. Moreover, the main concept of smart contracts possesses the following disadvantages:

 

  • A contract is limited to its blockchain as the application area;
  • Correct objective execution requires consideration of changing factors;
  • It is hard to write a contract correctly;
  • An activated contract can’t be changed or removed.

 

Oracle introduction

 

To compensate access limitations, smart contracts require a link between blockchain and the external environment. Software called oracles plays the role of such links. Simply speaking, an oracle is a program that provides blockchain-based contracts with access to external information. A contract asks the oracle for information that will help it make a decision, and the oracle in response will supply the contract with this information.

Oracle introduction

Oracles may be considered as a specific type of smart contracts. Indeed, an oracle code must be placed in one of full nodes. It interacts with requests from smart contracts and operates according to the strict algorithm. On the other hand, the oracle by itself brings no changes into the blockchain content. It can only send a request to an external data source and retransmit the response to the smart contract.

 

It should be noted that smart contracts will be different for each blockchain. This is due to the application of different programming languages. In case of Bitcoin, it is a scripting language. Ethereum smarts are built as full-fledged programs written in several languages. Other cryptocurrencies may have absolutely different approaches. Differences in contracts dictate oracles’ variety. Nevertheless, there is no core differences in the role oracles play for smart contracts.

 

Afterword

 

Smart contracts are program products of small size, included in blockchain. Each full node owner has a full copy of all smart contracts. Smart contracts can use the blockchain content only to make decisions.

 

An oracle is a program code placed on the border of blockchain that can exchange data with smart contracts. Oracles play the role of hardware or software interface. Obviously, the only smart oracle on blockchain threatens the principle of complete distrust to a counterparty. To solve this problem, various approaches are used, including hardware components verification and the polling of other oracles.

Found a mistake? Highlight it and press Ctrl + Enter to notify the administrator.

Up-to-date Blockchain and cryptocurrency news. Be the first to know!

What is it for?