Defining Chainlink
Chainlink is a decentralized oracle network, which acts as a bridge to provide external data to smart contracts on blockchain. What do we mean by this? Let’s break it down.
Price Oracle
DeFi protocols rely heavily on price oracles to ensure the accuracy of the price data they display on their platforms. That price data must be accurate so that investors can adjust their positions accordingly. Faulty price information can lead to many problems, not least of which are unfair arbitrage opportunities between trading platforms.
Moreover, price oracle data introduces valuable conformity to the young DeFi industry, where little conformity exists beyond the technical aspects. Chainlink’s price oracle currently represents the industry standard, to the extent that a partnership with Chainlink is a strong enough indicator of longevity for a DeFi protocol to lead to a pump of its token price.
Smart Contracts
Smart contracts are automated contracts on blockchain that execute if and when certain preset conditions are met. Smart contracts are incredibly important for decentralized systems, as they allow for distributed network coordination without a central authority. If you’ve read our previous guide on blockchain, you’ll know that blockchain networks like Ethereum are decentralized.
Chainlink is built off of the interaction between smart contracts and the real-world external inputs that trigger their functions. All of this happens on-chain, and began on Ethereum.
Chainlink uses smart contracts to operate as an oracle service - a computer program that provides bilateral communication between on-chain and off-chain environments. There are both inbound and outbound oracles, though the former is more common.
The Oracle Problem
Chainlink also importantly addresses what is known as the Oracle Problem, which refers specifically to how isolated blockchains receive their data. Because smart contracts must rely on external information, the reliability and accuracy of the data is crucial. And if the data comes from a centralized source, there is an even higher risk because it introduces counterparty risk or a single point of failure (SPOF) - in other words, if the data is compromised, it affects the entire system.
Chainlink solves the oracle problem by providing a decentralized oracle service that is open-source and additionally secured by reputation systems and data signatures.
How Does Chainlink Work?
Structurally, Chainlink is similar to blockchain in that it is a distributed, decentralized network of nodes that receives and validates data. It is also blockchain agnostic, which means it is programmed to run natively on multiple different blockchains. Chainlink provides both oracles as well as a framework for constructing an infinitely scalable oracle network! Let’s run through the key components of the Chainlink infrastructure.
Nodes
Nodes on the Chainlink network are responsible for intercepting on-chain data requests from smart contracts, retrieving the off-chain data from APIs, and feeding it back to the smart contracts. Nodes are absolutely integral to the functioning of the network. Smart contracts can either send data requests to a single Chainlink node, or ideally the whole network, as it aggregates data from multiple Chainlink nodes.
The Chainlink network supports two kinds of node models, a simple one (the Standard API Model) and an advanced one (Origin Signed Data Model). In the first, the node operator is a middleman between the data provider and the smart contract; in the second, the data provider runs its own Chainlink node and furnishes data directly to the smart contract.
Contracts
To start the process, a smart contract makes a request for data by issuing a Requesting Contract. The Chainlink protocol registers this and creates a new smart contract called the Chainlink Service Level Agreement Contract (SLA), on the same blockchain.
The SLA contract produces three sub-contracts: the Chainlink Reputation Contract, the Chainlink Order-Matching Contract, and the Chainlink Aggregating Contract. The first verifies node performance history and reliability. The second delivers the data request to Chainlink nodes and chooses appropriate nodes to match the specific demand. The third contract eventually aggregates and validates all the data from the chosen nodes.
Chainlink nodes use a software called “Chainlink Core'' to translate the smart contract data request into an off-blockchain programming language that a real-world data provider can comprehend. Once the data is accumulated off-chain, it is retranslated back into an on-chain language.
LINK Token
Chainlink’s native token LINK is a utility token primarily used to pay nodes for their validating work. LINK is an ERC-20 token with an ERC-223 function, which allows it to better interact with smart contracts. As Chainlink uses a PoS mechanism, LINK can also be staked by node operators as a means of increasing their chances at validating transactions, therefore incentivizing honest node behavior.
LINK is down from its ATH of $52 this past May, but is still solidly ranked in 15th place by market cap. Price aside, the community behind both the coin and the project as a whole is impressive.
Chainlink Use Cases
Unsurprisingly, Chainlink has a wide range of use cases, as smart contracts without access to reliable external data are incredibly limited. As we mentioned earlier, Chainlink’s pioneering oracle service is fundamental to the entire blockchain industry. As a middleware solution, Chainlink importantly bridges the gap between old legacy systems and new blockchain systems. This allows it to connect with other blockchains, retail payment systems, market data, and more. Let’s look at some of Chainlink’s top use cases!
DeFi
DeFi is powered by ecosystems with smart contract functionality, which allows them to offer a wide range of decentralized financial services like borrowing and lending, trading, AMMs, and yield farming. These depend heavily on a supply of accurate market data so that users can more accurately assess their positions and risks.
Here, Chainlink offers its Chainlink Price Feeds service, which allows DeFi protocols to track asset prices. This provides a service essential to many financial products, like tracking underlying asset prices for stablecoins. Aave, an Ethereum-based liquidity protocol, uses Chainlink price feeds to assess user collateral and debt in order to accurately time liquidations.
Protocols can also use Chainlink oracles for yield farming, to calculate the value that users have locked into the protocol. This is important in determining how users are rewarded.
Gaming
While DeFi makes up the largest market for smart contracts, gaming platforms are becoming increasingly popular, especially with the recent NFT boom. NFTs in particular rely on provable rarity in order to retain value, which is where Chainlink comes in with its verifiable random function (VRF).
Chainlink VRF successfully provides RNG (Random Number Generation), which is critical for NFTs as it can provide on-chain cryptographic proofs of a token’s uniqueness. It also helps generate random attributes, and the popular dApp Axie Infinity uses Chainlink VRF in order to produce provably random traits for its Origin Axies. Chainlink oracles are also able to mint NFTs based on outside events or data.
Insurance
Chainlink can also be used for various types of insurance, from flight and car insurance to health insurance. The use of smart contracts helps to provide a more objective and transparent model for the insurance industry. For instance, decentralized insurance protocol Etherisc uses Chainlink oracles to access real time flight data in case of delays, removing the hassle of manual claims processing.
With advancements in IoT wearables (like a FitBit) and biotech sensors, health insurance companies can leverage smart contracts to reliably track patient health data. This can trigger mandatory checkups or issue insurance discounts based on exercise routines, weight and heart rate. The future really is now.
Takeaways
Chainlink is a decentralized oracle network, integral to the successful operation of major blockchains. This is because all blockchain protocols rely on the supply of accurate, real time external data. And with the rise of DeFi, there has been increased interest in and demand for oracle services that provide high-quality price information.
Deemed a Technology Pioneer by the World Economic Forum in 2020, with high-profile partners like Google and SWIFT, Chainlink is a pillar of the blockchain industry. Just as computers evolved drastically with the advent of the Internet, Chainlink has become the decentralized Internet for blockchain - bringing the outside world to smart contracts.