Data Interaction in Web3 —— Interpreting Oracle Machine: Chainlink

I. Introduction of the Project

Many existing blockchain projects can ensure the transparency and tamper resistance of information on the chain to a certain extent, and with the help of smart contracts, many business logics can be realized in theory. But in terms of data, the mapping between the data on the chain and the data under the chain is always a difficult problem to solve. Even if the data problem is solved, there is still a problem of accuracy. If you want to get the real external data on the chain, you need to use an extremely reliable predictor scheme. In order to solve these pain points, Chainlink came into being.

Chainlink was launched by SmartContract, a financial technology company in San Francisco, on June 20 17. This is a decentralized Oracle project. Its creators are Steve Ellis, Ari Juels and SergeyNazarov, who mainly provide a large number of offline data sources, various APIs and traditional payment services for smart contracts.

ChainLink is a decentralized trading network of Oracle, which connects blockchain smart contracts with real-world data, activities and payment behaviors, and helps smart contracts to securely connect offline data, web API and traditional bank payment systems. Chainlink has successfully provided safe and reliable Oracle services for large enterprises such as Google, Oracle Bone Inscriptions and SWIFT, as well as leading intelligent contract development teams such as Polkadot/Substrate, Synthetix, Loopring, Aave, OpenLaw and Conflux.

Second, the working mechanism

ChainLink is mainly composed of on-chain and off-chain architectures.

Chain architecture consists of three main contracts, including reputation contract, order matching contract and aggregation contract.

The working mechanism of the chain is as follows:

Step 1: Request submission: When the user contract has data requirements, Chainlink sends a data request to Chainlink.

Step 2: Bid. Chainlink's reputation contract bidding user contract.

Step 3: Data request. After the reputation contract receives the confirmation from the user contract, it submits a data request to Chainlink Oracle.

Step 4: Data query and submission: After receiving the request, the data node of Chainlink queries the data, and then submits the query result to the aggregation contract, which aggregates the data and submits the final query result to the user contract, thus completing the user's data query request.

The architecture under the chain consists of many nodes, which are responsible for obtaining all kinds of data needed by users. Among the nodes of Chainlink, the core node is responsible for communicating with the blockchain, accepting data requests on the chain and returning the query structure. The core node divides each data task into small subtasks, and then assigns them to nodes for data query. Chainlink nodes can independently collect disconnection requests and return them to the user contract.

On the economic model, Chainlink has built a virtuous circle ecosystem around LINK token through economic incentives on the basis of realizing the basic predictor principle. Linking Oracle needs to be triggered by the delivery of a link token.

Third, the application scenario

Chainlink connects smart contracts with real-world data and offline computing resources, which greatly enhances the functions of smart contracts while retaining the security and reliability of the blockchain technology core. Chainlink determines who provides Oracle services according to the requirements of smart contract, and calculates the final result by weighting and summarizing the outputs of all Oracle machines.

In digital currency, a stable currency such as USDC or Tess needs a price predictor to anchor its target price (USD); Some synthetic asset products, such as projects in Synthetix and Deri, need real-time prices of stocks and commodities for pricing.

In the field of insurance, insurance companies can use the data provided by Chainlink to provide weather insurance without all the disadvantages and inefficiencies that affect traditional insurance agreements, including fraud, corruption and delay. Corresponding insurance services can also be provided based on corresponding news event data.

In the field of supply chain, according to the bank payment information, GPS geographical location information, logistics information and retail information provided by Chainlink, intelligent contracts established between suppliers, consignees and banks can be executed.

For example, in the field of gambling, the final score of the football match is needed to decide who will win the prize. There are also some contracts for betting on election results, voting results and even judgment results, which need to use the final results after the end of time to determine the implementation content of the agreement.

Random number application fields, such as NFT, serial tour, hyperuniverse and so on. , not only has a great demand for offline data, but also needs a reliable source of random numbers. Especially for chain games, because winning or losing a chain game not only affects the game experience, but also affects the user's property, it is particularly important whether the random attribute is really "random". For example, whether the knives and guns you are equipped with really have a crit rate of 50%, whether the lottery really has a certain probability of winning, and so on.

Chainlink v2 began to provide verifiable random numbers (VRF), which made the probability in gambling, the crit probability in games, the arrangement of purchase order, the extraction of numbers and many other scenes requiring random parameters have credible random numbers, thus ensuring fairness.

