By Jonny Fry - Digital Bytes
What are they?
Blockchain oracles are entities that connect blockchains to other systems. Oracles allow smart contracts to run, based on inputs and outputs of the real world. Oracles enable the decentralised Web3 ecosystem to access and leverage pre-existing data sources, legacy systems and complex calculations. The creation of hybrid smart contracts, which integrate on-chain code with off-chain infrastructure to facilitate cutting-edge. Apps that respond to real-world events and integrate with legacy systems, are a function of the Decentralised Oracle Network(DON).
Source: Blockgeeks.com
Types of blockchain oracles
Oracles on the blockchain may be broken down into subcategories based on factors such as their reliability, how
they disseminate data and the authority of their sources. One and the same oracle may fit into several different types.
· softwareoracles
Software oracles connect to online information sources and send the information to the blockchain. This
information can come from online databases, servers, websites or any other web data source. Software oracles connected to the internet can give smart contracts information and send that information in real time. Because of this, they are one of the most common kinds of oracles on the blockchain. They usually give out information such as exchange rates, the prices of digital assets or real-time flight information.
· hardware oracles
Some smart contracts have to interact with the outside world. Hardware oracles are made to gain information
from the real world and give it to smart contracts. Electronic sensors, barcode scanners and other devices that can read information could send this information. A hardware oracle "translates" events in the real world
into digital values that smart contracts can understand.
· inbound and outbound oracles
Oracles connect to blockchains, allowing for bi-directional data exchange. In contrast to outbound oracles, which can share blockchain information with the rest of the world, inbound oracles are more likely to
share information from the actual world with the blockchain. Also, the imported data can stand for almost
anything - from asset price fluctuations to weather reports or to confirmation
of completed payments.
· decentralised and centralised oracles
A centralised oracle is run by a single group and is the only data source for a smart contract. Obtaining information from only one source can be risky because the effectiveness of the contract depends on the person in charge of the oracle. The main problem with centralised oracles is that they have a single point of failure, which makes contracts more likely to be attacked or have flaws. Some of the goals of decentralised oracles are the same as those of public blockchains - for instance, reducing the risk of the other party. In the same way, they make it easier for smart contracts to trust the information they receive because it does not come from just one source. The smart contract asks several oracles about the validity and accuracy of the data. This is why another name for decentralised oracles are consensusoracles. Some blockchain oracle projects offer decentralised oracle services that other blockchains can use.
Source: chain.link
· human oracles
People with a breadth of knowledge in a specific field can sometimes act as oracles. They could get information
from different places, check to see its validity and put it into smart contracts. Because human oracles can use cryptography to prove who they are, it is unlikely that a crook will pretend to be them and give them wrong
information.
· contract-specific oracles
A contract-specific oracle is made to be used by a single, smart contract. If you want to use more than one smart
contract, you must complete the same number of contract-specific oracles. This method may not work well for companies that require information from many places. On the other hand, developers have a lot of freedom to make contract-specific oracles fit specific needs because they can be made from scratch for a particular use case.
· computationoracles
Instead of only transmitting the results of a query, computation oracles may be used to perform calculations on
a set of inputs and produce a response that would be difficult to compute on-chain. For instance, a computation oracle may be used to do a computationally intensive regression calculation to determine the yield of a
bond contract.
Use cases of blockchain oracles
Smart contract developers use oracles to make more advanced decentralised apps that can be used in a broader
range of blockchain scenarios. Even though there are infinite possibilities, here are the most used:
· NFTs and gaming - oracles allow smart contracts to be used in contexts outside of finance such as with non-fungible tokens (NFTs), whose appearance, value and distribution can all vary depending on factors such
as the time of day or the weather. Compute oracles are also used to produce
verified randomness, which projects then employ when allocating NFTs with
randomised features, or picking winners randomly during high-volume NFT drops.
Verifiable randomness is used in on-chain gaming applications such as the emergence of random prize boxes or randomised matching during a tournament, to make the gaming experience more exciting and
surprising.
· Decentralised finance (DeFi) - oracles are used extensively across the DeFi ecosystemto access asset and market data. For instance, decentralised money markets may consult price oracles to ascertain whether or not a user's position is under-collateralized and so liquidated. In the same way, automated market makers (AMMs)employ price oracles to help concentrate liquidity at the current market price, and synthetic asset platforms anchor token values to underlying assets.
· insurance- by allowing access to physical sensors, WebAPIs, satellite imagery and legal data, insurance smart contracts may validate the presence of insurable events throughout the claims processing phase. Insurance claims can be paid out of alternative blockchains or conventional payment systems, which can be accessed through output oracles.
· enterprise- businesses may use cross-chain oracles to link their back-end systems to any blockchain network, which provides safe blockchain middleware. This way, corporate systems may execute complicated reasoning on deploying assets and data across chains and with counterparties using the same oracle network. They can read/write to any blockchain. Consequently, businesses do not have to waste time and resources integrating with each blockchain to gain access to the ones in great demand among their counterparties and provide the smart contract services their customers desire.
· sustainability- by improving incentives to engage in environmentally responsible behaviour and facilitating more precise verification of the genuine impact of green activities, hybrid smart contracts are paving the way for a more sustainable future for our planet. With environmental data gleaned from sensor readings, satellite photos and powerful MLcomputing supplied by oracles, smart contracts might compensate those who engage in reforestation or mindful consumption. Oracles are also promoting several novel kinds of carbon credits
to counteract the results of climate change.
Advantages of blockchain oracles
Blockchain oracles have several advantages regardless of their use. Some essential factors in blockchain
oracles' meteoric rise to fame include:
· empowering the blockchain with new features
A blockchain oracle exposes the blockchain to the actual world. Oracles supply complex blockchains with
external data. A blockchain may acquire data from several sources via an oracle. They simplify blockchain's use in retirement planning, decentralised apps and financial tokens.
· limitless uses thanks to variable parameters Oracles are infinitely adaptable because of the wide variety of forms they take. Almost every desired function may be programmed into an oracle. The oracle may just provide information or interact with the blockchain on behalf. One of the main attractions of using an oracle is the amount of leeway they offer you. They are versatile and easy to modify for your specific purposes. Unlike many other blockchain
technologies, implementing the most comprehensive and sophisticated oracle requires little technical
expertise.
· reduction of effort and save time
Oracles decrease blockchain user intervention. Instead of wasting time deciding what to do, oracles can help. An
oracle can execute smart contracts in response to an external event. They are semi-automated and can conduct ordinary transactions without your supervision, though not sophisticated ones. An oracle can be to automatically buy tokens when a cryptocurrency's price lowers or direct the game's blockchain to produce a new
NFT for each participant.
Disadvantages of blockchain oracles
The above are fine approaches to"the oracle problem," but they are not without flaws. When deciding
whether or not to employ a blockchain oracle, it is essential to be aware of a fundamental drawback:
· wrong information may cause serious errors
Blockchain oracles are safe, but your oracle depends on your input - accidental or purposeful errors might lead to
undesirable oracle results.
Ultimately, the incorporation of external data is essential to the successful execution of smart contracts, and
this is where oracles come in. Contrarily, oracles provide a significant threat since, if they are trusted sources and are vulnerable to hacking, they can put at risk the execution of the smart contracts they feed. In general, the trust model must be carefully evaluated when hiring an oracle. If we assume the oracle can be trusted, the smart contract may be vulnerable to attacks because it will accept inputs that may be wrong. On the other hand, however, oracles can be helpful if the underlying security assumptions are well-examined.
This article first appeared in Digital Bytes (30th of November, 2022), a weekly newsletter by Jonny Fry of Team Blockchain.