We’ve packed this article with useful information for blockchain enthusiasts of any level to gain a deeper understanding of oracles and the role they play in crypto adoption.
Watch our six minute video on the topic, or use the table of contents to jump directly to the section that interests you. 👇
Non-fungible tokens (NFT) have blown up recently, with many in the digital artist community minting their own NFTs and selling them for prices sometimes fetching the artist $69 million. It won’t be long now before celebrities start cashing in on this new digital art wave.
Let’s imagine Kim Kardashian wanted to sell an NFT of exclusive photos of herself. Where’s the best place to market it? Well to her 228 million Instagram followers, of course. But here’s where she’d run into a minor inconvenience — Instagram doesn’t provide the kind of infrastructure she’d need to support a crypto sale. It isn’t an NFT marketplace, therefore it can’t gather auction information like bids, nor connect to crypto wallets to actually carry out the transaction.
Say it could be connected to a specialized marketplace, it would still need to translate all the required data from Instagram to a blockchain-readable format. This is where blockchain oracles come in. They play a critical role in the infrastructure of blockchain.
And since Instagram isn’t the only platform with this Oracle debacle, oracles will prove vital in the push towards mainstream crypto adoption.
A blockchain oracle is a trusted source of data that is external to the blockchain, that is, it relays trusted information the blockchain needs to operate, but cannot collect itself.
Breaking it down, most systems, including DeFi products, work in isolation unless connected to each other through 3rd party platforms. Blockchains alone cannot reliably collect data from outside the blockchain. To hedge the risk this produces, the creators of DeFi products have expanded their ecosystems and have added trusted data oracle providers, which provide reliable and accurate communication with the outside world.
Oracles are services that connect the external data blockchains need to operate to decentralized applications, other blockchains, marketplaces, cloud providers, IoT devices, as well as payment and corporate systems. Oracles sometimes collect this external data and transmit it, but they can also generate and be the source of the data.
Let’s take a look at another example: think of a decentralized crypto exchange. Their smart contracts don’t know the exact current exchange rates of their listed tokens. It’s a lot like when you have a service that needs an internet connection to relay external information without which it can’t operate. Think about Uber. When’s the last time you were able to order an Uber without an internet connection? Can’t think of it can you. That’s because your phone relies on Uber’s central servers to tell it where a nearby driver is.
In the same way, a decentralized crypto exchange relies on an oracle to tell it the correct current exchange rates of its listed tokens. Oracles act as a reliable transmitter of information. If a smart contract needs to know how much a token is worth, an oracle provides that information. If Kim Kardashian auctions exclusive pictures of herself as NFTs, oracles provide data on which users placed bids on Kim K’s minted art across different exchanges and how much. Then, an application can surface to users an accurate price that is based on all the different markets where the NFTs are being traded.
Let’s build an example we’ll revisit several times in this article: Imagine a decentralized Uber. A low earth-orbiting satellite could run an ETH node that verifies geospatial data, and then compares that with local anonymous devices connected via bluetooth using an app like Nodle in order to triangulate and verify your GPS location. This will share with a driver exactly where to pick you up without having to give away any personal information to Uber or any other single point of failure.
A single point of failure is when a system has a point where, if it were to fail there, the entire system would stop working. Like if Uber’s servers or GPS data provider were to stop working — you wouldn’t be able to call an Uber. In our decentralized example, because there is no single point of failure, security is achieved through redundancy of decentralized devices working together, and incentivized to collaborate via crypto.
The main types of oracles are software, hardware, inbound, outbound, and consensus-based oracles. Each one offers their own benefits and some are more popular than others. Let’s take a more detailed look at each type.
The most common type of oracle, software oracles receive information from various web resources: servers, databases, etc. They then take this provided data and transfer it to the blockchain. Since this allows information to be exchanged in real time and updated with minimum delay, software oracles are the most typical type.
Less commonly used in blockchain systems, hardware oracles can receive data from the physical world, i.e. from scanners, sensors and other devices, and then translate it into a language that smart contracts can understand. This is useful for traffic, supply chains, and other types of tracking. In our decentralized Uber example, the satellite would be an example of a hardware oracle.
The most secure of all the oracle types, consensus-based oracles gather their data from several sources, process and verify it. They are believed to be the future of oracles since they provide reliable and trustworthy information at all times.
Inbound and outbound oracles
Exactly like it sounds, inbound blockchain oracles receive information from external sources and transfer it to a smart contract. And you guessed it — outbound ones do the exact opposite. All oracles, whether software, hardware, or consensus-based, are either inbound or outbound.
It’s obvious when we would use an inbound oracle: they take care of such information as cryptocurrency rates or capitalization. But when does outbound come in handy? They are usually used when a smart contract distributes coins: when rewarding, in a dispute, or completing any other transaction.
In order to execute a smart contract, the blockchain network uses an oracle to verify the conditions as well as provide the information needed to execute the smart contract altogether. Networks that operate with various oracles offer even more layers of security as the blockchain networks can access and compare data from each oracle to ensure that the decentralized data streams are truly decentralized. The blockchain connects to the external oracle data via simple APIs.
To expand on our decentralized Uber example, let’s first discuss what GPS is — simply a protocol that coordinates geospatial data on devices. Phones, watches, and now even sunglasses carry GPS trackers. But how can we trust that we are actually where our devices say we are?
Currently, web2 apps do this by trusting in single points of failure, such as Google Maps or Uber. If Google Maps or Uber are wrong or fail for any reason, then the data given is inaccurate. On web3, Oracles like ORAO solve this problem by allowing decentralized sources — like our own mobile devices — connected to each other via bluetooth with an app like Nodle. Your location, using context provided by other anonymous devices around it, is verified without having to actually share your location with a centralized party that can track you.
You may be surprised to find out that oracles are not only used by DeFi services — centralized services also use them. The main difference is: centralized oracles are controlled by one legal entity or individual, and are the only provider of information for a smart contract.
It’s a risk using only one source, since then the contract and its effectiveness depend entirely on that one source. Meaning that any hack to it will have a direct impact on the smart contract. Centralized oracles present a single point of failure, which makes contracts more vulnerable and less resistant to attacks.
Decentralized oracles, like a public blockchain, do not get rid of the need to trust someone, but rather distribute it among multiple participants. They make data extremely reliable by gathering and checking it through multiple different sources.
Here’s how it works: a smart contract requests information from several oracles at once in order to determine the validity and accuracy of the data. Blockchain oracles transmit the requested data to a smart contract and make sure it executes its function.
To summarize, centralized oracles use only one data source and are controlled by a single center, thus are more vulnerable to inaccuracies and attacks. Decentralized ones request data from multiple sources and compare them, making the data more accurate and secure.
Decentralized finance relies on accurate, verifiable data. Services like lending, derivatives, insurance, and trading all require data on the prices of various digital assets. Without accurate data, the smart contracts these services use would not be executed properly.
Say you want to borrow $100 worth of an ERC-20 token with your ETH at a 300% collateral ratio, at that rate you would need $300 in ETH for a $100 loan (yes, many Defi loan platforms require collateral ratios that high), the lending platform needs to know the price of the token as well as the price of ETH to correctly calculate the collateral. It would use a blockchain oracle to collect data on token prices from various crypto exchanges to provide one accurate price. If either price is wrong, so is the collateral ratio, so the accuracy of this external data from the exchanges is necessary.
The ability to access external data greatly increases the functionality of smart contracts and decentralized applications. It is also important to understand that oracles are not a source of information, they simply collect and then provide data.
First, oracles collect external data and validate it. This data can be any condition of a smart contract: the value of a coin, a payment, or the current state of the blockchain network. At this point, the oracle’s task is to select the right information and make sure that it is correct. For example, choose the current cryptocurrency rate from among dozens of quotes from different trading platforms.
Then, the oracle reaches its second important function — it must transmit that data in the correct format so that different systems (blockchains, decentralized applications, marketplaces, IoT devices, etc.) can interact with each other.
Unfortunately, blockchain networks do not have the ability to communicate with the outside world. But thanks to oracles, blockchains can communicate through reliably data inputs, and thus be compatible with the outside world.
The Pontem Operating System (OS) is a great example of a bridge that helps blockchains and other networks communicate. It can be added to a Dapp to allow developers to use the Pontem Platform, which enables the Dapp to add software services (SaaS). These SaaS can be things like oracle services from ORAO or node services from Pinknode, which allows you to compile the byte code of different blockchains within the Polkadot, Ethereum, Diem, and in the future, more blockchain ecosystems.
To fully understand how an oracle works, let’s use an example. Suppose Alice and John want to predict who’s going to win the 2020 World Series. Alice thinks the Tampa Bay Rays will win, while Bob is sure the Los Angeles Dodgers will bring it home. They create a smart contract that will determine the winner based on the match results.
Since the smart contract cannot interact with external data sources, it is completely dependent on various oracles from trusted organizations like the MLB itself, ESPN, and even reputable fans and referees that were at the game to provide it with the necessary information. In this case, the result of the championship.
Once the last game has finished, the oracle submits a request to the trusted API to find out which team won, and transfers this information to the smart contract. The contract determines whose prediction was right, depending on the outcome. There would be no way for the smart contract to do this without without a manual data entry from a human if the oracle didn’t collect and relay data packets.
The main challenge with oracles is that the smart contract directly depends on the oracle to function properly, and if the oracle isn’t correct, this affects the outcome of the smart contract. This is often referred to as the “oracle problem”. Since smart contracts make decisions based on the data oracles provide them, they are the key to a healthy blockchain ecosystem.
Oracles have no influence over public blockchain consensus, therefore they aren’t part of the security mechanism. However, the problem is that smart contracts on blockchains cannot verify that the information from the oracle is correct. This blind trust could result in the unreliable execution of smart contracts. It’s not all the time that oracles are incorrect, but this is still an issue that is currently being worked on in the industry. In the future, through decentralization and the redundancy of using multiple oracles and data providers, blind faith will not be an issue.
A hacking attack can also pose a threat if the attacker gains access to the data being transferred between oracles and a contract, and they modify or falsify the data being transmitted. So while oracles are necessary for a blockchain to run smoothly, they also leave places where manipulation can occur. But even though oracles face challenges such as incorrect data or man-in-the-middle attacks, there is a light at the end of the tunnel through decentralization and the redundancy of multiple oracle providers.
Despite the possible drawbacks, oracles are still in high demand in the DeFi sector because they are essential to data providers and many blockchain startups.
Many of the projects that use smart contracts develop their own oracles. But even they need decentralized solutions for some tasks. Also, the use of a third-party oracle allows you to concentrate your attention on your main product, which is always a great idea.
Chainlink is a recognized market leader, one of the first oracles to distance itself from competitors. Chainlink has partnerships with major industry leaders such as Kyber Network, Fulcrum, Opium Network, and Synthetix, among dozens of other projects.
Chainlink oracles run on Ethereum as a decentralized network of nodes under centralized control. They receive data from several sources, and then that information is checked by a special algorithm to prevent manipulation attempts to the oracle. The Chainlink protocol has effectively become the industry standard for the DeFi sector.
And since Chainlink has an open source code, the blockchain community can independently check its security and reliability, as well as make proposals to change it.
Band Protocol is another decentralized oracle, similar in many ways to Chainlink. But unlike most of the Ethereum oracles, it runs on the Cosmos Network, a system of interconnected blockchains that could be considered the backbone of the decentralized Web 3.0 internet.
Band Protocol also has a different way of connecting to the blockchain. While Chainlink uses external modules to communicate with the blockchain, the Band Protocol solution allows blockchains to communicate with each other directly. One of the disadvantages of the Tendermint technology, on which Cosmos and, consequently, the Band Protocol are built, is that the oracle unconditionally trusts the received data. The developers are aware of this problem and intend to fix it in the near future.
Nest Protocol is a Chinese oracle solution, whose developers position it as the only oracle that verifies external data using validators. Since the project is decentralized, all settlement systems are transparent and the community has influence over the choice of information sources. Currently, the Nest Protocol is mainly used in the Chinese market and has not gained widespread acceptance in the West.
Tellor is a decentralized pricing oracle that aims to become the industry standard for decentralized applications (dApps). Data is confirmed by validators who receive tokens for doing so, but if the information used is disputed, they will lose them. The project is so decentralized that the developers have even destroyed their admin key.
DOS Network is a decentralized oracle that pays great attention to the computing power of its network. Like other projects, the developers position it as an ideal solution for various use cases and industries, such as derivatives, crypto lending, gambling, insurance, and cloud computing.
ORAO is a decentralized oracle that supports general data, including non-financial data, which accommodates a plethora of other industries that include finance, but also esports and weather. What further sets ORAO apart from other decentralized oracles is that their rating system is proactive. With the help of machine learning, data provided is checked against past accuracy from that provider as well as data provided by others. This way, bad data is never delivered to the buyer in the first place. And lastly, ORAO is very versatile because it is built for Polkadot, which means that there is cross-chain support so you can use ORAO oracles with many other chains.
As you can see, the general trend for the developers of oracle solutions is greater transparency and decentralization. To let you see the whole picture, we’ve created a table comparing the main features of the oracles we mentioned above.
Even though Facebook or the Diem Association have not made any official statements on the matter, we believe that it’s almost inevitable that Diem will integrate with various blockchain oracles.
However, we cannot guess as to which oracles Facebook will decide to use, and it’s highly likely they will choose centralized ones within the network of companies in their ecosystem. They are provided by larger organizations and thus, might seem more trustworthy to the Diem team. Yet, even though centralized oracles seem secure at first glance, the reality is that they can be hacked rather easily.
For this reason, Diem users might want to look into using a third-party service to add extra security. It’s likely the centralized oracle will be a reputable one that is trustworthy, but for those users who are looking to supplement Diem’s security, a good example of such a service is Pontem Network, which provides Dapps with access to multiple decentralized oracles. This way, Dapps won’t have to rely solely on the centralized oracle in Diem’s ecosystem; by adding the ability to access decentralized oracles, Pontem provides additional security through redundancy.
The global adoption of blockchain technology is inevitable, but first a reliable mechanism that facilitates communication between smart contracts and the outside world is needed. Especially for projects that have garnered as much hype and promise as Facebook’s Diem Blockchain.
With the help of oracles, smart contracts on any blockchain — whether permissioned like Diem or public like Ethereum — can rely on various data from outside of their respective blockchain, which significantly expands their capabilities.
Decentralized oracles hold great potential for introducing defense mechanisms that could eliminate risk from the blockchain ecosystem and unlock new use cases for decentralized apps (dapps). Pontem will bridge public and permissioned blockchain ecosystems to enable decentralized oracle services for dapps operating on Facebook’s Diem Blockchain.
The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.
A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!
Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.