Blockchain oracle
A blockchain oracle is a third-party service for smart contracts. Oracles provide trusted information based on the outside-world sources to the on-blockchain smart contracts. An oracle typically encapsulates the real-world complexity outside of the blockchain. This provides different engineering advantages, chiefly that critical errors and potential points of failure are easier to mitigate off-chain than on-chain.
For example, in a contract to automatically purchase bitcoins at a predetermined price, the fulfillment condition is based on the current exchange rate for the bitcoin; an off-chain oracle can constantly monitor the price to provide the triggering condition to the contract.
Examples
Kustov and Selanteva list the following types of oracles:- a program, external to the blockchain that can provide, for example, sports results for betting or traffic camera information for ticketing the offenders;
- a unit oracle that is built-in into a physical sensor ;
- an entry oracle executes the code that is actually stored on-chain and provides the result as an input to the contract;
- an exit oracle handles the results of the smart contract by manipulating a real-world device. Its code can also be stored on-chain;
- an oracle agreement is an aggregator of many oracles to determine the condition when the real-world oracles disagree.
Concerns