Sitemap
Coinmonks

Coinmonks is a non-profit Crypto Educational Publication. Other Project — https://coincodecap.com/ & Email — gaurav@coincodecap.com

Follow publication

Chainlink: Bridging the On-Chain and Off-Chain Worlds

6 min readDec 21, 2023

--

Image Credit:

Chainlink is a platform that allows the blockchain to communicate with the outside world. It acts as a bridge between the secure but isolated world of blockchain and the external dynamic world of real-world data.

It is a decentralized oracle network that provides smart contracts with a tamper-proof and highly available connection to all the world's highest-quality data feeds.

Why Get Connected

But why would a blockchain want to get connected with the outside world?

This is a valid question. Think of the most popular cryptocurrency in the world; you'll be right if you guess Bitcoin. Bitcoin blockchain doesn't allow direct communication with the external world, and why would it? All the data that it needs is there on-chain. For example, the most important function of Bitcoin was to dissolve the boundaries between users worldwide. One can send the Bitcoin to anyone without having to explain anything. So all that matters is transactions, which are stored on-chain in any way.

Bitcoin blockchain primarily focuses on recording transactions and maintaining a secure and tamper-proof ledger of who owns what Bitcoin, and that's it! No fancy stuff is allowed. But things changed when we moved to Ethereum. When Ethereum launched, one of the biggest selling points was its ability to execute programs on-chain called smart contracts. One can deploy any logic, such as sending 1 ETH to Ram when the ETH price exceeds $3000. ETH blockchain was Turing complete, unlike Bitcoin.

But as we know, "With Great Power Comes Great Responsibility." Soon, the contracts required to access the external data to be meaningful. Think of what the contracts can do if they only have access to transactions. Not much. They need to have access to the outside world data.

Before Chainlink, smart contracts were limited to information available on the blockchain itself, which is inherently restricted. This meant they couldn't react to real-world events, access real-time data like weather or economic figures, or interact with traditional payment systems.

Here's how things used to work:

  • Limited Functionality: Smart contracts could only rely on pre-determined data stored on the blockchain, effectively operating in a closed loop. This severely limited their potential applications.
  • Centralized Trust: Many attempted workarounds involved centralized oracles, meaning a single entity controlled the data feed, introducing a single point of failure and vulnerability. This significantly contradicts the main selling point of a blockchain, which is decentralization.
  • Security Concerns: Integrating external data often involves risky workarounds, compromising the security guarantees of the blockchain.

The Need for the Missing Link

Chainlink gave smart contracts the power they always lacked. It made them alive. To know what smart contracts are in detail, you can refer to this article:

Let's understand the importance of Chainlink via an example. Let's say you are an avid traveler eagerly awaiting your next trip to Japan. You've booked your flights, packed your bags, and excitedly counted the days. But what happens when unexpected delays throw your itinerary into chaos? This is where FlightDelay, a decentralized insurance protocol powered by Chainlink, comes to the rescue.

Here's the problem that we all face: travel insurance, let's be honest, comes with complex terms, hidden fees, and lengthy claim processes. They often reject your claims when you need them the most with some obscure statement you have never heard of while taking the Insurance.

Delays and cancellations can leave you frustrated and out of pocket while navigating complicated claim forms and waiting weeks for resolution, adding salt to the injury.

FlightDelay's Solution with Chainlink: Here's how FlightDelay rewrites the rules:

  • Decentralized and Transparent: It is built on the blockchain. FlightDelay operates without a central authority, reducing operational costs and increasing transparency. You participate directly in a community-driven pool, eliminating dependence on traditional insurance companies.
  • Data-Driven Decisions: Chainlink is crucial in gathering real-time flight status data directly from trusted sources like airlines and airports. This data feeds into smart contracts, eliminating the need for manual claim filing and human intervention.
  • Automated Payouts: When a flight delay exceeds a pre-defined threshold, Chainlink oracles verify the data and trigger automatic payouts through smart contracts. No more waiting weeks for claims to be processed — you receive compensation promptly and directly.

Chainlink's role in FlightDelay showcases its potential to revolutionize the insurance industry. Similar decentralized insurance protocols are emerging for various scenarios, including weather-related crop losses, health insurance triggered by biometric data, and even parametric Insurance for natural disasters.

All this was made possible because of Chainlink. This is just one example of how Chainlink is actively used today; different fields, such as financial services, DeFi, gaming, NFT collectibles, climate markets, Insurance, etc., heavily rely on Chainlink for the correct data.

Image Credit:

How does it work?

Let's first understand about the components of Chainlink. At its very core, we have what is called Chainlink Core. It's an open-source software that serves as the foundation, enabling smart contracts to interact with external data sources through Chainlink requests.

This software is run by the nodes called Decentralized Oracle Network or DON. They are a dynamic pool of independent nodes called oracles that compete to fulfill data requests, ensuring competition and data integrity. Each node runs Chainlink software and possesses the ability to connect to and retrieve data from external sources. The Chainlink Core software enables the nodes to:

  • Interpret Chainlink requests: The Core software understands the data requested by smart contracts and can parse the parameters and specifications.
  • Connect to external data sources: The Core software provides tools and libraries for oracles to connect to various APIs, databases, sensors, and other data sources specified in the request.
  • Fetch and process data: Oracles uses the Core software to retrieve the requested data from the specified source, potentially performing pre-processing or calculations as needed.
  • Generate proofs and sign responses: The Core software helps oracles create cryptographic proofs that guarantee their data's integrity and tamper-proof nature. These proofs are combined with the data and signed by the oracle before sending it back to the requesting smart contract.
  • Manage reputation and incentives: The Core software interacts with Chainlink's reputation and payment systems, allowing each oracle to track their performance and earn LINK tokens for successfully fulfilling requests.

But how do we know that the particular node is not cheating? Or manipulating the data itself? Well, for this, we have Security Infrastructure. It includes:

  • Secure Signing Groups: Groups of oracles collectively sign data requests, ensuring no single oracle can tamper with the data.
  • Reputation Contracts: Track the performance and reliability of individual oracles, incentivizing good behavior and penalizing bad actors.

Let’s Link Everything Together

Now that we have covered all the significant components let's bind everything together and understand the complete flow:

  • The smart contract specifies the desired data type and source through a Chainlink request.
  • The request is broadcast to the decentralized Oracle network (DON).
  • Individual oracles fetch the data from the specified source, apply cryptographic proofs for tamper-proof evidence, and submit their responses to the network.
  • Secure Signing Groups aggregate and verify the received data, filtering out outliers and discrepancies.
  • The final, aggregated data is securely delivered to the requesting smart contract.

Chainlink oracles can connect to a vast array of off-chain data sources, including APIs, databases, sensors, and real-world devices. Also, LINK, the native token of Chainlink, incentivizes Oracle nodes to participate in the network and fulfill data requests.

I hope this detailed explanation provides a comprehensive understanding of how Chainlink functions. Thank you.

Dive into insightful articles on decentralized systems, Tech, and AI trends: https://www.0xkishan.com. Do visit to show your support.

--

--

Coinmonks
Coinmonks

Published in Coinmonks

Coinmonks is a non-profit Crypto Educational Publication. Other Project — https://coincodecap.com/ & Email — gaurav@coincodecap.com

Kishan Kumar
Kishan Kumar

Written by Kishan Kumar

Failed Astronaut. Building PhonePe

No responses yet