This article was written a few months ago in a memo. After confirming with @Chainlink_INFO 条子哥, the graph of Chainlink was adopted.
Abstract:
The function of the oracle machine is not only to "feed" the data of the traditional world, such as DEX price data, competition result data, weather data, and the real-time price of the algorithm stabilized currency.
Link2.0 can also make "under-chain computing" of Link multi-nodes, which is called oracle machine computing. This kind of computing is carried out under the chain. Since it is under-chain, TPS performance and computational complexity are not problems. However, it is different from the traditional Internet computing. It is between Web2.0 and on-chain computing-its performance and function are not limited by the performance of the public chain on the chain, and it is more tamper-proof and transparent than the traditional Internet on blockchain.
Oracle machine operation can be roughly realized: Hybrid intelligent contract, cross-chain (CCIP cross-chain interoperability protocol proposed by link), under-chain centralized operation and so on.
The main components or products include: Keepers (transaction automation solution), verifiable random function (VRF), under-chain report, external adapter and CCIP.
Introduction:
The Problem of Oracle machine——Why Need Oracle Machine; The data of blockchain is on-chain. The data on-chain only runs in its own circle, but in the real world, there are more data under-chain. The data and events are richer, so the chain needs to obtain these data. If you need to obtain these data on the chain, you need an oracle machine to provide it. The oracle machine network is decentralized and prevents false tampering, and is a fact rather than a fabrication. This is Link1.0. The so-called decentralized oracle machine network——DON (Decentralized Oracle Network) has hundreds of different nodes.
DON(Decentralized Oracle Network)
Because there are so many different nodes, this decentralized oracle machine network of link can not only provide the function of "feeding the real data needed on the chain", but also realize the calculation function under-chain.
Link's decentralized oracle machine network uses decentralized infrastructure, which can avoid errors and failures of a single node, and ensure the authenticity and objectivity of under-chain calculation by means of multi-node calculation, encryption verification and on-chain pseudo-verification.
If the authenticity of these under-chain calculations is verified, various incentive mechanisms can be designed to enhance transparency and evil tracing.
Because it is an under-chain architecture and is not limited by the on-chain infrastructure, DON can have higher flexibility and support more complex operations. Flexibility can flexibly adjust the schedule/event arrangement, decentralization degree, security level, range of participating nodes, and whether it is suitable for other systems under-chain.

Specific cases: Chainlink Keepers
Link calls it a transaction automation scheme, and I think it can be understood as a monitoring trigger or guardian of events under-chain, which is more in line with the word keeper. When time, price, weather, etc. meet pre-set conditions such as time exceeding 24 hours, price below $1, rain today, etc., keepers automatically notifies the chain, wakes up the contract to execute an instruction on the intelligent contract, such as triggering the liquidation of mortgage loans, such as executing the additional issuance of algorithms to stabilize coins, such as settling weather forecasting market betting products, etc.
Keepers will encrypt and sign the results sent by the node to the chain, and trace back if the node does evil. The node selection adopts fault automatic switching mechanism, and if a random node does not respond, it automatically switches to the next node.
Because the trigger action and logical calculation action are first completed under-chain, the calculation cost on the chain is greatly reduced, the dapp development team does not need to perform the calculation task manually or with a centralized server, and it is also possible to support more complex calculation scenarios and application scenarios under-chain. Only the final "execution" action is completed on the chain, and the "judgment" is completed under-chain.

Verifiable random function (VRF)
Simply put, this is a random function generator. VRF calculates random functions under-chain and proves encryption, then verifies them on the chain, and finally sends them to the intelligent contract on the chain. If the random function has been tampered with, the previous encryption certificate will not be accepted, and the intelligent contract on the chain can be verified by encrypted signature before using the random function.
Common application scenarios of VRF include: Fair distribution of scarce attributes in mint NFT, blind box unpacking, introduction of fair randomness in lucky draw, fair and random matching of opponents by players in chain game PVP, etc.

Reporting OCR and external adapters under-chain
Adopting P2P network architecture, OCR is an under-chain oracle machine network. If the aggregation calculation of multiple transactions is needed in the chain, the data can be aggregated into a report under the OCR chain, and then the report can be sent to the chain with only one transaction by random nodes, while the nodes will adopt rotation and automatic fault switching mechanism, and the sent reports are encrypted and signed to prevent evil traceability (described earlier). Originally, multiple calculations on the chain only need one transaction after aggregation calculation under-chain, and the gas cost is greatly reduced.
OCR+ external adapter, which extends the data types and calculation types that nodes can access. The external adapter connects the node to the encrypted API interface; You can customize the operation mode, such as setting privacy protection level, delay time, throughput and other parameters. Nodes can also use external adapters to perform advanced tasks such as statistical analysis, price index calculation, AI learning and so on. External adapters can also connect intelligent contracts to the cloud or computing resources of big data such as AWS and Alibaba Cloud. (If so, isn't the combination of defi and the traditional financial world possible? How many new application scenarios and derivatives will be derived?)
External adapters provide a framework for developers to access any type of computing resources for intelligent contracts. Make up the functional gap between the existing blockchain and the existing Internet system.

Cross-Chain Interoperability Protocol (CCIP)
This is an open source development standard, which connects various blockchains and provides the underlying protocol for the development of cross-chain bridges and cross-chain applications (similar to L0? ) and ensure the security of cross-chain assets, data and instruction transmission. Get the transaction from one blockchain by calculating under-chain and then reporting, reach a consensus on the authenticity of the transaction under-chain, and then send the result to another chain.
Process: Blockchain A transaction——Report OCR2.0 under link chain——Blockchain B
Anti-fraud network mechanism of CCIP: The nodes in DON and cross-chain nodes are independent and separated. The anti-fraud network uses under-chain oracle machine operation to analyze CCIP network, and once it detects evil (such as double blossom) in the protocol or blockchain, it stops cross-chain. The oracle machine node of anti-fraud network is a third party, not a cross-chain node, which does not participate in fund transfer and supervises the cross-chain process.

Hybrid intelligent contract
Hybrid intelligent contract combines decentralization and tamper resistance running on the chain with under-chain computing provided by DON, so as to realize more advanced functions and more complex application scenarios. In fact, many existing applications are already hybrid intelligent contracts. For example, defi lending application integrates Chainlink Keepers to find out whether the loan mortgage rate is lower than the threshold in time and trigger the clearing function.
It is predicted that computation under-chain will play the same role in intelligent contracts as API plays in Web 2.0 systems today. Dapp developers can access different types of oracle machine data and computing resources for applications, and ensure the security and reliability of applications by trust minimization technology. The role of the oracle machine will be further expanded, which provides any data and computing resources that cannot be obtained in the native blockchain for the intelligent contract on the chain, as well as meets the trust assumption, functional requirements and future planning of the intelligent contract itself.
Other mechanisms for chainlink 2.0:
Fair sorting services to prevent users from running and miners from running arbitrage
Under-chain execution of L2 network, etc
Conclusion:
The core mode of Link2.0 is to build under-chain decentralized oracle machine nodes, and do what can be done under-chain as far as possible and then submit it to the chain or across the chain. The nodes under-chain are also P2P architecture, and the nodes accepted are also random, and there are encryption signature evil traceability mechanism, fault automatic replacement mechanism, etc., and other components or mechanisms such as random function calculation and external adapter are combined to ensure objectivity and authenticity. This idea is feasible considering that the existing web 2.0 itself also has P2P network architecture and more complex data architecture.
The content of this article is taken from Chainlink's official disclosure. Please correct any omissions.
