๐ A Deep Dive on Chainlink
Unpacking hybrid smart contracts, ecosystem integrations, and everything in between
When Satoshi Nakamoto published the Bitcoin whitepaper in 2008, the world was exposed to a new model for settling transactions in a digital-native and trustless manner.
The system of accounting would be driven by a ledger maintained by a decentralized network of nodes, who leverage cryptoeconomic security to come to consensus on who can append a new block of transactions to it.
In the time since, many brilliant minds have expanded on Satoshiโs initial concept. Most notably, Vitalik Buterin changed the game when he created a programming layer on top of the Ethereum blockchain.
With Ethereum, not only would a ledger be stored on a decentralized network of computers; but also, open source pieces of code that were now immutable. This introduced a new model for programming known as smart contracts.
Yet, despite these great advances, every layer-1 blockchain seemed to run into the same problem when expanding itโs use cases. While blockchains are great for maintaining security, this comes at the cost of being closed to the outside world.
For any project that wants to bring external data into a blockchain, they need to find a way to source that data, without sacrificing the trustless and decentralized nature of the underlying blockchain.
Today, we will be talking about the project that solved this very problem for blockchains, and it goes by the name of Chainlink. In addition, we will explore how they have expanded their offerings and use cases since launching in 2017.
By the end, you will have an idea of why this project might very well become one of THE most important projects in all of Web3.
Note: While Chainlink is not a typical layer-1 blockchain, I will still be following the same format I do for dissecting other layer-1s: Tech, Ecosystem, Community
The Chainlink Tech โ๏ธ
At the heart of any project exists some underlying problem or need that it is attempting to solve. We have already alluded to this problem in the opening paragraphs, but I want to break it down in further detail since itโs important to understand deeply.
The Blockchain Oracle Problem
As Chainlink puts it in their blog post:
โThe oracle problem revolves around a very simple limitationโblockchains cannot pull in data from or push data out to any external system as built-in functionality. As such, blockchains are isolated networks, akin to a computer with no Internet connection.โ
On the one hand, this isolation helps make blockchains extremely secure and reliable, which is exactly what Satoshi intended when he wrote the Bitcoin whitepaper. However, as more people have considered additional use cases for blockchains, itโs become quite clear that this is a severely limiting factor.
As Chainlink aptly puts it, โfor smart contracts to realize upwards of 90% of their potential use cases, they must connect to the outside worldโ.
If youโre like me, this 90% number may seem high at first. However, it becomes clear the moment you beginning mapping out actual use cases. Letโs do some quick examples:
Example 1: Imagine a sports betting dApp built on Ethereum. Users lock their bets for which team they think will win the super bowl into a smart contract. But how does the smart contract know which team actually won? All it knows are the addresses and balances of each participant.
Example 2: Imagine a cross-chain DEX that allows users to trade across liquidity pools on different blockchains. How does the DEX know the prices of assets across both Ethereum and Solana at the same time?
We could go over many other examples, but at this point it should be clear that the need to bridge on-chain and off-chain is of crucial importance for the future of Web3.
Decentralized Oracle Networks (DONs)
Now that we understand the blockchain oracle problem, the natural question becomes how do we fix it?
Sergey Nazarov and the Chainlink founding team were thinking about this problem long before most people even realized it existed. The resulting solution is known as a Decentralized Oracle Network. Letโs break down what that means and how it works.
According to Chainlink:
โA blockchain oracle is a secure piece of middleware that facilitates communication between blockchains and any off-chain system, including data providers, web APIs, enterprise backends, cloud providers, IoT devices, e-signatures, payment systems, other blockchains, and more.โ
These oracles take on several key functions in regards to interacting with data including: listening, extracting, formatting, validating, computing, and broadcasting.
Rather than going into each of these functions in depth, itโs easier to just separate the job of an oracle into off-chain vs on-chain tasks. The on-chain component centers around receiving requests from smart contracts on the blockchain, then broadcasting different types of data to the external system (DON).
The off-chain component centers around processing these requests, going to fetch the necessary external data and then performing any off-chain computation needed, before feeding the data back into the blockchain.
At this point you may be asking yourself why you even need a network of these oracles to facilitate these use cases, and not just have a single trusted oracle? Surely, there is already existing infrastructure that is well-positioned to perform these functions?
While on a technical level you would be correct, there are some core philosophies inherent to blockchains that would be compromised.
The first is decentralization. If the external data being input to the blockchain Is centralized, then by association, the underlying blockchainโs decentralization is compromised. For instance, all it would take is one bad actor in our gambling dApp example, to feed a false score input to the smart contract and steal all the money.
The second is trustlessness, which goes hand in hand with decentralization. Even if the oracle is a well-known organization, you still need to trust them to always behave appropriately.
It turns out, the way to solve these problems off-chain has a lot in common with how it is done on-chain, with a few key differences.
Rather than a network of decentralized nodes like a blockchain, a DON consists of a network of oracles. While both are digital networks that rely on coordination between participants, the key difference is around what they are trying to reach consensus on.
In the case of a blockchain network, the network is trying to achieve consensus on which node has the right to append a new block of transactions to the ledger. This is done through different consensus mechanisms such as Proof of Work (PoW) or Proof of Stake (PoS).
In the case of a DON, the network is trying to come to consensus on what is the verifiably true piece of data to feed into a blockchain network. Consensus on this data point is reached in a decentralized manner by oracles each submitting their own data point and then taking the mean from the network.
Oracles are incentivized to behave fairly, because they are paid out in $LINK for providing these data inputs to projects. If an oracle is caught misbehaving (I.e. it submits a data point way off from the other oracles) itโs reputation score goes down and it is loses the opportunity to earn more $LINK from providing oracle services.
Note: The model laid out above is often described as โhybrid smart contractsโ as the DONs + smart contracts together bridge the gap between on-chain & off-chain.
Moving Beyond DONs
Decentralized Oracle Networks sit at the heart of the Chainlink business model, and we will explore some of the different use cases that DONs unlock later on. However, before we move on, there are a few different solutions Chainlink offers that Iโd like to delve into.
Cross-Chain Interoperability Protocol (CCIP)
Over time, Chainlink has realized that it can leverage itโs general model for coming to decentralized consensus off-chain + itโs vast network of DONs, and use it to create additional services.
One service that I am especially keen on is the Chainlink Cross-Chain Interoperability Protocol (CCIP). Having researched and worked on many different layer-1 blockchains, I am convinced that the future will be multi-chain.
However, in order to enable this future, there needs to be a set of standards that can be leveraged by developers on different blockchains.
Thatโs where Chainlinkโs CCIP comes in:
โCCIP is an open-sourced standard for developers to easily build secure cross-chain services and applications. With a universal messaging interface, smart contracts can communicate across multiple blockchain networks, eliminating the need for developers to write custom code for building chain-specific integrations. โ
Letโs think about what this means for a moment. Letโs say Iโm a developer and I want to build a cross-chain dApp that needs to pass a message (say a cross-chain social messaging app) I now have a uniform standard that I can leverage for any different blockchain I want to extend the app to.
Outside of just generalized messages, CCIP also unlocks movement of another important type of data: tokens.
With the โProgrammable Token Bridgeโ, developers can securely transfer tokens across blockchain networks and even โinitiate programmable actions on the destination chain.โ
The ability to move assets between chains is crucial in keeping the chain of trustlessness. If a user needs to go to a CEX to swap assets for two different blockchains, then it defeats the original intent.
Billions of $ have already been secured in bridges and invested in infrastructure for bridging assets. I expect CCIP to become a category leader in cross-chain token transfers in time.
Staking
In recent years, a new type of consensus mechanism for layer-1 blockchains has emerged in popularity called โProof of Stakeโ. How PoS works, is that network participants lock* their crypto assets into a smart contract in exchange for becoming a validator (I.e. a node that helps secure and validate transactions) in the layer 1 blockchain & receive rewards for doing these tasks.
Validators are incentivized to behave, because if they are caught misbehaving, then a portion of their staked (locked) crypto funds are reduced. Think of it as a way of aligning incentives in a decentralized network, where instead of it being done via energy (PoW) itโs accomplished via participantsโ assets.
Now remember how I mentioned earlier that Blockchains and DONs share similarities? Well it turns out that the concept of staking can be extended beyond blockchains and into Oracle Networks.
The idea is that by having nodes stake their assets directly into smart contracts affiliated with Chainlink services, it will increase the cryptoeconomic security of said services.
How staking will work at a high level is as follows:
Nodes will have to stake $ LINK via 2 deposits (more on the difference further below)
If an oracle network reports a value that deviates outside of the service level agreement (SLA) it can be reported.
This report is then raised to a second-tier adjudicator that decides whether or not the value provided did break the SLA.
If an oracle network is found to have broke the SLA, then the $ LINK staked by all nodes/delegators in that network will be slashed as punishment.
Nodes that behave, will be rewarded in $LINK for staking and securing Chainlink services.
There are a lot of nuances behind how Chainlink plans to implement staking, but I wanted to hone in on 4 aspects in particular:
Super-linear staking: As laid out in the Chainlink 2.0 whitepaper, the staking mechanism design will make it such that, as the number of oracle nodes staking increases, an attacker will need to budget a quadratically greater amount of $ to successfully execute an attack than what the nodes have staked.
Implicit vs explicit incentives: Chainlink staking will require 2 deposits to participate. The first that can be slashed (reduced) for reporting an incorrect value. And the second, for falsely reporting that a network of nodes have collectively reported a false value. These deposits act as explicit incentives.
Additionally, there is an opportunity cost for misbehaving in the form of missing out on future earnings from being a node operator, I.e. the โfuture fee opportunityโ. This is known as implicit incentives.
Solving diminishing returns on security: Over time, nodes will reach parity in terms of performance. To decide which nodes will win higher-value jobs, nodes can stake more $LINK as a tie-breaker, increasing network security in the process (more $LINK that can be slashed).
Community participation: Chainlink staking is also positive because it is the first use case that allows for general community participation. This can be done via reporting on bad actors (and being rewarded as a result) and by running a node. Long term, there is work being done around delegation protocols, which will allow users to โdelegateโ their $ LINK to a node without having to run one themselves.
Like previous Chainlink rollouts, the team plans to do it in phases, as laid out in this paper. You can see key milestones in the chart below ๐
For more details on staking, check out my recent Twitter thread breaking it down in detail
*Note: Staking on some protocols like Cardano does not require locking of funds
Other Services: Keepers, Town Crier, Off-Chain Reporting
Weโve laid out the primary services and aspects of Chainlink in the sections above, however there is a long tail of other services that they provide.
This includes Chainlink keepers, which can be used to automate smart contract functions in a decentralized, cost-efficient, and highly secure manner.
Town Crier, which is a project developed by Cornell that Chainlink acquired. It is an oracle backed by a trusted execution environment (TEE), which helps ensure privacy. A crucial feature for expanding to Enterprise use cases.
Off-chain reporting which allows nodes to aggregate their information in a single report off-chain using a secure peer to peer network. A consensus algorithm then runs during the communication process where each node submits its data and signs it.
There are also many other small services/features that Chainlink provides, but these encompass the most important ones to date.
Tokenomics
Iโll conclude this section by briefly addressing Chainlinkโs tokenomics. According to Coinmarketcap, Chainlink has a capped total supply of 1,000,000,000 $LINK, with ~469M $LINK considered to be in the circulating supply. This means that long term $LINK will not be inflationary. However, in the short term, the supply available on exchanges will increase in the sense that the circulating supply will go up.
According to Messari, $LINKโs initial token offering was on September 19, 2017 with a $32 million hard cap. The pre-sale sold $LINK at $0.09 per token, and the public sale sold $LINK at $0.11 per token. Between the pre-sale and the public sale, 350 million LINK were dispersed. 35% was allocated to token sale investors, 35% was reserved for Node Operators and ecosystem rewards, and 30% went to LINKโs parent company SmartContract.com.
$LINK currently exists as an ERC-20 token on Ethereum. It is used as both a payments token to pay the Chainlink node operators for providing oracle services, and will eventually be used in staking once that roles out.
Lastly, the Crypto Rating Council (CRC) has attributed a score of 2 of 5 to LINK (with 1 being a perfect rating) in regards to whether or not it is a security. A score of 2.0 puts it level with ETH but behind BTC and XMR at 1.0.
The Chainlink Ecosystem๐ฑ
Now that we have an understanding of the Chainlink tech, we will take some time analyzing the different products Chainlinkโs tech unlocks and what the adoption has been on an ecosystem level.
Chainlink Products
While the following sections could be considered use-cases of Chainlink oracle networks, they list them on their website as โproductsโ. Regardless of the nomenclature, here are some of the top ways Chainlink tech is implemented as products.
Much of the world of DeFi is reliant on external market data & price feeds. For instance, if you want to set up a DEX for managing liquidity pairs, you need to understand what the global price is for each asset otherwise it will create arbitrage opportunities and you will quickly go out of business.
Smart contracts can leverage Chainlinkโs market & data feeds to ensure that they are using the most up-to-date prices in their products.
This is by far the most widely adopted Chainlink product & for good reason, since it is used to secure billions of $ in DeFi.
I also think Chainlink does a great job of visualizing what the data feed process looks like. You can go to data.chain.link to see data feed results in real time. Itโs cool to see!
VRF (Verifiable Random Function)
Another interesting product that Chainlink offers is itโs Verifiable Random Function. It turns out that ensuring provable cryptographically fair randomness on a blockchain is hard!
However, randomness is super crucial for many dApps to function properly. Consider the use case of an NFT mint. What user wants to mint an NFT for a collection that they feel is rigged to give certain users the NFTs with the most rare traits?
Similarly, imagine you are a playing an online metaverse game. What fun is the game if you know the loot boxes or skins can be gamed so that one person gets the top rewards every time?
Through Chainlink VRF, dApp developers can ensure cryptographically secure randomness and prove it to their users.
If there is one major takeaway we should all have from the most recent crypto downturn, itโs that reserves matter!
Whether it is people not feeling confident that they can trust a stablecoin because they donโt understand or know what backs it. Or CeFi lenders like Celsius and Voyager giving out uncollateralized loans to degenerates like 3AC, without their customers knowing.
The bottom line is that in order for DeFi to work, there needs to be transparency into money movements and the reserves backing different projects and assets.
In the wake of Terra Lunaโs collapse, I expect more stablecoins to emerge. In fact we are already seeing this with AAVEโs GHO and Cardanoโs DJED.
These stablecoins will come in the form of fully algorithmic backed stable coins or hybrids that also have real world reserves backing them. In either case, it will be important that users can transparently see what is backing it.
Chainlinkโs Proof of Reserve products allows for the reliable and timely monitoring of both on-chain and off-chain reserve assets. A critical feature for making sure we donโt see a similar collapse to the one we witnessed in 2022.
Despite all the potential smart contracts introduce, they still have some major limitations. One of these limitations is that theyโre not fully automated, and cannot execute their own functions on pre-defined conditions or time. Instead, they need to be triggered in order to execute.
Today, developers work around this process by manually triggering smart contracts through all hours of the day, or having risky and centralized dev-ops infrastructure set up to handle it.
With Chainlink Keepers, developers can automate dev-ops takes and smart contract functions in a highly reliable, decentralized, trust-minimized and cost efficient manner.
This unlocks use cases like automatically harvesting yield at optimal times, implementing advanced trading strategies or liquidating undercollateralized loans.
For more details on how it works and the use cases it unlocks, see the 2 min video above.
Chainlink Ecosystem Adoption
Chainlink has great underlying technical infrastructure and compelling products built on top of it. However, these products are only valuable if they are being leveraged by projects across different blockchains.
We will now take a look at how Chainlink is doing on this front. Itโs important to keep in mind that Web3 is still in itโs infancy. For instance, the top dApp on Ethereum, Uniswap, only saw ~16K total users in the past 24 hours.
That being said, Chainlink has already seen impressive traction in regards to the adoption of itโs products and services.
Note: For this section, I relied heavily on the info at chainlinkecosystem.com
Chainlink ecosystem by the numbers
Letโs begin by analyzing Chainlink adoption at a high-level. In total, Chainlink now supports 1,658 integration across 1,427 projects.
These projects span across 16 different blockchains. Ethereum leads the way with 926 integrations, while Bitcoin sets the floor at 2 integrations.
In total, Chainlink secures $22 Billion (with a B) in total value across these projects, by leveraging 1,025+ total oracle networks and 3.6 Billion+ on-chain data points.
Suffice it to say that Chainlink has seen some serious adoption over the years. In fact, one could argue that it is one of the most widely integrated services across all of Web3. Given this fact, thereโs also an argument to be made that betting against Chainlink is akin to betting against Web3 generally.
Popular use cases
Diving one level deeper, we can see some other trends in terms of product and use case adoption.
Clearly certain products like Data Feeds and VRF are most popular with 824 and 503 integrations leveraging these products respectively.
Meanwhile, other products like Proof of Reserve and CCIP are still very much in their infancy with only 18 and 1 integrations with those products respectively.
In terms of use case categories, DeFi leads the way with 623 integrations. However, NFT and Gaming are both gaining traction with 357 and 207 integrations each.
To me, this demonstrates that Chainlink is pretty well hedged across different use cases. If something like NFTs were to die down in the coming years, but DeFi took off, Chainlink should still succeed. Not many services can say the same aside from some of the larger layer-1 protocols.
The Chainlink Community ๐ค
Iโd be remiss if I didnโt mention the strong community backing Chainlink, specifically the โLink Marinesโ. This is the name that the hundreds of thousands of $LINK holders, builders, and general supporters have given to themselves.
Like other top projects that have been around for previous cycles (Bitcoin, Ethereum, Cardano), Chainlink has a following that consists of some of the most avid supporters in all of Web3. I think this is likely due to the fact that adversity tends to make these communities even stronger. i.e. When people are constantly attacking a project you support, it only makes you defend it harder.
However, there are a few aspects of the Chainlink community that make it unique. For instance, Chainlink has a VERY strong presence on Twitter. However, the area where they seem to have the strongest hold over internet culture is on 4chan.
While some people may laugh off this anonymous (and oftentimes vulgar) message board, real crypto OGs know just how influential 4chan is for driving trends. From an anecdotal perspective, narratives usually start on 4chan then spread to Twitter and Reddit. Over the years, the LINK Marines have been able to establish strong Chainlink narratives through the clever use of memes, jokes and viral campaigns.
Chainlink partners
Beyond the LINK marines, Chainlink also benefits from itโs ecosystem of partners. Since many different blockchains leverage Chainlink, โmaximalistsโ from any major Layer-1 will hesitate to attack Chainlink.
There is also strong respect in the developer community for Chainlink, since they are widely regarded as having some of the best technical documentation and resources in all of Web3. Give Patrick Collins a follow to get an idea for what I am talking about.
Chainlink labs
Finally, there is the Chainlink labs team, which is the team behind Chainlinkโs treasury, products and services. Chainlink labs is led by Sergey Nazarov, who is one of the most respected minds in all of Web3 (some have even suggested that he may be Satoshi).
The Chainlink labs team has seen slow and steady growth over the years. Notably, they havenโt had major spikes or dips in employee count, unlike many other crypto projects. This shows that they know how to weather crypto cycles.
With recent exec hires from LinkedIn and Google, Chainlink Labs looks well positioned to mature as an organization. My one hesitation here is that I hope they donโt bring in too many strictly Web2-focused leaders and go the way of Coinbase. However, with industry vets like Sergey and Benedict Chan, I think they should be able to strike the right balance.
Conclusion
Chainlink is one of those projects, that once you learn about it, youโll wonder how you ever went so long without diving into it deeper.
If you believe that the world works the right way today, then thereโs really no point in Chainlink or Web3 in general.
However, if you believe in a future in which individuals have more sovereignty over their lives, where digital economies do not have barriers to entry, and where important systems are not controlled by centralized (and often corrupt) middlemenโฆ Then itโs quite clear that Web3, smart contracts, and Chainlink are some of the best tools we have at our disposal to build that future.
With an already strong foundation of well-researched tech, secure products, a passionate community and a strong team, itโs hard not to be a LINK marine.
-Alex Valaitis
I donโt charge any $ for my content, but if you want to support me, hereโs 3 different ways that you can:
1)Tip me in $LINK, $ETH, or any ERC-20 token or NFT at my ENS domain๐
2)Subscribe to this newsletter โWeb3 Pillsโ :
3)Follow me on Twitter: @Alex_Valaitis
Disclaimers:
None of the information above is meant to be financial advice. Please DYOR.
Brilliant read! Thank you