Chainlink: Cryptocurrency’s best shot at making DeFi mainstream

Camerondimovski
Deeplink Labs
Published in
10 min readAug 6, 2021
Photo by fabio on Unsplash

Chainlink’s decentralised oracle network is the missing link between blockchain and the real world

Oracles are becoming an increasingly foundational 3rd party of the decentralised financial ecosystem (DeFi), providing off-chain data for blockchain smart contracts. Oracles also make it possible to utilise data collected on-chain for off-chain purposes. As a result, their market value has risen to over tens of billions of dollars, with over 80% of decentralised applications requiring an oracle ¹.

What are oracles, and why are they so important to DeFi?

Oracles seek to address two problems. The first problem is that blockchains such as the Ethereum network that allow smart contracts to run cannot support native communications to external network systems which provide information from the “real world”. The second problem is that the oracle network is a centralised protocol running to the blockchain, defeating the purpose of on-chain.

Enter Chainlink: a decentralised oracle network bridging the gap between off and on-chain.

“Chainlink (LINK).png” by Z117 licensed under CC BY-SA 4.0

Sergey Nazarov and Steve Ellis founded Chainlink in June 2017 ². Their goal was to provide a Meta layer between real-world data and data on the blockchain. The Chainlink network’s components are often divided into off-chain and on-chain use. Off-chain, Chainlink operates as an ecosystem of oracle nodes that hook up with on-chain protocols, such as Ethereum. On-chain, Oracle functions as a series of smart contracts. This permits Chainlink node operators to request data from the off-chain oracle nodes, which monitor and run data requests advanced by users.

Chainlink — The Process

The Chainlink process begins on a smart-contract enabled blockchain. Smart contracts are self-executing contracts agreed upon by a seller and buyer and written into lines of code, which are called transaction protocols ³. These transactions are transparent, irreversible and traceable. The smart contract requests information and data off-chain. Chainlink responds to this request by creating what it calls an event. This triggers the creation of a corresponding Chainlink Service Level Agreement (SLA). The SLA searches and collects the off-chain data.

Within the SLA ⁴, three other important contracts are then executed :

  1. Chainlink Reputation Contract
  2. Chainlink Order-Matching Contract
  3. Chainlink Aggregation Contract

Chainlink Reputation contracts verify the reputability of the oracle provider by assessing the past performance history of the node. Here is an everyday comparison: a bank was searching the reputability of a client and 49 out of 50 banks evaluated the credit history as positive. If the remaining bank deemed the client unreliable or disreputable, then it would be in the interest of the bank searching to discard this bank’s reputation score. Chainlink reputation contracts work similarly. Nodes could be used to verify information relating to a source like a weather sensor — if nine nodes verify the information as acceptable and one node deems it unacceptable, then the Reputation Contract will deem it reputable based on this information.

The Chainlink Order-Matching Contract processes the log of the user’s proposal on the oracle network. The contract collects offers from the oracle providers, distinguishing between them based on their past performance evaluation from the reputation contract. The information is computed, processed and evaluated into one accurate result by the Chainlink Aggregation Contract ⁵.

Once complete, Chainlink core software in the nodes translates the on-chain programming language to a data source that can be understood off-chain. The newly translated data is then routed to an API, collecting requested data. Examples of off-chain APIs include the Stock Market and FX rate ⁶. Once the data has been collected, a similar process is followed before it returns to the Chainlink Aggregating Contract. The fulfilled obligations of the reputational contract, order-matching contract and aggregating contract duties mark the completion of the SLA.

Chainlink — LINK Tokens

Chainlink is built on Ethereum and as such all LINK tokens are created per ERC-20 standards for tokens. LINK tokens are used by Contract holders requesting a smart contract for a task. Contract holders pay node operators with LINK to operate the node for the request ⁷. The prices set by the Chainlink node operator are based on the importance of the information provided within the market. Additionally, operators of the nodes will stake on the network and deposit LINK as proof of their commitment, incentivising good service within the operation. Choosing to match nodes undergoes the aforementioned process of utilising the Chainlink reputation contract to assess the side of the node’s stake when picking the node to pair with for the data being requested. Moreover, the greater the stake equates to a higher likelihood to be chosen by the SLA to fulfil the requests, dually earning more LINK tokens for node operators. Lastly, any malicious or disreputable node operators will incur a tax on the stake of the node.

Chainlink — Adoption and Use Cases

Chainlink products have been widely adopted ⁸ by a diverse range of protocols to facilitate certain tasks ⁹. These tasks include empowering decentralised lending and borrowing applications, derivative markets, price feeds to settle trades, insurance, pegging assets, connecting real world assets, payments, asset management and even NFT’s and Verifiable Random Function (VRF) ¹⁰. VRF can be utilised by smart contract developers to provide a tamper-proof RNG for applications where unpredictable outcomes are necessary. Some applications include Blockchain games and NFTs, random assignment of duties and resources and lastly choosing a representative sample for a consensus mechanism. Binance Smart Chain (BSC) was a relatively recent important project to implement Chainlink’s VRF.

