Smart contracts define the ways in which user funds can be handled by an on-chain protocol, while the oracle is the source of off-chain information that definitively decides how those funds will ultimately be transferred. External events and the on-chain contract logic come together to form a complete contractual process, which makes the oracle mechanism just as critical to proper execution of a smart contract as its underlying code.
DeFi protocols often depend on market data to trigger on-chain events, particularly the price of assets, but also other types of information like total crypto market cap, FX rates, and the reserve balances of asset-backed tokens. These price feeds are used by the smart contract to execute important on-chain actions involving user funds, like whether or not to liquidate a collateralized loan, the fair market exchange rate for a synthetic asset swap, or when to rebalance a portfolio that uses an automating trading strategy.
Chainlink Price Feeds have become the most widely used price oracles in the DeFi market, already securing billions of dollars in value for leading and emerging protocols such as Aave, Synthetix, and Yearn. Chainlink Price Feeds have been purpose-built to provide DeFi applications with the maximum amount of price oracle security, reliability, and data quality. These properties are generated through a variety of design choices like decentralization at the oracle node and data source levels, selection of secure node operators and premium data sources, provable on-chain performance and reliability, and crypto-economic incentives for security. To get a much more in-depth look into Chainlink Price Feeds, read our deep dive on the importance of data quality for DeFi smart contracts.
In this article, we examine the data quality and oracle security of Chainlink Price Feeds by focusing on the three types of aggregation that take place for each price update: at the data source, node op...