Chainlink is a decentralized oracle network that furnishes real-world data to facetious contracts on the blockchain.
Smart contracts are pre-avowed agreements on the blockchain that estimate information and automatically enforce when certain contingencies are assembled. LINK tokens are the digital asset token used to remunerate services on the network.
Crowdfunding is a good illustration that if a certain amount of Ether is emplaced into a smart contract by an unspecified date, then payment will be released to the fundraiser emplaced it is not, then payment will be reconveyed to donors. Because smart contracts subsist on a blockchain, they are incommutable and verifiable, guaranteeing a high level of confiding among parties that they accurately editorialize the stated parameters of the agreement and will administer if, and only if, those parameters are met.
This is where oracles come into play. An oracle is a software known as ‘middleware’ that deeds as an intermediary, rephrasing data from the real world to smart covenants on the blockchain and back again.
However, a single centralized oracle creates the very problem a decentralized, blockchain-secured smart contract aims to solve a central point of weakness.
How does Chainlink work?
Chainlink divides its pursuance process into three distinct steps to facilitate communication between its users and external data sources.
Oracle Selection –
First, Chainlink users or consumers draft a service-level agreement that specifies a set of wanted data necessities. The software then exercises the SLA to match up the user with oracles that can hand over the data. Once the parameters are set, the user succumbs to the SLA and deposits their LINK cryptocurrency in an Order-Matching up the contract, which takes attempts from oracles.
Data Reporting –
This is whereabouts the oracles conjugate with external sources and obtains the real-world data desired in the SLA. The data is then fabricated by the oracles and sent back to guarantees functioning on the Chainlink blockchain.
Result Aggregation –
The last step embraces tallying the results of the data oracles collect and return them to an Aggregation contract. The Aggregation contract takes the responses, assesses each’s validity and returns a weighted score using all the user data.
Three types of smart contracts power the Chainlink blockchain.
Aggregating Contracts –
Compose data from oracles and match the most veracious results with the smart contract that requires them.
Order-Matching Contract –
Matchups a smart contract’s service level agreement with the best barring oracles.
Reputation Contract –
Corroborates an oracle’s integrity by checking its track record. This comprehends factors such as the total number of concluded requests, average response time, and amount of LINK cryptocurrency the oracle has endowed.
However, Chainlink also socializes with oracles that do not work on its blockchain and independently responsible for collecting the real-world data solicited by the contracts.
The nodes are made up of two factors:
Chainlink Core –
Chainlink Core is accountable for reading newly filed SLAs and blowing away chores to the Chainlink Adapter.
Chainlink Adapter –
Impersonate as the bridge between the node and the external data. The accouterment can read and process the data and write it to the blockchain.