What Is Chainlink and How It Provides Information to the Blockchain
A look into the data provider of the blockchain world
Before we get into how Chainlink works, let us look at how traditional apps and their systems work. Here, we have a client and a server who constantly communicate.
The client runs on the user's browsers and requests information from the backend using an HTTP request. This request, an API call, is processed by the backend, which sends the requested response.
The backend makes the response with the help of information from the database and some defined logic. This backend is run on a centralized server.
Now let's take a look into how decentralized apps or Dapps work. A user on a Dapp will need to connect their account to a wallet such as Metamask. Metamask provides the user with a public and private key to communicate with the blockchain.
The client-side is pretty much the same as a traditional app. The main difference is the inclusion of a library like Web3.js that allows communication with the blockchain.
The backend is where things get very different. The backend for Dapps is in the form of smart contracts. A smart contract is a bunch of code run on the blockchain. In the case of Ethereum, a smart contract is a collection of code(functions) and data(state).
These smart contracts are a type of account and therefore have an address. Users can interact with the smart contract by creating a transaction with its address.
At a glance, everything seems simple. Smart contracts act as the backend. So why do we need a data provider like Chainlink?
P.S. When I mention blockchain below, I will only refer to the Ethereum blockchain.
The Blockchain is Deterministic
The Ethereum network consists of a cluster of nodes that validate transactions, execute smart contracts, and a bunch of other stuff. All of these nodes must obtain the exact outcome of the state of the blockchain to come to a consensus. For this, they require the same set of inputs.
Communicating with external sources requires the use of API's. These API's however, have variable data and discrepancies. For example, the price of Eth to USD on one day will differ from the price on another day.
So if a smart contract cannot access API's how do we communicate with the outside world? This is where Chainlink comes into play.
How Chainlink Overcomes this Problem
There are many aspects to how Chainlink can overcome this problem efficiently. Let us look at each one-
Oracles solve this problem by posting data to the blockchain. An Oracle is a smart contract that can query API's with the help of off-chain computation. Its state is updated periodically by sending transactions to the Oracle.
So if a Dapp needs some information from an external source, it can ask it from the Oracle by sending a transaction.
Network of Oracles
The use of a single Oracle is not very secure, however. It also is not decentralized. This is referred to as the Oracle Problem.
Chainlink uses a decentralized network of Oracles to avoid a single point of failure. They collectively retrieve data from multiple sources, validate it, and finally deliver it to a single point of the main Oracle smart contract.
Computing everything on the blockchain is expensive. Even small computations cost a bomb nowadays. In Chainlink, the oracle network communicates off-chain and finally sends only one transaction on-chain with the result.
This also allows the system to remain decentralized as every Oracle node signs its part of the transaction.
This way, there are lesser gas fees. Chainlink has reported that it helped them reduce operating costs by 90%. They also said this would allow ten times more real-world data for smart contracts.
Blockchain technology still needs some time for total adoption. There are still many areas where it doesn't make sense to move over from a traditional app. If decentralization is what you seek for your business, then do not miss out on this well-reviewed blockchain development company in Seoul. Head your way into the world of decentralization!!
Chainlink is helping accelerate blockchain adoption by providing real-world data. Chainlink's technology and community have made it the best of all the available data providers available.
You are viewing an NFT