This page describes how data aggregation is applied to produce Chainlink Price Feeds.
Each price feed is updated by multiple, independent Chainlink oracle operators. Aggregation is handled on-chain by
Each price feed is built and funded by the community of users who rely on accurate, up-to-date price data in their smart contracts. As more users rely on and contribute to a price feed, the quality of the price feed improves. For this reason, each price feed has its own properties depending on the needs of its community of users.
Each price feed is updated by a decentralized oracle network. Each oracle operator is rewarded for publishing price data. The number of oracles contributing to each feed varies. For example, in the ETH/USD Price Feed, there are 21 oracles.
In order for an update to take place, the price feed contract must receive responses from a minimum number of oracles. For example, 14 / 21 oracles. Otherwise, the latest answer will not be updated.
Each oracle in the set publishes answers to the latest price of an asset during an aggregation round. The answers are validated and aggregated by a smart contract, which forms the feed's latest and trusted answer. Developers wishing to use an asset's latest and trusted answer can do so easily by following the Get the Latest Price page.
Each aggregation round is triggered based on one or more aggregation parameters. Whichever condition is met first will trigger a price update
A new aggregation round starts when a node identifies that the off-chain price deviates, by more than the deviation threshold, of the on-chain price. Individual nodes monitor one or more data providers for each feed.
A new aggregation round starts after a specified amount of time from the last update.
All source code is open source and available in our Github repository.
A Consumer contract is any contract that uses Chainlink Price Feeds to consume asset price data. Consumer contracts simply reference the correct
AggregatorV3Interface and call one of the exposed functions.
... AggregatorV3Interface feed = AggregatorV3Interface(address); return feed.latestRoundData();
Learn how to create a consumer contract to Get the Latest Price of an asset.
Proxy contracts are on-chain proxies that store the most up-to-date Aggregator for a particular price feed. Using proxies enables the underlying Aggregator to be upgraded without any interruption of service for consuming contracts.
AggregatorProxy contract on Github.
Aggregators are the contracts that receive periodic price updates from multiple Oracles. They aggregate and store the current price on-chain so that consumers can obtain the latest price and act upon it within the same transaction.
This data can be accessed by referencing the Price Feed address using the
To learn how to consume Price Feed data, see Get the Latest Price.
Updated 3 months ago
|Get the Latest Price|