Fourth, the development trend.

1, ecology: gradually improving, with diminishing marginal cost effect.

Chainlink has cooperated with more than 60 data providers. At present, official website can provide various types of data, including cryptocurrencies, stable currencies, certificates of deposit, foreign exchange prices, commodities, indexes, as well as Accuweather (weather data), SportsDataIO (sports data), Associated Press (news data) and so on. Open any data, such as the price of crude oil, and you can directly see the data provided by various forecasters.

Chainlink can be compatible with any blockchain, and it is constantly expanding and accessing more blockchain environments. Only at 202 1, Chainlink has access to many top-level L 1 blockchains and L2 expansion schemes, including Arbitrum, Avalanche, BNB chain, Ethereum, Fantom, Harmony, Heco, Moonriver, optimization, Polygon, Starkware and xDai.

202 1, 65438+2, 3 1, Chainlink released the year-end summary, and said that at present, more than 700 decentralized Oracle machines have released data in the production environment of each chain, and the total value of protected assets exceeds 75 billion US dollars, serving more than 2.5 million calculation requests under the security chain.

At present, it also cooperates with more than 500 DeFi applications and more than 200 NFT markets. And Google, Oracle Bone Inscriptions, Intel, AWS and other big companies have cooperation.

From Chainlink's ecosystem and partners, we can find that DeFi is still the most demanding area for Oracle, which mainly includes providing real-time financial data and other relevant market information for a smart contract, such as real estate prices, weather-related derivatives, insurance, etc., which affect the loan mortgage rate. These data sources include new york Stock Exchange and Bloomberg.

These application trends prove the importance of Oracle Bone Inscriptions to the whole blockchain world on the one hand; On the other hand, it can be seen that Chainlink is building itself into a provider who knows offline data best, and its rising share also proves itself with its achievements.

Due to the characteristics of data, the total cost of obtaining a certain data is basically unchanged, but as more contracts call this data, the cost of using the data evenly among the contracts will become lower and lower. This means that Chainlink has a diminishing marginal cost effect, unlike other projects that increase usage and cost.

2. Technology: offline computing and hybrid smart contract.

The launch of the main network of Chainlink Keeper means that Chainlink can not only provide off-line data and random data, but also complete off-line calculation, helping the hybrid intelligent contract to realize a series of rich DevOps services.

Hybrid smart contracts include code running on the blockchain and data and computing resources under the blockchain. It can synchronize two completely different computing environments, create application functions that blockchain or Oracle Bone Inscriptions network can't achieve alone, and combine the unique advantages of these two environments.

The code on the chain runs in an extremely safe and function-limited blockchain environment, with a small attack surface. Users can obtain high certainty when executing and storing, and the code will be strictly executed, and the results will be permanently stored in the chain and cannot be tampered with. DON (Decentralized Oracle network) runs under the chain, so it can realize more functions and access more data more flexibly and efficiently.

At present, hundreds of users are using or actively integrating Chainlink decentralized services such as PriceFeeds, Chainlink VRF and Reserve Certificate, including decentralized derivatives trading projects Deri, Synthetix, liquidity agreement Aave and loan agreement Alchemix.

Take Deri as an example. The index data required for pricing of Deri V3 comes from Chainlink. On the one hand, no matter how big the transaction volume on Deri is, it will not affect the price of the offline index provided by Oracle. On the other hand, Deri has realized the second charge (capital rate), and accurate and efficient Oracle Bone Inscriptions can also provide it with the most real-time price feed service.

Microscopically, Chainlink Keepers will bring brand-new functions to Chainlink ecosystem and help all projects develop more advanced hybrid smart contract applications. However, from a broader perspective, Chainlink Keepers lowered the threshold for web2.0 to leap to 3.0. In the foreseeable future, decentralized Oracle Bone Inscriptions will provide all services that cannot be realized in the chain, which also provides the infrastructure for DeFi's future innovation.

Although the scale of cryptocurrency assets has reached one trillion dollars, and the economic scale of DeFi is close to 1000 billion dollars, the blockchain ecology is still in the early stage of development, and there is still great potential to be tapped. Therefore, the hybrid smart contract and Chainlink distributed Oracle network have great application space and potential.

end

Edit | Leader Element