Oracle, I believe you often hear this word, but in fact not many people care about oracles. When many people hear the oracle for the first time, they may think: "Can it predict a certain time? What will happen in the next stage?” However, oracles are not “prophet” in the true sense, but play a crucial role in the entire blockchain industry. Therefore, in this research report, Spinach and Arnaud will discuss with readers the concept of oracles, their necessity, the evolution of the market structure, and why Chainlink has become the leader in the oracle track. In addition, we will also be watching to see if the recent launch of Chainlink Function will trigger a new wave of innovation and the changes brought about by Chainlink Economic Model 2.0.
Author: Arnaud, a researcher at Web3Caff Research
Thanks to: Frank (Chainlink Technical Community Leader), Xiu Sang (Chainlink Ambassador), and Shaoqing Fu
Word count: This research report is over 16,000 words, and the estimated reading time is 33 minutes
Table of contents
Why blockchain needs an oracle and its principles
Oracle Application Scenarios
Evolution of the Oracle Market
Why Chainlink is the leader in oracle technology
Decentralized Oracle Network
Market trend foresight
Emphasis on developer relations
Can Chainlink Function trigger a new wave of innovation?
What Problems Does Chainlink Function Solve?
Development threshold and node centralization issues
The data of custom calculations is difficult to tamper with and has security issues
Potential Use Cases of Chainlink Functions
Chainlink Economic Model
Chainlink 1.0 Economic Model
Chainlink 2.0 Economic Model
Staking Mechanism
Explicit Incentive Mechanism
Implicit incentive mechanism
New fee model
Expanding Participant Revenue: Chainlink Build
Reducing Service Provider Costs: Chainlink Scale
potential problem
Future Outlook
references
Why blockchain needs an oracle and its principles
The blockchain (public chain) world and the real world are two completely isolated worlds. The blockchain system can be regarded as a deterministic system in which all nodes follow the same rules and protocols to execute transactions and reach consensus. In this process, each node must perform deterministic operations, that is, for the same input data, all nodes will get the same output results. This deterministic operation ensures the effectiveness and security of the decentralized consensus process.
However, when it comes to receiving external data, the situation becomes uncertain. Since external data may differ due to different sources, time and other factors, each node may face uncertain operations when obtaining and processing external data. This uncertain operation may lead to inconsistent data between nodes, thus affecting the consensus process, so the blockchain itself cannot actively obtain data from the outside.
Although blockchain has revolutionary potential in many aspects, especially programmable blockchains like Ethereum, it cannot realize its full value if it is a closed system without connection to the outside world, just like a computer without Internet connection. Only by making blockchain technology truly vibrant, connecting with the outside world so that smart contracts on the chain can access and respond to real-world data, and making smart contracts truly applied in reality, can Web3 truly reach the masses.
The oracle is responsible for connecting the blockchain and the real world, thereby realizing data interoperability between the blockchain and the real world. The oracle is responsible for introducing external data into the blockchain system safely, accurately and reliably. Through the oracle, the blockchain system can obtain and utilize external data while maintaining deterministic operations, thereby achieving a wider range of applications and functions.
Image source: Chainlink PowerPoint
Oracle Application Scenarios
As a bridge connecting blockchain and the real world, it can be said that any application that can be related to real-world data can be an application scenario of the oracle, such as: insurance, supply chain, prediction market, Internet of Things, stablecoin, game and DeFi, etc.
The following are some typical application scenarios of oracles:
Decentralized Finance (DeFi): Oracles play a key role in the DeFi space, providing real-time financial market data for applications such as lending, derivatives trading, insurance, RWA, etc. For example, projects such as AAVE and Synthetix rely on oracles to provide accurate price data to ensure the correct valuation and risk management of assets within the system.
Insurance: Oracles can provide real-world event data, such as weather conditions, natural disasters, etc., for on-chain insurance projects, thereby triggering the compensation clauses in the insurance contract.
Prediction Markets: Oracles provide real-time outcome data for prediction markets, enabling users to place bets and trade on the blockchain and predict the outcomes of events such as political elections and sports games.
Internet of Things (IoT): Oracles can pass data collected by IoT devices to smart contracts to automate data exchange and decision-making. For example, supply chain management systems can use oracles to obtain real-time cargo tracking information to improve efficiency and transparency.
Stablecoins: Oracles provide stablecoin projects with real-time foreign exchange data to ensure that stablecoins maintain a stable exchange rate relationship with the fiat currency they are pegged to.
Games and Non-Fungible Tokens (NFTs): Oracles provide random number generation services for games and NFT projects, such as Chainlink’s VRF (Verifiable Random Function), thereby achieving fair and transparent probabilistic events.
Cross-chain: Oracles serve as a key support for data and asset exchange in the cross-chain field, promoting interoperability between different blockchain networks, including asset transfer, data sharing, smart contract triggering, and identity authentication and privacy protection.
With the continuous evolution and innovation of blockchain technology and oracles, oracles will gradually expand to more application areas and provide reliable real-world data support for various emerging scenarios. This will promote blockchain technology to better integrate into our daily lives and solve a series of real-world problems.
Evolution of the Oracle Market
As a bridge between blockchain and real-world data, oracles have become a key component. From the early single solution to the current diversified oracle ecosystem, the market landscape has undergone significant evolution. In this context, let us review the development history of the oracle market.
On DeFiLama, as of May 1, 2023, the date of this article's data query, the entire oracle market showed a three-legged pattern, with Chainlink, Chronicle Labs, and WINLink occupying more than 90% of the entire oracle market. Next, we will introduce the top five oracle projects and the evolution of the entire market.
Image source: Oracles – DefiLlama
Let’s take a look at the evolution of the entire oracle market. Before the birth of Chainlink, 100% of the entire oracle market belonged to Chronicle Oracles, which is an oracle funded by MakerDAO and dedicated to serving MakerDAO. It is an internal oracle.
However, with the birth of Chainlink and its technological innovation in 2019, the oracle market began to undergo major changes, especially after the "DeFi Summer" in 2020, when Chainlink became the leader in the entire oracle market. As a result, more oracles began to emerge, such as WINkLink, Band Protocol, Pyth, and internal oracles of various projects (Internal Oracle, oracles developed and maintained by the project itself).
An interesting phenomenon is that the TVL of the entire internal oracle market began to plummet on May 7, 2022, almost to zero. This time point was the famous Luna crash. In the Luna crash, the value of its token fell sharply, and many projects were seriously affected because the internal oracles did not respond to price fluctuations in a timely manner. This incident exposed the vulnerability of most internal oracles in dealing with extreme market conditions, which severely damaged the market's confidence in internal oracles, so internal oracles are rarely used at present.
Image source: Oracles – DefiLlama
In addition to Chainlink and Chronicle Oracles, WINLink, one of the three oracle giants, is a decentralized oracle project in the TRON ecosystem. Relying on TRON's user base and application scenarios, it has achieved an independent position in the TRON ecosystem. Although Band Protocol and Pyth rank fourth and fifth in the oracle market, their market share is relatively small, and the combined market share of the two does not even exceed 3%.
It can be seen that although WINkLink and Chronicle Oracles also occupy most of the market share, since WINkLink is mainly limited to the TRON ecosystem and Chronicle Oracles is the internal oracle of the MakerDAO ecosystem, their influence is still not comparable to Chainlink. Therefore, in the current field of general oracle machines, Chainlink has shown an overwhelming advantage and market position, forming a high market barrier.
Chainlink is a decentralized oracle network that currently occupies half of the entire oracle market share and has the largest ecosystem among oracles. Even the international financial settlement network SWIFT, FedEx, Intel, etc. are all partners of Chainlink. So why can Chainlink become the leader in the entire oracle track?
Chainlink Network Ecosystem / Image source: What Is an Oracle in Blockchain? » Explained | Chainlink
Let’s first review the history of Chainlink. Chainlink is a product of SmartContract.com, which was co-founded by Sergey Nazarov and Steve Ellis in 2014. The company was originally founded to provide smart contract solutions for the real world [1]. However, with the development of blockchain technology and the rise of the decentralized finance (DeFi) market, SmartContract.com gradually shifted its focus to the oracle field, focusing on solving the connection problem between blockchain and real-world data. In September 2017, it released "Chainlink: Decentralized Oracle Network" [2], and officially launched it on the Ethereum mainnet in May 2019 [3].
I personally think that the following factors are very important for Chainlink to become a leader in the oracle track:
Decentralized Oracle Network
In the crypto market, decentralization, security, and tamper resistance are particularly important. Since the centralized oracle network relies on a single or a few data providing nodes, it is vulnerable to manipulation and attack and faces the risk of single point failure. If there is a problem or tampering with its centralized data node, the entire system may be affected, leading to serious consequences, especially for protocols involving large amounts of funds.
Image source: Chainlink PowerPoint
As a leader in oracle machines, Chainlink currently dominates the market. One of the important reasons is that it is a decentralized oracle network (DON) composed of many Chainlink nodes. According to the official description, each DON network is composed of node operators distributed all over the world, and they have rich experience and security in running nodes.
Chainlink’s node operators mainly include the following categories [4]:
DevOps Nodes: These nodes are organizations that specialize in running blockchain infrastructure, such as PoS validators, PoW mining pools, and full node RPC providers. These node operators are experienced in running critical Web3 infrastructure, managing cryptographic private keys, and providing services in exchange for cryptocurrency. DevOps nodes include top staking pool providers such as Fish, P2P Validator, and Staked.
Enterprise nodes: These nodes are located all over the world and currently run the backend infrastructure for the traditional Web2 economy. They include international telecommunications companies such as Deutsche Telekom subsidiary T-Systems and Swisscom, as well as global organizations such as LexisNexis.
Community Nodes: These nodes come from the Chainlink community and include winners of the Chainlink Oracle Olympics, CryptoManufaktur, LinkRiver, and NorthWest Nodes.
According to the official statement, Chainlink's decentralized oracle network DON aims to ensure the security, reliability and tamper-resistance of data by introducing multiple independent and reliable data providing nodes. This design reduces the risk of single point failure and makes it more difficult to manipulate data. Therefore, in key application scenarios, decentralized oracles can provide a higher degree of trust and reliability. In summary, Chainlink's decentralized oracle features make it the preferred data provider for many DeFi projects and other blockchain applications, which has largely promoted Chainlink's leadership in the oracle market.
Image source: Chainlink PowerPoint
Simply put, a centralized oracle network is provided with data by one or a few nodes, and it is easy to have problems such as downtime or data tampering due to attacks. It is like two independent islands communicating with each other only through carrier pigeons, but there are only one or two pigeons flying. It is very likely that pirates will intercept them and modify the content of the letter or directly shoot them down and prevent them from reaching the other island. However, a decentralized oracle network is provided with data by more independent nodes, thus ensuring the difficulty of data tampering and node security to a greater extent. It is like a group of pigeons flying to another island at the same time. If pirates want to tamper with the content of the letter or destroy the entire flock of pigeons, they will have to bear a higher cost and difficulty.
The first function of Chainlink that uses a decentralized oracle network is Data Feed, which is also one of Chainlink's most widely used functions. It aims to provide a secure, reliable and decentralized off-chain data source for smart contracts. It is widely used in DeFi in lending, derivatives, stablecoins, asset management and other scenarios. In the price feed service, Chainlink nodes receive off-chain data from multiple data providers, but there are many data sources in the real world. How does the Data Feed service ensure the accuracy and quality of the data?
Image source: Chainlink PowerPoint
In terms of ensuring data accuracy and quality, according to official disclosures, Data Feed uses a multi-level data aggregation mechanism. In simple terms, the data will undergo multi-level aggregation processing. [3] First, price data aggregators, such as data websites such as CoinGecko and Coinmarketcap, will perform the first aggregation among many original data sources. These data aggregators will calculate and generate a volume-weighted average price to ensure the quality of transaction data. Then, Chainlink's node operators will obtain price data from these data aggregators and perform a second aggregation. Generally speaking, the median price will be selected, but why is it the median?
Suppose there are 5 data source nodes to receive the price of Bitcoin, but one of the data is abnormal. The five price data are: 10001, 10002, 10001, 10003, 9999999. At this time, taking the middle value 10002 can effectively avoid the abnormal data from affecting the final price data. If the average value is taken, the abnormal data will pull up the final price. Therefore, theoretically, taking the median can better ensure the reliability of the oracle service.
Then the last layer of data aggregation occurs at the decentralized oracle network DON level. All node operators upload the median data and node signatures they obtain and generate an oracle report (OCR) to be published on the chain. The report covers the data and signatures uploaded by all oracle nodes. Each time the oracle report (OCR) is published on the chain, it will first verify the signature of each node, and then aggregate all the data (such as extracting the median) and store it in the reference contract. Once the data is stored, it is difficult to be tampered with.
In addition, at least 2/3 of the nodes in a DON need to upload the results and sign, and the oracle report (OCR) will be accepted on the chain. This is similar to Ethereum's proof-of-stake consensus mechanism: only when 2/3 of the nodes vote and verify it can a block be produced. This mechanism ensures that the final data of the Data Feed is difficult to tamper with to a large extent.
Therefore, according to my personal understanding, the data of the Data Feed service has undergone multiple aggregation processes and is transmitted by more reliable node operators and consensus mechanisms to ensure the accuracy and difficulty of tampering of the data.
Image source: Chainlink PowerPoint
Market trend foresight
If we look back at history, we can see that Chainlink’s success is largely due to its foresight and accurate grasp of market trends. Every launch of a new feature seems to have spawned a new round of ecological explosion:
Chainlink's Data Feed service was officially launched in 2019, when the DeFi market was in its infancy. After the launch of Data Feed, it aimed to provide DeFi projects with a reliable, secure and transparent data source. Later in 2020, the DeFi market ushered in explosive growth, which was called "DeFi Summer". At that time, the vast majority of DeFi projects relied on Chainlink's Data Feed service, which enabled Chainlink to establish a leading position in the DeFi market and become the preferred oracle for many DeFi applications.
In addition to the Data Feed service, another feature, Chainlink VRF, seems to have also spawned the explosion of the NFT and GameFi ecosystem. According to the official description, Chainlink VRF (Verifiable Random Function) is a decentralized random number generation service that can provide secure and verifiable randomness for smart contracts. Random number generation is a key component in many application scenarios, such as games, NFT projects, and prediction markets. Traditional random number generation methods may be vulnerable to manipulation and attacks in a blockchain environment, resulting in unfair and opaque results, while Chainlink VRF solves the pain points well.
Chainlink VRF was launched around 2020, coinciding with the explosive growth of the crypto art, collectibles, and gaming industries. The rapid rise of the NFT (non-fungible token) market in 2021 triggered an "NFT Summer", which spawned a large number of projects related to art, collectibles, and crypto games. In Dune, we can see that the frequency of VRF v1 being called on the BSC chain in 2021 has shown a blowout growth (after 2022, v1 has been called less due to the release of v2).
Image source: Chainlink Dashboard – Dune
Chainlink VRF provides critical randomness services for these NFT projects, aiming to help them achieve fair distribution, random attribute generation, and other functions. For example, the popular GameFi game Axie Infinity used Chainlink VRF to ensure that each of the 4088 original Axies was truly randomly generated based on the probabilistic features predefined in the smart contract [5].
Of course, the application scenarios of Chainlink VRF are not limited to this, and there is still more room for imagination, but Chainlink's foresight and precise layout of the NFT and GameFi markets have enabled it to occupy an important position in the application of this field.
Image source: Chainlink PowerPoint
In summary, Chainlink’s foresight enables it to accurately grasp market trends and gain key advantages in the explosive growth of DeFi, GameFi, and NFT markets. This is an important factor in Chainlink becoming a leader in the oracle track.
Emphasis on developer relations
Developer relations are crucial to the success of technology platforms and ecosystems. Apple created the position of "software evangelist" in the 1980s [6]. The job of a software evangelist is to encourage developers to develop applications for macOS and later iOS. It was Apple that realized that the value of a platform must be supported by the software running on it. Since the launch of the App Store, Apple has provided developers with a wealth of resources, tools, and support to help them develop and publish applications more easily. In addition, Apple also regularly holds developer conferences to share the latest technologies and trends with developers.
In 2022, Apple also launched the Ask Apple service, which allows developers to directly contact Apple evangelists, engineers, and designers to solve doubts, share experiences, and communicate with other developers around the world. It is completely free, which shows that Apple attaches great importance to developer relations. It is precisely because of this attention and importance to developers that Apple's ecosystem has flourished and has one of the largest app stores in the world.
Image source: Ask Apple – Events – Apple Developer
If Apple is a positive case of focusing on developer relations, then BlackBerry is a typical negative case. One of the factors for BlackBerry's failure is that it did not pay enough attention to developer relations. Compared with iOS and Android, BlackBerry's development environment is relatively complex and closed, which brings additional learning and development costs to developers. Due to the lack of easy-to-use development tools and resources, many developers chose to turn to other competitors' platforms. And with the rapid expansion of iOS and Android app stores, BlackBerry's application ecosystem has gradually fallen behind. Many popular applications were not launched on the BlackBerry platform, making its user experience relatively poor, which led to a large loss of users and developers, further weakening its competitive position in the market.
This shows that developer relations are of vital importance in the platform ecosystem. For Chainlink, focusing on developer relations is a key factor in starting the Chainlink platform flywheel. By actively investing resources and support, Chainlink can attract more developers to join its ecosystem and promote the prosperity and development of the platform. As the developer community continues to grow, the Chainlink platform will have more smart contracts and decentralized applications (DApps) connected to provide value to more users. This will attract more project parties, users, and developers to join the ecosystem, forming a virtuous circle. At the same time, as the Chainlink ecosystem prospers and develops, the platform will gradually form a network effect. With each additional participant, the value of the Chainlink platform will increase, further promoting the flywheel effect.
It can be seen that Chainlink has shown corresponding attention in terms of developer relations:
Documentation and teaching resources: Chainlink provides relatively detailed developer documentation and rich teaching resources to help developers understand, learn and use Chainlink technology more easily. These documents include API documentation, developer guides, sample codes, etc., covering various functions and application scenarios of Chainlink. At the same time, Chainlink has also prepared a series of development tutorials and videos for developers at different stages to help developers quickly get started with Chainlink development.
Developer Support: Chainlink provides developers with corresponding technical support, including online communities, forums, technical discussion groups, and channels such as Ask Apple that allow direct communication with official experts. Developers can find local developer communities in their area through the official website to seek help, share experiences, and exchange technical insights, so as to form a good technical atmosphere.
Events and competitions: Chainlink regularly organizes various events and competitions, such as hackathons, developer conferences, technical seminars, offline meetups, etc. These activities are aimed at encouraging developers to participate in the construction of the Chainlink ecosystem, promote technical exchanges and innovation, and increase Chainlink's awareness and influence in the developer community.
Incentive Program: Chainlink provides developers with relevant incentive programs, including bounties, bonuses, grants, etc. These incentive programs are designed to reward developers who contribute to the Chainlink ecosystem, encourage their continued participation and innovation, and thus create new momentum for the entire platform flywheel.
Can Chainlink Function trigger a new wave of innovation?
In March 2023, Chainlink officially released the Chainlink Function, which you can also understand as Chainlink 2.0. According to the official introduction, this is a serverless developer platform that allows anyone to easily connect smart contracts to any Web2 API and use Chainlink's decentralized oracle network for customized calculations. For developers, Chainlink Function implements the following functions [7]:
Extensive connectivity
Smart contracts can connect to any data source, from public or password-protected APIs to IoT devices and enterprise systems.
Customizable calculations
The serverless runtime environment enables powerful scalability and customization, and is used to aggregate and process data.
Trust-Minimized Security
Chainlink’s decentralized infrastructure has stood the test of time and has secured billions of dollars in value for numerous Web3 applications.
Self-service in minutes
The Chainlink Functions serverless solution takes only minutes to get started. The solution includes a CLI, a starter kit, and a debugging environment
Serverless runtime environment
You can run JavaScript code without a server, so you can spend time and energy on core application development instead of infrastructure.
What Problems Does Chainlink Function Solve?
If Data Feed solves the problem of data transmission reliability and tamper resistance, and VRF solves the problem of random number verification and tamper resistance on the chain, then Chainlink Function solves the problem of smart contract connection to Web2 API and centralization, as well as the problem of data tamper resistance and security of custom calculations. Let's take a look at them one by one:
Development threshold and node centralization issues
The first is the threshold issue of smart contracts connecting to Web2 API. Before the launch of Chainlink Function, developers could also use Chainlink’s Any API service to connect to Web2 API to obtain data. However, Any API is very different from Function. First of all, in order for Any API to realize the function of connecting to Web2 API, developers need to build a Chainlink node themselves and build an external adapter for this API [8], which is quite troublesome.
If we compare developers to chefs, using Any API services requires developers to get some infrastructure done by themselves, such as buying stoves, installing range hoods, etc. After getting the infrastructure done, they also need to prepare specific cooking tools (external adapters) for specific ingredients (API), which is rather troublesome, and Any API does not support custom operations.
For Chainlink Function, the serverless runtime environment means that developers can focus on writing code and functions without having to worry about the maintenance, expansion, and management of the underlying servers and infrastructure. Similarly, if developers are compared to chefs, then Chainlink Function is an automated kitchen. Developers only need to focus on preparing ingredients and cooking, without having to worry about infrastructure issues such as buying stoves and installing range hoods, and the automated kitchen also has a full range of cooking tools. In contrast, Chainlink Function has reduced the original development difficulty from almost 10 to 1, and the lowering of the development threshold will attract more developers to participate in innovation.
The second is the centralization issue. Any API’s oracle network uses the Chainlink oracle nodes built by developers themselves instead of Chainlink’s decentralized oracle network DON. This poses a centralization risk and cannot guarantee data security and tamper-proofing. This will lower the threshold for malicious behavior in the project and limit the funding scale of the project.
We all know that the security of projects in Web3 is extremely important. A little carelessness will lead to a large amount of asset losses. Here I would like to mention the difference between Data Feed and Function. One is to transmit data from a specified data source, and the other is a custom operation of any data source.
The data in custom operations is difficult to tamper with and has security issues [9]
First of all, we need to know how Chainlink Function implements custom operations and why it is important to implement custom operations in a decentralized oracle network. Before understanding oracle network operations, we need to understand two other types of operations: centralized off-chain operations and on-chain operations, which represent the two extremes of centralization and decentralization respectively.
Centralized off-chain computing is usually performed in a centralized system, so it has very high performance and rich scalability, and it is not restricted by the blockchain network. In addition, the cost of centralized off-chain computing is very low because computing does not consume blockchain network resources. However, for smart contracts, since centralized off-chain computing cannot guarantee the reliability and difficulty of tampering of data, and lacks trust, the results of centralized off-chain computing are usually not directly applied to smart contracts.
On-chain computing refers to computing performed in a blockchain network, such as the execution of smart contracts. The data generated by on-chain computing is highly reliable, secure, and difficult to tamper with, because all computing is performed in the blockchain network, and all data and results are stored on the chain. However, the speed and efficiency of on-chain computing are limited by the network, and the cost is high, because each calculation consumes network resources (such as Ethereum's gas fee).
For example, when we transfer money on Ethereum, assuming that the gas fee is about 4-5U, under the same gas price conditions, the NFT with slightly more complex smart contract logic may cost about 20U, because this requires more Ethereum network resources, so it is extremely expensive to implement complex logic operations on Ethereum. On-chain operations are expensive and limited, and are not suitable for handling large-scale computing and data processing tasks.
Back to oracle computing, Chainlink Function implements custom computing at the decentralized oracle network DON level, which can actually be called decentralized off-chain computing, which minimizes trust. It combines the characteristics of centralized off-chain computing with on-chain computing, bridging the gap between centralized off-chain and on-chain computing. According to official statements, oracle computing can make the data transmitted to smart contracts maintain security, reliability and difficulty in tampering, while also having the advantages of centralized off-chain computing, achieving high performance, low cost and scalability. Therefore, Chainlink Function allows smart contracts to implement functions that were previously difficult to implement or inefficient, providing a lot of room for imagination.
Image source: Chainlink PowerPoint
Through Chainlink Function, developers can customize the operation logic in the decentralized oracle network, so as to meet the complex smart contract requirements without placing the computing burden on the blockchain network. Let’s take a look at how Chainlink Function works:
The end consumer launches the Chainlink Function embedded in the DApp
The DApp makes a request to the Chainlink Function smart contract. This request includes the API endpoint, any transformations of the data, and cryptographic credentials (if any)
The decentralized oracle network DON constantly listens to the Chainlink Functions smart contract. When it receives a request, each node independently triggers its runtime to fetch external data, perform any computations on it, and return the result.
Nodes use OCR2.0 to reach consensus on the final result, and then select a node to transmit the result back to the chain. If the node fails to publish the data, another node is selected to transmit it to the chain. The end result is high reliability and trust-minimized security.
In short, when Chainlink Function receives a request, it will independently execute the developer's customized operation logic on each node in the decentralized oracle network (DON) to obtain and process external data, and then use the OCR 2.0 protocol (Chainlink Data Feeds underlying consensus protocol) to reach a consensus on the final data and upload it to the chain. However, it should be noted that although Chainlink Function ensures the reliability, security and tamper-proofness of data transmission, it cannot guarantee the authenticity of the data source, and participants need to carefully evaluate the source of the data.
Image source: Chainlink PowerPoint
Potential Use Cases of Chainlink Functions
According to Chainlink’s official information, Chainlink Function can unlock the following Web3 application scenarios [7][10]:
Developers can use Chainlink Functions to connect to any public or private data API, such as getting the latest game or sports results, or extracting metrics data on Web3 protocols (such as protocol revenue, user fees, active users, TVL) from Token Terminal
Developers can do this by having a Chainlink Function fetch data and perform advanced computations on it before referencing it in a smart contract, such as retrieving data from a social media API, calculating sentiment, and reporting the result of the transformation on-chain to trigger an action (such as a user receiving a limited edition NFT).
Developers can use Chainlink Functions to connect to cryptographically protected IoT device data or enterprise systems, integrating Web3 protocols with existing technologies and networks. For example, developers can get data from smart watches or smart pollution sensors, connect smart contracts to enterprise ERP systems such as SAP to build supply chain applications, or connect to Stripe APIs to check user account balances.
Developers can integrate with Chainlink Functions to connect their smart contracts to external decentralized databases such as IPFS and Filecoin. This will allow developers to leverage DON as a computing layer and IPFS for off-chain computing dApps for low-cost decentralized storage. For example, developers can build a decentralized off-chain voting system for DAOs by using Chainlink Functions to obtain off-chain votes and forward voting results to the chain to trigger smart contract-based actions.
Developers can connect to Web2 applications and build hybrid smart contracts with complex computing logic
Developers can get data from almost any Web2 system like AWS S3, Firebase or Google Cloud Storage or even Tesla cars
Developers can tap into AI to respond (e.g. in OpenAI’s ChatGPT API or cloud providers generating recommendations for DeFi transactions)
Image source: Chainlink PowerPoint
In addition to the potential application scenarios mentioned by the official, we can also find some interesting solutions from the Chainlink Function cases submitted by the community [11], such as using Chainlink Function to obtain data from the Google Maps distance matrix, etc. For more cases, please visit https://www.usechainlinkfunctions.com/. In addition to the above application cases, the potential application scenarios of Chainlink Function are also worth paying attention to. As of the writing of this research report, Chainlink Function has just been released for more than a month and is still in the testnet Beta stage, so we still need more time to observe.
图源:useChainlinkFunctions() – quick and easy to understand code examples for Chainlink Functions
In simple terms, Chainlink Function realizes the reliability, trustworthiness and difficulty of tampering of connecting to any external API on the decentralized oracle network to perform custom calculations and data processing. Before this, this function was limited to centralized systems. Through Chainlink Function, developers can access and use oracle services more flexibly, conveniently and with a low threshold, which gives DApp greater imagination in application scenarios and potential. However, it should be noted that Chainlink Function can only ensure the reliability, trustworthiness and difficulty of tampering of data in data transmission, not the authenticity of the data. Therefore, the participants need to strictly review the source of the data to avoid using the data source for malicious behavior. Since Chainlink Function is still in the Beta testing stage, the potential risks and vulnerabilities are currently unknown, and more needs to be verified by time and the market.
Chainlink Economic Model
With the launch of Chainlink’s Decentralized Oracle Network (DON) and the Chainlink Function it supports, its economic model also needs to be reformed. Chainlink launched the Chainlink 2.0 economic model, which paved the way for the establishment of DON with the explicit and implicit incentive mechanisms brought by Token Staking, as well as the revenue-cost optimization brought by Chainlink Build and Chainlink Scale.
Below, we will explain the economic model of Chainlink 2.0 in an easy-to-understand way, comparing it with 1.0, what purpose it achieves, and how it is achieved. In addition, we will make some extensions based on this topic, hoping to trigger readers' thinking about economic models.
Chainlink 1.0 Economic Model
Chainlink Whitepaper-v1 describes the role of LINK as follows: “The ChainLink network utilizes the LINK token to pay ChainLink Node operators…”[12] This is a very classic Token economy: using Token as a means of payment within the ecosystem, which is the most common function of currency. Clients using Chainlink services need to use LINK to pay node service providers, thereby establishing LINK’s initial utility and supply-demand relationship.
Experienced readers may have noticed that this token economy is too simple: the token empowerment is limited and the degree of decentralization is insufficient. In the early stage of Chainlink's development, such a token economy that is easy to onboard is reasonable; but as Chainlink's business develops, it has put forward higher requirements for the decentralization and security of the ecosystem. The original token economy cannot fully capture the value within the ecosystem, and a more complex token economy naturally needs to be proposed.
Chainlink 2.0 can achieve two goals:
1) In terms of business, it enhances the decentralization of the ecosystem (a necessary condition for the formation of DON), thereby enhancing the security and accuracy of oracle services. According to the official statement, it “Expands the role of Decentralized Oracle Networks (DONs) in the blockchain ecosystem, laying out the key advancements for the Chainlink Network to power a suite of decentralized services for smart contracts on any blockchain.”[12]
2) Financially speaking, the Value Capture of Tokens is enhanced so that Tokens can more comprehensively reflect the value of the ecosystem. This has not been explicitly stated by the official, but with the implementation of Chainlink 2.0, the improvement of value capture is expected. Oracle nodes and community participants need to participate in the Chainlink ecosystem by staking LINK, so that the demand for LINK will increase as the Chainlink ecosystem expands. The staking mechanism will also reduce the selling pressure of LINK, driving the value of LINK from both the supply and demand sides.
Next, let’s take a closer look at the mechanisms of Chainlink 2.0 and how these measures enable decentralization, improve ecosystem security, and capture value.
Chainlink 2.0 Economic Model
Staking Mechanism
The staking mechanism is the core of Chainlink 2.0. It combines DON node rights with tokens to form the monetization of governance, and restricts the possibility of nodes doing evil through quantifiable interests. The token economy is combined with the governance mechanism, and the super-linear staking effect is achieved through the explicit incentive mechanism, and the short-sighted behavior of nodes is restricted through the implicit incentive mechanism.
Many current studies focus on the financial impact of the staking mechanism itself on tokens, but the governance mechanism, especially the implicit incentive framework (IIF), is not well explored. Therefore, we will give a detailed introduction to the staking mechanism based on the Chainlink 2.0 white paper, and try to answer the essential questions of the token economy through these facts.
Explicit Incentive Mechanism
The white paper calls Chainlink’s staking mechanism an explicit staking mechanism because the explicit incentive mechanism is mainly completed by staking. The so-called “explicit incentive” is relative to the “implicit incentive”. The former focuses on direct rewards and penalties, while the latter focuses on the discount of future opportunity costs.
DON nodes may make mistakes, whether these mistakes are intentional or unintentional, individual or collective. We can first be familiar with the following mistakes that DON nodes may make:
1) Ecosystem-wide errors: reporting wrong data or not reporting data in a timely manner.
Individual nodes may report erroneous data or fail to report data in a timely manner. This type of error will not affect the data results of DON and can be remedied or punished as appropriate.
If enough nodes provide incorrect data, DON may form a fork/equivocation, which will endanger the security of DON, so DON can regularly record the status of L in the audit contract on the main chain. If its future status does not match the recorded status, the user can submit evidence of the wrong behavior to the audit contract.
2) Service user-oriented errors: Violation of Service Level Agreements (SLAs).
Through the on-chain agreement, SLAs stipulate the basic obligations of DON nodes to provide services to users (such as duration, data accuracy, data type, etc.). If the DON node does not provide the corresponding service, the user can challenge the behavior of the node.
Behind each DON is a service agreement that will define the amount of LINK tokens that each oracle node needs to stake and key performance requirements, such as how far a single node’s response can deviate from the aggregate value and how far the aggregate value reported by the oracle can deviate from the correct value it is supposed to represent. The service agreement may also define other parameters, such as the data source used, update frequency, fees paid by each node, etc. [14]
In order to effectively detect and avoid misconduct, Chainlink 2.0 has designed a two-tier reporting explicit incentive mechanism.
This explicit incentive mechanism can be broken down into the following sub-mechanisms:
1) Two-layer oracle network
Chainlink has established a two-tier oracle network. The first tier is called the default tier, which is the oracle network itself, consisting of the nodes of the network; the second tier is called the backstop tier, which consists of networks with strong historical reliability scores or an order of magnitude more oracles than the first tier, such as Aave, Synthetix, Compound, etc.
The first layer is the participants in the ecosystem, and the second layer is the arbitrators of the ecosystem. The arbitrators do not have the power to make decisions simply because of their status, but because of their credibility due to the performance of past historical data or the order of magnitude of the oracle.
The nodes in the initial layer supervise each other and can report to the backup layer when large-scale anomalies are found, and the nodes in the backup layer make judgments. The two-layer oracle network adds an arbitration committee that takes effect at critical moments, reducing the risk of majority bribery attacks on nodes at the expense of decentralization.
Image source: Chainlink 2.0 Super-Linear Staking: An Overview
2) Margin system
Staking is similar to a security deposit system. Nodes are required to pay two deposits: the first deposit will be slashed for reporting data that is different from the public, and the second deposit will be slashed for faulty escalation.
In addition to nodes, users can also challenge the behavior of nodes by staking margin. Through the user challenge mechanism, Chainlink also incorporates users and communities into the ecological security system. In addition to allowing nodes to supervise and report each other, it also allows supervision outside of nodes.
3) Watchdog priorities and super-linear staking impact
“Superlinear Staking Impact” is the main feature of Chainlink 2.0. This name sounds intimidating at first, and it is difficult to understand its meaning literally. Next, we will explain the meaning of superlinear staking impact in the most plain language possible.
Let's first look at what is a "linear" staking effect. If the bribe cost (C) is linearly related to the number of nodes (n), then this staking effect is linear. The minimum marginal cost of each node can be considered as the direct opportunity cost of each node, because if a rational node receives a bribe that is less than the benefit it can get from reporting in the future, it will choose to defect. Assuming that each node has paid the same deposit $d, if the attacker bribes half of the nodes, and the benefit of each node reporting is to evenly divide the deposit of the problematic node ($d/2), then the bribe cost C = $d*n/2, and there is a linear relationship between C and n with a coefficient of $d/2.
Chainlink uses an interesting game theory approach to make the bribe cost C have a quadratic relationship with the number of bribed nodes n. Before that, let’s get familiar with another concept: watchdog priorities.
In the above discussion of the impact of linear staking, we assumed that the reward for reporting a node is to evenly divide the security deposit of the problematic node ($d*n/2). Now, let's assume that the reward for reporting a node is not to evenly divide the security deposit of the problematic node, but that one of the reporting nodes gets all the security deposit of the problematic node. Then, the order that determines which node gets all the security deposit is called the "supervisor priority". This priority is random, so the attacker cannot know which node may get all the rewards.
In this case, the bribe cost of the attacker will be much higher than the linear staking effect: because there is no way to know which node will receive all the rewards, the safe way is to bribe all nodes that may receive rewards with the full margin, otherwise the nodes will choose to report because of the possible opportunity cost. Therefore, assuming that each node has paid the same margin $d, if the attacker bribes half of the nodes, and the benefit of the node reporting is the full margin of the problematic node ($dn/2), then the bribe cost C=($dn/2) * n=$d*n^2/2, and there is a square relationship between C and n. In other words, as the number of nodes increases, the bribe cost increases quadratically, not linearly, which is the meaning of "non-linear staking effect".
By randomly selecting a reporting node to obtain the margin reward of all problematic nodes, the bribery cost increases nonlinearly. This is the cleverness of Chainlink 2.0 in the staking design.
Image source: Chainlink 2.0 Super-Linear Staking: An Overview
Here’s what’s not in the whitepaper: Going further, in fact, the cost of bribing nodes should be much higher than the impact of non-linear staking, which is affected by bargaining power and game theory.
Bargaining power impact: Because any layer of nodes may become supervisors, once an attacker contacts a node, he exposes his attack intentions. For this reason, the attacker will face smaller bargaining power and may be threatened by the node.
Game theory impact: There is a prisoner's dilemma between the bribed nodes. Assuming that all nodes are bribed, if one node chooses to defect (report), it can get all the rewards. In this case, the choice of nodes will tend to be Nash equilibrium, that is, all defect rather than cooperate.
The setting of supervisor priority takes this into consideration: assuming that the attacker successfully bribes all nodes, if the supervisor priority is not set and all rewards are evenly distributed, then the benefits of betrayal are predictable, and under rational circumstances, the result will tend to be Nash equilibrium: each supervisor tends to receive a reward of $d (everyone misreports the data, but everyone reports it). After setting the supervisor priority, each supervisor may receive a reward of $dn. Although the mathematical expectation of the reward is still $d, the uneven probability distribution makes the benefits of betrayal uncertain, so it is reasonable to give each node a bribe of $dn.
Image source: Chainlink 2.0 Super-Linear Staking: An Overview
Implicit incentive mechanism
Above, we explored how Chainlink 2.0’s explicit staking mechanism achieves superlinear staking effects through the game theory of supervisor priority. To simplify the model, we obviously only considered the direct economic benefits of node behavior (bribes and reporting rewards), without considering the opportunity costs or potential benefits of node behavior.
Strictly speaking, implicit incentives should still be part of the impact of the staking mechanism. After all, opportunity costs and potential benefits should also be included in the game. However, for the sake of convenience, the white paper and this article choose to discuss this part separately.
Future Fee Opportunity (FFO)
The white paper gives a fancy name to the opportunity cost/potential benefit of nodes: Future Fee Opportunity (FFO). We can understand FFO as the long-term opportunity cost.
Here is a brief introduction to opportunity cost for readers who don't know it: opportunity cost refers to the value of the next best choice that is missed due to choosing a certain option. Opportunity cost is an important concept in game theory because it affects the behavior of actors in the game. Considering that the goal of all game participants is to maximize their own interests, the concept of opportunity cost will allow participants to better understand the trade-offs they face, allowing them to consider not only the direct benefits and costs, but also the possible benefits of other options.
For example, Alice chooses a job with a monthly salary of 5,000 yuan, but if the best choice she faces is a job with a monthly salary of 10,000 yuan, the opportunity cost she faces is 10,000 yuan. Let's complicate Alice's example: If Alice chooses a job with a monthly salary of 10,000 yuan, the salary of this job will not increase, but another job with a monthly salary of 5,000 yuan will become a monthly salary of 20,000 yuan in the future, and Alice will also face long-term opportunity costs. In order to achieve the optimal solution, if Alice does not retire after only working for one year (i.e. Alice is a long-run player), she needs to understand the short-term and long-term opportunity costs.
Considering that becoming a node requires deploying equipment and staking margin, we can assume that nodes are long-term actors, so future fee opportunities are important to them. For Chainlink nodes, FFO is the future node income. Node income is not stable, but is related to the following factors (which is actually Chainlink's evaluation system for node performance): node performance history, data access, DON participation, and cross-platform activity. The first three are relatively easy to understand, and the fourth factor "cross-platform activity" mainly refers to the performance of nodes outside the Chainlink ecosystem, such as serving as POS verification nodes or non-blockchain-based information services.
Speculated FFO
When discussing FFO, we mentioned that "for Chainlink nodes, FFO is the future node revenue". Smart readers may quickly realize that in addition to the direct opportunity cost of revenue, there are at least two indirect opportunity costs: 1) As the blockchain ecosystem develops and the Chainlink ecosystem expands, nodes will have new users and revenue opportunities; 2) The reputation and public opinion influence of the node itself. The former is the "speculative future fee opportunity (Speculated FFO)" we are discussing here, and the latter is the "external reputation (External Reputation)" discussed in the next section.
Simply put, considering that Chainlink is a leader in oracles and oracles are a rigid demand for blockchain data services, if early nodes maintain good performance and stay in the Chainlink ecosystem, they will only be more stable and earn more revenue. In other words, by becoming a reliable node of Chainlink, nodes can grow with the crypto ecosystem and Chainlink's beta. This part of the potential income is called speculative future fee opportunity, which is a potential long-term opportunity cost.
External Reputation
Chainlink’s nodes are not pseudonymous, which means that the behavior of nodes is linked to their reputation outside the ecosystem. If a node does evil, its reputation in other ecosystems will also be affected, thus limiting its potential for evil. In other words, this is a “social moral constraint”.
New fee model
In the above content, we have introduced in detail the staking mechanism of Chainlink 2.0 and its principle of restricting the possibility of nodes to do evil and increasing the overall security of the ecosystem. Chainlink 2.0 also includes other parts: 1) Chainlink Build, which is committed to lowering the threshold for early project participation and expanding the income of participants; 2) Chainlink Scale, which is committed to reducing the cost of node service providers and expanding the ecological network. Because they all have an impact on the income and cost of Chainlink nodes and stakers, I will refer to them as the new fee model here.
Expanding Participant Revenue: Chainlink Build
There are two problems:
For dApps: Chainlink’s oracle services are essential for many dApps, but when the project has not yet generated revenue, using Chainlink’s services may be too expensive;
For service providers (nodes/data providers/stakers, etc.): the remuneration for providing services is single, that is, the fee income received for providing services, which is distributed in the form of LINK.
There is a way to solve the above two problems: allow early projects to use their own tokens in exchange for Chainlink services, and allow service providers to receive project tokens as compensation and exchange tokens for services.
To put it more fancy, “BUILD participants will commit multiple percentage points of their total token supply to the BUILD program to accelerate their ecosystem growth and drive dApp innovation.” “Chainlink BUILD is an initiative designed to enhance the Chainlink effect for dApps by aligning incentives across the ecosystem. Projects participating in BUILD commit to paying network fees and providing incentives to service providers in the Chainlink community, such as Chainlink stakers, who provide key benefits and services to projects. The economic incentives provided to Chainlink ecosystem participants can help encourage them to participate in the dApp’s ecosystem, such as by participating in the project’s governance process, staking native tokens on their respective staking mechanisms, and becoming vocal supportive members of their community” [15].
Of course, the above is the core of Chainlink Build. In fact, Chainlink Build also promises more rewards to project participants:
Priority Access:
Ahead of the full mainnet launch, access to a curated collection of alpha and beta versions of Chainlink services will be available to accelerate the development of advanced dApp functionality enabled by cutting-edge oracle solutions.
Enhanced Security:
Improving the security of Chainlink services powered by Chainlink Staking by providing incentives to LINK stakers. For Staking v0.1, this starts with ETH/USD on Ethereum, but plans to expand to more feeds in the future.
Premium Technical Support:
Get direct support on oracle solutions from service providers in the Chainlink ecosystem. This includes dedicated calls with ecosystem experts who can help identify new product and engineering requirements.
Custom data feeds:
Access custom data feed DONs that meet unique use case requirements and are powered by the same high-quality Chainlink Node Operators who have helped secure tens of billions of dollars in value through Price Feeds.
Higher quality data:
Gain access to a variety of industry-leading data providers who can help diversify data sources and customize data sources DON’s tamper-proof nature, which may include other forms of metadata in the future.
More robust data feed monitoring and maintenance:
Ensure maximum reliability of custom data feeds to DONs through maintenance and monitoring support for DON operations. This can include developing new infrastructure to meet unique user needs [16].
Reducing Service Provider Costs: Chainlink Scale
Node operators incur fees every time they provide an oracle report on-chain, and these fees are typically borne by the node operator themselves, covered by a combination of oracle rewards and user fees.
Image source: Introducing the Chainlink SCALE Program | Chainlink Blog
Chainlink Scale allows Layer 1 and Layer 2 public chains to provide Gas Fee Grants to cover the gas costs reported on the chain by nodes. Its previous name may help us understand this more directly: Blockchain Gas Grants. [17]
Through Chainlink Scale, Chainlink's nodes reduce operating costs and operational complexity (no need to exchange native tokens on the chain to pay for Gas), which is obviously beneficial. But why are public chains willing to give Grants?
This is because the most important thing for a public chain is to expand the ecosystem: including dApps and users. By providing Grants to oracle networks that support specific public chains and provide specific data services, it can facilitate the development of the dApp ecosystem on its own public chain, thereby attracting more developers and users. Considering the triple needs of public chains, nodes, and dApps, I believe Chainlink Scale will be better built.
potential problem
Will Chainlink 2.0 make LINK a governance token? Although staking is a common governance token economic solution, LINK does not meet the characteristics of a governance token. The number of staked tokens will not affect the node's voice in DON, but is more like a margin system to prevent nodes from doing evil.
Is Chainlink's staking mechanism POS? Although Chainlink's staking mechanism is very similar to the POS mechanism, both use staking rights to ensure decentralized security and have the possibility of margin being slashed, these two mechanisms:
The purpose of the service is different. The POS mechanism of the public chain serves the consensus decision: the right to write blocks; Chainlink's pledge mechanism serves the ecological value: ensuring that the data is timely and accurate.
The decision-making mechanisms are different: for POS, the greater the amount of staked equity, the higher the possibility of obtaining the right to propose blocks; for Chainlink's staking mechanism, the amount of staked equity depends on SLAs and does not affect the right to speak.
Future Outlook
In summary, since blockchain is a closed system, oracles are needed to achieve links with real-world data in order to stimulate greater application potential, and players in the oracle track such as Chainlink play an important role. With the launch of Chainlink Function by Chainlink, which has a monopoly in the field of general oracles, developers will be able to connect to any external API on the decentralized oracle network more flexibly for custom calculations and data processing. The new Chainlink economic model 2.0 proposes a staking mechanism and a new fee model to achieve super-linear staking effects, further enhancing the security and sustainability of its ecology. It is believed that in the future, as infrastructure like Chainlink continues to improve, it will further promote the development of blockchain technology in various fields and provide strong support for the large-scale adoption and innovation of Web3.
references
[1]New Blockchain Startup Brings Contracts into the Digital Age – Coindesk
[2]https://research.chain.link/whitepaper-v1.pdf
[3]Chainlink launches Mainnet to get data in and out of Ethereum smart contracts -ZDNET
[4] How Chainlink Price Feeds Ensure DeFi Ecosystem Security | Chainlink Blog
[5]35+ Blockchain RNG Use Cases Enabled by Chainlink VRF | Chainlink
[6] Developer relations are a key factor in determining the success or failure of Web3 | Chainlink Blog
[7]Introducing Chainlink Functions: Connect the World’s APIs to Web3
[8]Chainlink Any API Documentation | Chainlink Documentation
[9] Understanding Oracle Computing in One Article - Giving Oracles Dual Functions of Data Transmission and Off-Chain Computation | Chainlink Blog
[10] What is Chainlink Functions? | Chainlink Documentation
[11]useChainlinkFunctions() – quick and easy to understand code examples for Chainlink Functions
[12]https://research.chain.link/whitepaper-v1.pdf
[13] Chainlink 2.0 and the future of Decentralized Oracle Networks | Chainlink
[14]Chainlink 2.0 Super-Linear Staking: An Overview
[15]Introducing Chainlink BUILD | Chainlink Blog
[16]Introducing the Chainlink SCALE Program | Chainlink Blog