“Chainlink Decentralised Services” by Chainlink under Terms of Service.

Chainlink has also been adopted as part of the yearn.finance protocol in v2 LINK yVault, otherwise known as yvLINK ¹¹. Within this vault, yearn.finance can supply LINK to Vesper Finance LINK Pool to earn VSP(Vesper LINK), resulting in rewards that can be harvested and then sold with these rewards for additional LINK that will be deposited within the vault. Another development is lending LINK on AAVE, gaining interest and then staking the accumulated AAVE after as a reward (AaveLenderLINKBorrowerSUSD). Lastly, yearn.finance utilitises LINK by locking it at MakerDAO via the LINK-A minting DAI, which then uses the minted DAI as a deposit on v2 DAI yVault earning yield (StrategyMakerLINKDAIDelegate).

Chainlink also offers lending and borrowing applications. These applications provide price feeds that can compute collateral values, commitment to loans and liquidate features according to the market prices. Notable protocols utilising Chainlink are: Aave’s borrowing and lending of a multitude of on-chain tokens; CREAM’s on-chain money market on Ethereum; and Sushiswap Kashi’s lending and margin trading solution, which was created on the BentoBox smart contract.

Chainlink authorises derivative markets and synthetic assets by providing the current asset price at the time of the settlement or trade. Protocols that use this capability include: Synthetix; which is one of the largest derivatives protocols; Opium Exchange, where Chainlink can empower options, credit default swaps, and futures; and MCDEX, as Chainlink can provide current pricing for automated market makers and order books.

Chainlink can also provide feeds for prices used to settle trades, determine the price associated with a selected liquidity mining collateral, create market strategies and provide a secure off-chain computation of collateralised value. A notable protocol that empowers its services through Chainlink providing spot trading and perpetual contracts is dYdX. Another notable protocol is Curve, which Chainlink authorises through its automated market-making features and low slippage between pegged assets.

Insurance is another area where Chainlink eases the process of providing parametric insurance applications and supporting the protocol’s policy, incorrect rebalancing or payouts for insured funds. Arbol is one protocol that Chainlink facilitates using parametric crop insurance for farmers derived from weather conditions. Etherisc is another protocol which uses Chainlink to facilitate solutions to real-world flight delays through insurance payouts and settlements.

Chainlink utilises pegging assets to empower protocols by assessing off-chain reserves that can balance on-chain token use. If needed, it triggers a rebalancing with lost pegs. Paxos, a real financial world brokerage, provides real-world assets facilitated by Chainlink. Another example is TrustToken, which is a blockchain stable coin supported off-chain by reserves in USD.

Real estate company RealT has adopted Chainlink to provide it with current data regarding the value of an asset. Chainlink presents them off-chain with a valuation represented on-chain. In particular, Chainlink facilitates tokenised real estate for RealT and authorises users to buy parts of a property’s inherent cash flow.

Outside of delivering data, Chainlink can also trigger on-chain events off-chain based on previously specified conditions. B-protocol is one notable example. It uses Chainlink to empower liquidation, making lending more trustworthy through increasing protocol security. Another example is Keep3r, which may be used to automate on-chain transactions such as liquidations that occur off-chain.

Finally, one of the more famous examples is the NFT craze’s use of Chainlink for on-Chain collectibles. Chainlink’s VRF, as mentioned above, provides a proven, fair source of randomness which is used to generate random NFT traits and issue a reward to a user. Etherlegends, Aavegotchi and Axieinfinity are three protocols that authorise Chainlink to facilitate tasks. These tasks include: collectibles backed by interest generating tokens; PvP and PvE trading card games; and Pokemon inspired universes where VRF can be used to battle Axies. Additionally, on-chain gaming is another area that utilises Chainlink’s VRF to generate random in-game scenarios and immutable prizes. Blocklords, Planetarium, War Riders and Evolution land are notable examples of Blockchain/cross-chain game applications ¹².

Chainlink — Grants and Research

Chainlink has deployed grant programs to collect fundamental resources for the generation of developer tools, high-quality data, and to launch services in or around the Chainlink Network ¹³. Listed on the website are five categories of grants that are available: community grants, integration grants, bug bounty programs, research program grants, and social impact grants.

The community grants empower developers to build tools and infrastructure for the Chainlink network. The purpose is to accelerate smart contracts and secure node infrastructure. ChainSafe is an example that received a community grant for the Ethereum JavaScript Library to expand to include web3.js. Another important example is LinkMarine, which received a grant to build a Chainlink News Website, one of the first of its kind ¹⁴.

Integration grants support teams, projects, and protocols globally to become part of Chainlink’s ecosystem by providing services and technology from Chainlink. Notable recipients of integration grants include SmartPy, who received an integration grant for Chainlink Price feeds of Tezos. Blockspaces and LinkUp Florida received a grant to integrate Chainlink on Near Main net and Blockchain integration with Solana and Avalanche.

