Ethereum emerged in 2015 and revolutionized what blockchain could bring to companies and traditional business. Blockchain ceased to be that technology limited to financial transactions and the then quite limited potential of Bitcoin to become the main currency worldwide. The smart contracts arose giving rise to a great name of uses to the blockchain technology.
However, the design of them means that they can hardly manage data in the blockchain. There is a lot of potential behind the technology that is yet to be discovered. Many decentralized applications (
Before focusing on ChainLink, let’s understand what smart contracts are and why they are so important.
What are smart contracts?
“A smart contract is a scheduled contract, whose agreements are established in
That is, a smart contract is far from being a contract in a paper signed by the different parties. It is completely digital, a computer code programmed in blockchain by a programmer and which contains all the information of the same: the people among which it is valid, when it will be executed, when the agreements have been registered, etc. The contract is automatic and can not be modified yet.
Smart contracts are executed once a certain set of circumstances exists and, once a smart contract is executed, the fact that it exists in a decentralized network means that no party can alter its code or interfere with its execution. By avoiding alteration, smart contracts oblige all parties to a fixed agreement, thus creating a type of relationship that does not trust the confidence of any of the parties.
Smart contracts face several disadvantages
However, according to the Chainlink developers, there are several drawbacks in the current structure of smart contracts in the blockchain. For example, because these are based on insured information in a chain of blocks, and because of the way in which miners reach consensus around transaction data based on block chains, smart contracts cannot interact with external resources, such as data sources, APIs or traditional banking systems.
And, as a solution to the aforementioned problems, a decentralized Oracle service called ChainLink appears. With ChainLink the users of the smart contracts can use the oracles to retrieve data from the interfaces of applications programs outside the chain (API), data groups and other resources and integrate them into the chain of blocks. In other words, ChainLink takes external information from applications to the blockchain and incorporates them into it.
Oracles such as ChainLink will be necessary to access the data that many existing protocols need to operate. Well, as its name indicates, ChainLink serves as a link between blockchain and the existing infrastructure.
What are oracles?
The oracles function as a bridge between the real world and the Blockchain by providing data to smart contracts. It becomes an “agent” that finds and verifies the occurrences of the real world and sends this information to a chain of blocks to be used to activate the execution of smart contracts when predefined conditions are reached (such as, for example, a payment received or a price fluctuation).
The fact that these oracles are services of centralized third parties and not being part of the blockchain consensus mechanism makes one doubt whether the data they provide is reliable. For example, if a smart contract depends on the price of a stock and it arrives manipulated, the smart contract could execute the incorrect function based on this erroneous data.
The ChainLink network
The ChainLink network is a decentralized network of ChainLink nodes , which are selling the use of specific data sources, APIs and various off-the-chain payment capabilities directly to a smart contract. The Chainlink Network consists of two separate parts, within the chain and outside the chain, that interact to deliver the service.
As mentioned, its main objective is to unite the block chains with the outside world. For this, it has two main architectural components: chain infrastructure and off-line infrastructure .
This component is made up of chain contracts deployed in the Ethereum blockchain. These Oracle contracts are responsible for processing the data requests of users who seek to take advantage of Oracle services in the network. If any user or entity wants to access data outside the chain, you can send a user contract or application contract to the ChainLink
These contracts have a great function since they are in charge of making the contract that is requested coincide with the appropriate oracles. The contracts include a reputation contract, an order equalization contract and an aggregation agreement.
The reputation contract, as its name indicates, checks the history of an Oracle provider to verify its integrity. The order matching agreement records the service level agreement of the user’s contract in the network and collects the offers from the responsible Oracle suppliers. And finally, the aggregation contract accumulates the collective data of the chosen oracles and balances them to find the most accurate result. To carry them out, the ChainLink network performs a three-stage process.
- Selection of Oracle. By submitting an application contract, the user specifies a set of parameters and requirements for their data search known as a service level agreement (SLA). These can be, Oracle’s reputation, data specifications, amount of data
resources / oraclesneeded, etc. Subsequently, users can manually search for oracles using ChainLink. However, when the manual search is not optimal, an automated matching engine is available. For this option, oracles can make offers according to the agreement of the service level of a contract. Once the contract has received sufficient quality offers, these oracles are selected and the service agreement is initiated.
- Data report. This point is quite simple. When the oracles have been chosen, outside the chain they make the service agreement and transmit the requested data to the blockchain so that the nodes process them.
- Aggregation of results. To ensure the integrity of the data, an aggregation agreement collects the data sent by each of the oracles associated with a requesting contract. In order to provide the applicant with an accurate and weighted answer, the aggregation contract averages all the information. Sometimes, some of the answers
can notbe averaged.
Functions outside the chain
The second component of ChainLink consists of a network of
These off-chain nodes have the function of collecting the requested data from off-chain sources as requested by the users’ contracts. In addition, they have to process the relevant data through ChainLink Core, the central node software that allows the interaction between the chain’s out-of-chain infrastructure and the ChainLink chain.
Once the data is processed, ChainLink Core transmits it to the Oracle chain contract for the aggregation of results. In compensation for this work, Oracle off-chain operators are paid in LINK, the native ChainLink token, for collecting and sending data.
Off-chain nodes also allow developers to integrate add-ons that operators use to accommodate other programs to streamline data collection.
ChainLink uses multiple oracles to collect data for a single application contract . The oracles are expected to use multiple resources for their data collection. This guarantees the distributed nature of the platform and the accuracy of the collected data.
Fountains and distributed oracles
These two concepts discussed above help to understand how ChainLink differs from other Oracle protocols.
ChainLink is totally decentralized. As we have already mentioned, centralized oracles are risky because they can offer fraudulent data.
To overcome these security problems, ChainLink implements what it calls Oracle distribution and origin. To get a reliable reputation, oracles should extract their data from multiple sources. In addition, when a user contract places a request with the network, that request is contracted to several Oracle nodes outside the chain. These oracles may have extracted information from similar or different sources.
In effect, this two-tier distribution system keeps the oracles honest, since each data set is aggregated and compared to one another. The oracles that act and manipulate the data are punished with penalties and a damaged reputation in the ChainLink network.
To compensate for needs outside the Chainlink system chain, the LINK token is used to pay node operators. According to the developers, it is necessary for the Link token to perform this function, since the demand and the value of the tokens are directly correlated with the number of operators offering services outside the chain to the system. The LINK tokens are also used as
The LINK token is described by the developers as “an ERC20 token, with the additional ERC223 transfer and call functionality (address, uint256, bytes), which allows the tokens to be received and processed by contracts within a single transaction “
The sale of LINK tokens had a limit of 32 million dollars. According to the developers, 35% of the total tokens will be allocated to node operators to serve as an incentive. Another 35% was sold in the initial offer of coins (ICO). The remaining 30% of LINK’s total tokens will remain with the company for continuous development and staff payments. Some people have expressed a negative opinion about this distribution, stating that the percentage is too high and could reduce the overall demand of the tokens.
Currently, there are 350,000,000 LINK in circulation of the total 1,000,000,000 LINK. Its price at the time of publication is 0.222878 dollars. It is ranked number 51 in the market capitalization ranking of cryptocurrencies.
Sergey Nazarov was the creator of CHainLink. Although Nazarov already had some experience in creating peer-to-peer markets, the ChainLink platform is, surprisingly, his first blockchain project. Nazarov is backed by Steve Ellis, a software engineer who has built scalable payment automation software for Pivotal Labs
ChainLink has a strong