ChainLinkGod Podcast - Exploring Chainlink Services With ChainLinkGod: Price Feeds
Primer: What are Chainlink Price Feeds and why are they important? ChainLinkGod takes beginners through the basics of Chainlink Price Feeds and their features.
Scope
Starting a beginner series exploring various Chainlink Oracle services
Aim is to explore the basics and to dive into some of the nuances
Focus of this episode is on Chainlink Price Feeds
Chainlink Price Feeds
Chainlink Price Feeds are decentralized Oracle networks that deliver financial market data onto blockchain networks
Comes in the form of exchange rates (e.g. price of Bitcoin/USD, price of gold/Euros, etc.)
Blockchains cannot access off-chain data on their own. They require Oracles to connect the smart contract apps to the data that they require to execute
Financial market data is widely used in Decentralized Finance (DeFi) apps
Chainlink price feeds are blockchain agnostic
Growth Of Chainlink Price Feeds
Two years ago, Chainlink launched with only a single price feed
Today, there are over 700 Chainlink price feeds that have delivered over 700 million data points on-chain
How Do Chainlink Price Feeds Work?
There are multiple layers of aggregation
Can think of it as a layered stack:
At the bottom, there’s the raw exchange data
Above it, there’s the data source layer. This consists of professional data aggregation firms that aggregate market data from across CEXes and DEXes. Financially incentivized to provide highly accurate and reliable data as their business model revolves around this
Above this, we have the Oracle node layer. This layer consists of high quality, Sybil-resistant Chainlink nodes that fetch data from multiple aggregators and take the median value. These nodes have a proven on-chain reputation of providing reliable data for long periods of time, even during extreme blockchain network congestion and market volatility
Above it, we have the Oracle network layer. This is a collection of multiple Chainlink Oracle nodes that actually aggregate their data together off-chain into a single Oracle report that is then delivered on-chain
Finally, we have the on-chain reference contracts, which is a smart contract that stores the data delivered on-chain by an Oracle network for a specific piece of data (e.g. ETH/USD feed, BTC/USD feed, etc.)
Publishing Of Oracle Updates
Has 2 different models that are used in tandem
Deviation threshold — the percentage difference that the off-chain price of an asset needs to move compared to the previous update before a new Oracle report is published on-chain
The heartbeat — the longest amount of time since the previous update before a new on-chain update is triggered
The combination of both methods ensure that price feeds reference contract is rapidly updated with fresh data during market volatility while keeping costs down
Higher speed blockchains and layer 2 solutions are able to support price feeds that update at a higher frequency on average
Funding Of Chainlink Price Feeds
Funded through a combination of an Oracle reward subsidy and the aggregation of user fees
At launch, a new Chainlink price feed is bootstrapped through the Oracle reward subsidy like a blockchain’s block reward
As adoption of a given Chainlink price feed increases, the amount of fees being paid into this network grows, reducing reliance on the subsidy for that feed
Users never pay the full cost for the feed because of the Oracle reward subsidy and the shared cost model of the reference contract (e.g. if 100 users need the ETH/USD exchange rate, the cost is split between them. Hence, there are economies of scale as users increase)
Previously, each node will generate their own transaction to submit their data points on-chain. Earlier this year, Chainlink launched their Off-Chain Reporting (OCR) model, lowering gas costs by 90%
OCR is a protocol that enables the off-chain aggregation of data using a peer-to-peer distributed network. With each Oracle update, nodes aggregate their observations and cryptographic signature off-chain into a single Oracle report, which is then delivered on-chain by a randomly selected node
If the randomly selected node fails to deliver the Oracle report on-chain, a round-robin process is kicked off and another node is selected to deliver the report on-chain
Conclusion
The architecture of Chainlink price feeds enables some key properties:
Market coverage
Tamper resistance
Reliability
All information presented above is for educational purposes only and should not be taken as investment advice. Summaries are prepared by The Reading Ape. While reasonable efforts are made to provide accurate content, any errors in interpreting and summarizing the source material are ours alone. We disclaim any liability associated with the use of our content.