The bug bounty programs encourage engineers specialising in security and developers to examine Chainlink’s core code. This grant encourages the creation of greater stability by incentivising protocols to search for current and potential attack vectors.

The research grants support academics and researchers to undertake cutting-edge research into Chainlink, propelling the network as a whole forward.

Social impact grants support NFP’s and organisations to research the utilisation of smart contracts and data on-chain for the betterment of humanity and innovative emerging markets.

Chainlink 2.0 — What’s new:

In April 2021 Chainlink Labs released a white paper ¹⁵ outlining new abilities and potential future uses for the network. These included scalable off-chain computation, explicit staking and privacy-preserving features contributing towards Chainlink Lab’s long-term vision of becoming a Decentralised Meta layer ¹⁶. The white paper outlined 7 core functionalities: hybrid smart contracts, abstracting away complexity, scaling, confidentiality, order-fairness, trust minimisation, and incentive-based crypto-economic security.

“Chainlink Decentralised Oracle Networks provide access to any off-chain data” by Chainlink under Terms of Service

While hybrid smart contracts are already being deployed (as mentioned in the Paxos use case above), we are going to see with 2.0 a scaling of hybrid smart contracts ¹⁷. This evolution as termed in the white paper will change the existing oracle network into the vision of Chainlink being a Meta layer with the introduction of Decentralised Oracle networks (DON).

Super-linear staking ¹⁸ seeks to incorporate the concept of a quadratic staking impact into the Chainlink protocol, requiring prospective attackers to have resources quadratically higher than the aggregate security deposits of all nodes in a decentralised oracle network ¹⁹.

Essentially, Chainlink will require two deposits ²⁰ as collateral from node operators:

  1. A deposit which can be slashed for malicious behaviour
  2. Implicit incentives, the opportunity cost for nodes behaving in a dishonest manner

Chainlink Labs’ Chief Scientist Ari Jyles developed Off-Chain Reporting (OCR) to improve scalability of on-chain data ²¹. Instead of oracle nodes pulling data on-chain, incurring gas fees from Ethereum, data aggregation can happen off-chain. OCR can be used for a variety of purposes, such as updating Proof of Reserve and insurance. It is estimated that OCR will be able to bring ten times more data on-chain while also minimising costs by up to 90% ²².

Chainlink is paving the way to the successful integration of decentralised finance with the mainstream economic system by providing solutions to the latter’s concerns about the former without compromising the foundational tenets of DeFi.

¹ https://www.youtube.com/watch?v=oszRMlrmm6o

² https://coinflip.tech/blog/cryptocurrency-explained-chainlink

³ https://www.blockchain-council.org/blockchain/why-and-how-to-use-smart-contracts-to-build-blockchain-applications/

https://coinflip.tech/blog/cryptocurrency-explained-chainlink

https://www.gemini.com/cryptopedia/what-is-chainlink-and-how-does-it-work

https://coinflip.tech/blog/cryptocurrency-explained-chainlink

https://www.gemini.com/cryptopedia/what-is-chainlink-and-how-does-it-work

https://www.fxstreet.com/cryptocurrencies/news/chainlink-adoption-continues-while-link-price-eyes-pullback-202104290503

https://blog.chain.link/44-ways-to-enhance-your-smart-contract-with-chainlink/

¹⁰ https://docs.chain.link/docs/chainlink-vrf/

¹¹ https://medium.com/yearn-state-of-the-vaults/the-vaults-at-yearn-9237905ffed3#:~:text=This%20vault%20accepts%20deposits%20of%20sCrv%20tokens%20obtained%20by%20supplying,pool%20to%20obtain%20more%20sCRV.

¹² https://smartcontentpublication.medium.com/completing-the-god-protocols-a-comprehensive-overview-of-chainlink-in-2021-746220a0e45

¹³ https://chain.link/community/grants

¹⁴ https://www.youtube.com/watch?v=oszRMlrmm6o

¹⁵ https://research.chain.link/whitepaper-v2.pdf

¹⁶ https://decrypt.co/66610/chainlink-2-0-a-plan-to-turn-defi-into-a-500-billion-industry

¹⁷ https://investorplace.com/2021/06/chainlink-2-0-will-boost-the-link-crypto-to-new-heights/

¹⁸ https://blog.chain.link/explicit-staking-in-chainlink-2-0/

¹⁹ http://web.archive.org/web/20210505040641/https://chainlinktoday.com/how-super-linear-staking-offers-greater-cryptoeconomic-security/

²⁰ https://decrypt.co/66610/chainlink-2-0-a-plan-to-turn-defi-into-a-500-billion-industry

²¹ https://decrypt.co/59244/chainlinks-latest-upgrade-a-rapid-evolution-for-defi-ceo-sergey-nazarov

²² https://www.zdnet.com/article/off-chain-reporting-towards-a-new-general-purpose-secure-compute-framework-by-chainlink/

--

--