About oracles for blockchains and a little about Web3

At the moment, blockchains are highly isolated from external sources of information - both centralized resources and other blockchains. To make different block chains compatible and easily exchange data with each other (and with external resources), you can use oracles.



image



What are oracles



An oracle is a system that receives and verifies events from outside the blockchain and transmits this data to the blockchain for use in smart contracts (or vice versa). Oracles are critical to smart contracts because smart contracts are highly deterministic. Information must enter the smart contract through a certain channel that can confirm its authenticity.



There are several types of oracles that provide one or another type of communication:



  • software - receive data from the Internet or from other blockchains;
  • hardware - they receive data from various sensors ( RFID tags, smart home, I personally immediately think of applications in logistics and IoT);



    Example: data on air temperature needs to be transferred to a smart contract. You can take data from the Internet through a software oracle, or from an IoT sensor through a hardware oracle. * IoT - Internet of Things.


  • incoming - from outside the blockchain to a smart contract;
  • outgoing - from a smart contract to a resource;


Consensus oracles are sometimes used. Several oracles independently receive data, and then, according to some algorithm, determine the output data.



An example of why this is needed: 3 oracles receive the BTC / USD rate from Binance, BitMex and Coinbase, and send the average value to the output. This smoothes out minor discrepancies between exchanges.



Web3



Talking about oracles and their implementations, one cannot ignore Web3, the concept for which they were invented. Originally, Web3 was the idea of ​​a Semantic Web, where each site is tagged with metadata to improve interaction with search engines. However, the modern idea behind Web3 is a network of dApps. And decentralized applications need oracles.



webevolution



It is possible (and, in some cases, necessary) to create an oracle on your own, but there are some frequently used oracles (for example, a random number generator), so it is cost-effective to use oracle projects. The two main (at the moment) projects developing oracles are Band and Chainlink .



Band Protocol



Band Protocol runs on the dPoS consensus algorithm ( what is this? ) And data providers are responsible for authenticity with money, not just reputation.



There are three types of users in the project ecosystem:



  • Data providers who are independently working to securely transfer data from outside the blockchain to the blockchain. Token holders are betting on data providers to grant them the right to transfer data to the protocol.
  • DApp developers who pay small fees to use oracle.
  • Band token holders who vote for data providers. By voting with their tokens for a vendor, they receive a reward out of the money paid by dApps.


band



Among the oracles offered by Band "out of the box": take-off / landing times, weather map, cryptocurrency rates, gold and stock prices, information about bitcoin blocks, average gas price, volumes on crypto-exchanges, random number generator, Yahoo Finance, HTTP Status Code ...



By the way, Band's investors include the legendary venture capital fund Sequoia and Binance .



Chainlink



In general, Chainlink and Band are very similar - both in default solutions and in development capabilities. Chainlink is easier to work with, there is no voting for content providers, and Band is more flexible because it uses the Cosmos SDK and is 100% open source.



At this point, Chainlink is much more popular, in the list of project partners Google Cloud, Binance, Matic Network and Polkadot. Chainlink has also focused on oracles for the rapidly growing DeFi space .



image

Resources, the data of which can be obtained through the oracle from Chainlink.



Conclusion



Oracles are a good idea for fetching data from centralized resources into the blockchain, and I will closely follow its development. However, if we talk about the interoperability of different blockchains, there are other solutions, including parachains (an even more promising technology and the topic of my next post).



For those looking to dig deeper: Band Docs , Chainlink Docs .



All Articles