Currently, blockchains are heavily isolated from external information sources—both centralized resources and other blockchains. To ensure that different blockchains are compatible and can easily exchange data with each other (and with external resources), oracles can be utilized.

What Are Oracles
An oracle is a system that gathers and verifies events from outside the blockchain and transmits this data to the blockchain for use in smart contracts (or vice versa). Oracles are critically necessary for smart contracts because they are strictly deterministic. Information must enter the smart contract through a specific channel capable of confirming its authenticity.
There are several types of oracles providing different types of connections:
- software — they obtain data from the internet or from other blockchains;
- hardware — they gather data from various sensors ( tags, smart home— for me, logistics and IoT applications come to mind);
Example: in a smart contract, data about air temperature needs to be transmitted. You can take data from the internet via a software oracle, or from an IoT sensor through a hardware oracle. *IoT —
- incoming — from outside the blockchain to the smart contract;
- outgoing — from the smart contract to some resource;
Consensus oracles are sometimes used. Several oracles independently obtain data, and then, through a certain algorithm, determine the output data.
An example of why this is necessary: 3 oracles obtain the BTC/USD rate from Binance, BitMex, and Coinbase, and then output the average value. This smooths out minor discrepancies between exchanges.
Web3
When discussing oracles and their implementations, one cannot overlook Web3, the concept for which they were created. Initially, 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 of Web3 is a network consisting of dApps. And decentralized applications need oracles.

Creating an oracle on your own is possible (and sometimes necessary), but there are some frequently used oracles (for example, random number generators), so utilizing oracle projects is cost-effective. The two main (currently) projects developing oracles are and .
Band Protocol
Band Protocol operates on the dPoS consensus algorithm () and data providers are liable for authenticity with money, not just reputation.
In the project's ecosystem, there are three types of users:
- Data providers who independently work on securely transmitting data from outside the blockchain to the blockchain. Token holders stake on data providers to grant them the right to transmit data to the protocol.
- dApp developers, who pay small fees for using the oracle.
- Band token holders who vote for data providers. By voting with their tokens for a provider, they receive rewards from the funds paid by dApps.

Among the oracles offered by Band 'out of the box': flight takeoff/landing times, weather maps, cryptocurrency rates, gold and stock prices, Bitcoin block information, average gas prices, trading volumes on cryptocurrency exchanges, random number generator, Yahoo Finance, HTTP Status Code.
By the way, among Band's investors is the legendary venture fund and .
Chainlink
In general, Chainlink and Band are quite similar — both in their default solutions and development capabilities. Chainlink is easier to work with, as it doesn’t involve voting for information providers, while Band is more flexible due to using and is 100% open source.
Currently, Chainlink is significantly more popular, with partners including Google Cloud, Binance, Matic Network, and Polkadot. Chainlink has also focused on oracles for the sector which is currently rapidly growing.

Resources available through Chainlink's oracle.
Conclusion
Oracles are a great idea for obtaining data from centralized resources into blockchain, and I will be closely monitoring its development. However, when it comes to interoperability between different blockchains, there are other solutions, including parachains (an even more promising technology and the subject of my next post).
For those who want to dig deeper: , .
Source: habr.com
