An oracle is a blockchain participant, service, or mechanism that feeds data into smart contracts using off-chain sources that don’t exist on the blockchain. Most prominently, oracles enable decentralized apps (dApps) and DeFi protocols to have access to external information, like crypto token prices, exchange and interest rates, market data, etc.
For instance, an oracle might be used by a lending protocol to automatically adjust its liquidation position rules depending on externally received information, such as cryptocurrency prices dropping below a predetermined threshold.
Oracle data collection is extensive and involves the gathering of data from multiple sources. Once obtained, this information is broadcast on the blockchain, facilitating the execution of predetermined actions by smart contracts. By relying on more than one source, decentralized oracle networks reduce the likelihood of inputting inaccurate information and transmitting it to the blockchain. That said, oracle failures or inputting the wrong information can result in increased risks for DeFi protocol users.