Chainlink has realized data aggregation at the data source, node operator, and oracle network level, providing more reliable price data for DeFi applications.
Original title: “One article to understand the three data aggregation layers of Chainlink price feed”
Written by: Chianlink
Smart contracts determine the way the on-chain protocol processes user funds, and the oracle connects to off-chain data sources to provide authoritative facts for the on-chain smart contracts, and ultimately trigger the transfer of funds. Off-chain events and on-chain contract logic together form a complete contract process. Therefore, to smoothly execute smart contracts, the oracle is as important as the underlying code.
The DeFi protocol usually needs to connect to market data to trigger on-chain events, the most important of which is asset price data, in addition to various types of data such as the market value of cryptocurrencies, exchange rates, and asset mortgage token reserves. These feed prices will be transmitted to smart contracts to trigger key on-chain activities, such as liquidating mortgage loans, providing fair market exchange rates for synthetic asset trading pairs, or using automated trading strategies to rebalance asset portfolios.
Chainlink price feed is currently the most mainstream price oracle solution in the DeFi market, guaranteeing billions of dollars in value for various mainstream and emerging agreements such as Aave, Synthetix, and Year. Chainlink price feed is pre-compiled to provide the most secure and reliable price oracle service for DeFi applications, and to ensure data quality to the greatest extent. Chainlink has achieved decentralization at the oracle node level and data source level. It strictly screens secure node operators and high-quality paid data sources to ensure that the performance and reliability of the oracle can be verified on the chain, and it has also established Encrypted economic incentive mechanism guarantees safety.
In this article, we elaborated on the three types of data aggregation involved in the price feed update, namely at the data source level, node operator level, and oracle network level, and discussed the data quality and oracle security of Chainlink price feed. . Each Chainlink price includes multiple data aggregation layers. Once you understand these three aggregation layers in depth, it is not difficult to understand why Chainlink can successfully guarantee the security of such a large-scale DeFi fund.
The basic flow chart of encrypted currency price data transmission to the on-chain DeFi application
Aggregate at the data source level
The first component of Chainlink price feed is the off-chain data source. The Chainlink oracle connects to the data source and obtains price data. The original price data usually comes from off-chain centralized trading platforms such as Coinbase and Binance, and on-chain decentralized trading platforms such as Uniswap and Kyber. Data aggregators such as BraveNewCoin and CoinGecko collect raw price data from these trading platforms and further process them into data sets, such as weighted calculations based on transaction volume, liquidity, and time difference, and eliminate outliers, filter out false transaction volumes, and monitor trading platforms “Downtime” event. To ensure reliable price data sources, it is necessary to fully cover each market, so that price points can reflect the comprehensive situation of all trading environments, rather than one-sidedly reflect the price of a trading platform or a small part of the trading platform. In this way, it can effectively prevent the price from being manipulated or the price deviation caused by the transfer of transaction volume to other platforms.
In order to fully guarantee the tamper-proof modification and reliability of data, Chainlink only obtains data from high-quality paid data aggregators. In other words, each data source used by Chainlink feeds fully covers all centralized and decentralized trading platforms, and adjusts based on transaction volume and finally aggregates price data, so it can effectively resist lightning loans or abnormal price deviations And other types of attacks.
Aggregate at the node level
In addition to the data source, the Chainlink price feed also includes multiple oracle node operators, each of which will send an on-chain response. These node operators are all run by professional DevOps teams that have extensive experience in running key blockchain infrastructure and guarantee billions of dollars in value on the chain. They are responsible for running Chainlink core software, obtaining off-chain market data, and transmitting it to the blockchain.
Node operators in Chainlink price feed will obtain price data from multiple independent data aggregators, take the median of the data, eliminate outliers, and ensure API interface connectivity. Therefore, not only does each data source fully cover all trading environments to aggregate price data, but each node aggregates data from multiple data sources and transmits it to the chain, which can better avoid single points of failure.
Chainlink node operators obtain data from multiple data aggregators and take the median
Converge at the oracle network level
The third component of Chainlink’s price feed is the entire oracle network. The oracle network determines how a group of nodes work together to generate a reference data point on the chain. This usually requires aggregating the response data of all nodes. The most common aggregation method is to take the median of the data when the number of response nodes reaches a preset value. In addition, there are many different aggregation methods, and you can choose to aggregate on-chain or off-chain, depending on the throughput and cost of the underlying blockchain network.
Chainlink has aggregated the response data of many nodes, and these nodes have undergone security assessments. The aggregation method is to take the median when the number of response nodes reaches the preset value to trigger the price update on the chain (for example, in the example below, at least 14 nodes out of 21 nodes respond). This aggregation mechanism guarantees the overall running time of the oracle network, and effectively prevents data from being manipulated during transmission to the blockchain, and can even prevent extreme situations such as several nodes or data sources going offline or launching malicious attacks.
Chainlink ETH/USD price feed oracle network
Chainlink price feed has realized data aggregation at the data source, node operator and oracle network level, so it can provide the most secure and reliable price data for DeFi applications and help it manage user funds. Because of this, Chainlink price feed has become the most mainstream and safest on-chain price data source in the DeFi economy, guaranteeing billions of dollars in value on the chain.
The concept of safety and reliability has penetrated into all levels of the Chainlink network. Applications that are connected to Chainlink can safely execute smart contracts and expand steadily to ensure greater value for users.
Source link: blog.chain.link
Disclaimer: As a blockchain information platform, the articles published on this site only represent the author’s personal views and have nothing to do with ChainNews’ position. The information, opinions, etc. in the article are for reference only, and are not intended as or regarded as actual investment advice.





