17
Feb
20

Building the Bridge – ChainLink (LINK) explained

ChainLink is a decentralized oracle network built on Ethereum. It aims to be a secure blockchain middleware that intends to connect different smart contracts across blockchains. ChainLink’s developers believe that while smart contracts are revolutionary, their underlying protocols make them unable to communicate with external systems effectively. ChainLink can change this by allowing smart contracts to access vital off-chain resources such as data feeds, web APIs, and traditional bank account payments.

 

The network went live on May 30th, 2019. The company behind this is called “SmartContract.” Back in September 2017, ChainLink raised a whopping $32 million in its ICO and has since become one of the most promising projects in the space. Before we delve deeper into the project, let’s understand the role of an oracle and the importance of interoperability.

 

Interoperability in the Crypto Ecosystem

 

Interoperability is defined as the ability of different softwares to effectively communicate and exchange information with each other. Currently, in the crypto ecosystem, we have different coins such as Bitcoin, Ethereum, Litecoin, etc. The problem lies in the fact that it is challenging for these individual entities to communicate with one another. It is tough for bitcoin to know what is going on in Ethereum and vice-versa. This is why the crypto exchanges, which provide a portal between different cryptos, have become so powerful and important. However, therein lies the problem. Exchanges are not a decentralized entity and are incredibly vulnerable.

 

  • They can get hacked.
  • They can blackout for long periods for system upgradation.
  •  

    However, another reason why interoperability becomes desirable is that it is necessary for the mainstream adoption of the blockchain. For blockchains to succeed, they must be able to interact with legacy systems like financial institutions, etc. Because of now, it is extremely hard for the crypto-world and legacy-world to communicate with one another

     

    Plus, the lack of interoperability is even more prevalent when it comes to smart contract functionality. Initially, the community thought that the smart contract ecosystem would be dominated by chain-maximalism, i.e., one dominant chain to host all the smart contracts. However, that’s not a practical solution. We currently live in a world where multiple blockchains are bringing their own unique functionalities into the market. While that’s pretty exciting, the reality is that we have different smart contracts and dApps running on different protocols, and there is no way for them to communicate with each other.

     

    How do we achieve Interoperability?

     

    There are two ways with which projects will be able to achieve interoperability:

     

  • Blockchain interoperability.
  • Off-chain interoperability.
  •  

    Blockchain Interoperability

     

    In this method, we use a separate third blockchain as a bridge between two different blockchains. This blockchain will maintain a cryptographically secured timestamped ledger of the transactional and messaging activity between the two. Let’s look at the three popular approaches which use this method:

     
    Hub and Spoke: The hub and spoke model is one in which the parent blockchain acts as a central hub to other blockchains (spokes), often called sidechains. This can also help in creating special-purpose bridges to connect with separate state machines outside their ecosystem.
    DeFi: Projects like Wanchain and Icon allow interoperability by focusing mainly on building a decentralized exchange of assets.
    Bridges: In this method, the blockchain acts as a general-purpose bridge between the to aid communication and messaging.
     

    Non-Blockchain Interoperability

     
    This method uses off-chain or middleware systems to facilitate interoperability.
     

  • Atomic Swaps: Atomic swaps are a decentralized method used to exchange two assets without having to go through a centralized exchange. Litecoin and Decred have already tested out atomic swaps between their respective blockchains.
  • State Channels: The lightning network and Raiden are both examples of state channels. In this, the participants lock up a portion of the blockchain via multi-signatures. Within this channel, the participants can conduct as many transactions as they want without committing anything to the blockchain.
  • Operation System: Quant is currently working on a patented Blockchain Operating System, which runs on top of the blockchains to enable cross-chain messaging and atomic swaps.
  • Oracles: Finally, we have oracles. Oracles can be used as general-purpose bridges between blockchains. Oracles can not only allow blockchains to communicate with each other but will enable them to communicate with enterprise systems as well. Due to its versatility, Oracles can allow a wide-degree of cross-communication, which was earlier not thought to be possible.
  •  

    ChainLink – Meeting the Team

     

     
    The main people behind ChainLink are CEO Sergey Nazarov and CTO Steve Ellis. Nazarov is a serial entrepreneur who founded Secure Asset Exchange (an exchange network) and CryptoMail (a decentralized email service) before ChainLink. Ellis used to be a software engineer at Pivotal Labs and worked with Nazarov on Secure Asset Exchange. ChainLink also has an incredible group of advisors. Ari Juels is a professor of Computer Science at Cornell Tech and co-director at IC3, Andrew Miller is an advisor to ZCash and Tezos and Brian Lio is the CEO of Smith+Crown.
     

    ChainLink – How does it actually work?

     

    We have already dabbled a bit into Oracles, but let’s go a little deeper to gain a better understanding of ChainLink. Oracles are agents that find and verify relevant real-world information and submit it to the blockchain to be used in smart contracts. While this is definitely very helpful, the fact is that these oracles are third-party services, which in turn means that you’ll need to trust the data coming through them. This could be problematic due to the following reasons:

     

  • Smart contracts are automated and self-executing. This is why all the data that’s flowing into it must be accurate. If bad data does seep into the smart contract, it could trigger the wrong function.
  • The entire point of working in a decentralized ecosystem is to work in a trustless ecosystem where one doesn’t need to trust any one particular entity.
  • Oracles usually verify their data via notarization or manual human input of unstructured data. However, both of these approaches are flawed because the first method can be recursive, and the latter could be costly, resource-intensive and won’t provide any real-time data.
  •  

    So, where is the solution to this problem? ChainLink developers believe that the answer lies in creating a decentralized oracle network for smart contracts to securely interact with resources external to the blockchain, such as cryptographically secure data feeds, as well as facilitating interoperability in between blockchains. ChainLink is currently focussed on creating a decentralized network of oracles that are compatible with the Bitcoin, Ethereum, and Hyperledger blockchains.

     

    ChainLink Network: On-Chain and Off-Chain

     

    The ChainLink Network has a modular architecture that allows it to be upgradeable. It consists of two separate parts – on-chain and off-chain.

     

    On-Chain Component

     

  • This on-chain component filters the oracles based on the metrics requested by a party to a smart contract through a services level agreement (SLA).
  • As per these metrics, ChainLink collects the oracles corresponding to the SLA queries and sorts them using reputational and aggregation models.
  • It then provides a final collective result based on the query, which will be implemented into the smart contract.
  •  

    Off-Chain Component

     

  • This component consists of oracle nodes that are connected to the Ethereum network. These nodes independently respond to the appropriate off-chain requests.
  • Eg. The New York Stock Exchange (NYSE) could be an example of an off-chain node connected to this network. This NYSE node could provide ChainLink with real-time, accurate trade information.
  • The off-chain nodes which fulfill specific, pre-determined requirements, gather the information requested by these contracts.
  • ChainLink will on-board these off-chain nodes from these different industries into one all-purpose network. ChainLink itself will act as a low-cost middleman to re-route and allocate data.
  • Once the data transfer is complete, these off-chain nodes will get rewarded by the LINK token for their services.
  •  

    Functions performed by ChainLink smart contracts

     

     

    The ChainLink smart contracts perform the following three functions:

     

  • Reputation Assessment: The user sends an SLA to ChainLink, which includes various parameters like “oracle reputation.” If an oracle had previously misbehaved in some way and delivered poor data, their reputation will take a hit. Remember, an oracle only gets paid when they deliver data, which is why it is in their best interest to provide the best possible service to the system.
  • Oracling: After the oracles have been chosen, they execute and deliver the requested data.
  • Aggregation: The contract aggregates all the data taken from the oracles everything and averages it. This ultimately produces a weighted aggregate answer.
  •  

    ChainLink – Paving the way for Smart Contracts 3.0

     

    The current lack of interoperability is preventing smart contracts from scaling up and gaining more mainstream adoption. As of right now, the state of the smart contract space is pretty similar to internet pre-TCP/IP protocols. TCP/IP’s cross-communication protocol enabled networks to easily interact with each other all over the world, while HTTP allowed browsers to load data quickly.

     

    ChainLink can do something similar to this by bringing in unprecedented interoperability into this space. At its core, ChainLink is a general-purpose communication standard that can be used to route input/output data messages between all systems securely.

     

  • Off-Chain Resources: ChainLink’s protocol has been built to transfer off-chain data to on-chain smart contracts efficiently. This property is critical for blockchains that may not be looking to communicate with other blockchains, but do need access to off-chain inputs and outputs. As per ChainLink, over 80% of smart contracts need some form of off-chain resource.
  • Hub and Spoke: The hub and spoke protocols will still require off-chain data to trigger on-chain movements. ChainLink has already announced partnerships with Polkadot, a hub-and-spoke protocol, to provide off-chain data to its network.
  • Decentralized Finance: DeFi platforms will also require real-time and accurate market data to trigger specific asset movements. Wanchain will be integrating ChainLink to do exactly that.
  • General Purpose Bridges: Messaging between different decentralized protocols could be triggered via external adaptors based on the events of other blockchains and systems. Protocols like AION, IOTA, and Zilliqa already have external adaptors available, which could potentially be linked to ChainLink.
  • Enterprise Blockchains: Enterprise blockchain protocols require a high degree of confidentiality and scalability. ChainLink oracles could run in Trusted Execution Environments (TEEs). TEEs are like protected environments, similar to black boxes, which could run trusted computations. TEE-based oracles could be used to transfer information between enterprise blockchains securely. In 2018 ChainLink acquired Town Crier, a TEE-based oracle.
  • Safe Handling of Credentials: By using TEEs, ChainLinks could be used to handle user credentials and private keys. ChainLink oracles running in a TEE could use the secure ecosystem to login to someone’s account to verify whether they’re actually in possession of an asset or not. This functionality could be really valuable for decentralized exchanges.
  • State Channels: ChainLink oracles can be used to ensure that state channels are honored and settled on-chain in the same way that it was settled off-chain.
  • Atomic Swaps: To conduct atomic swaps, it is important for users to know whether the script enabling this swap is valid or not. This script can be easily validated in a decentralized oracle.
  • Operating System: Remember how we talked about Quant’s patented operating system? ChainLink can act as its front-end data loader to easily connect cross-chain smart contracts.
  •  

    The LINK Token

     

    ChainLink’s native token is called “LINK.” LINK is used by the ChainLink network to reward node operators for the following functions:

     

  • Retrieve data from external data sources.
  • Turn data into a blockchain readable format.
  • Off-chain computation.
  • Network upkeep.
  •  

    If a company wants to avail of ChainLink’s services, they will need to pay the relevant nodes with LINK tokens. The Node Operator will determine the final price. LINK is an ERC-20 token with an additional ERC-223 “transfer and call” functionality of transfer. While ERC-20 enables LINK to have the basic features of an Ethereum-based token, ERC-223 will allow the tokens to be received and processed by contracts within a single transaction.

     

    Whenever a smart contract requests data from ChainLink, every node in the network will submit their data and put up their LINK tokens at stake. If a node is guilty of delivering wrong or corrupt data, its stake will be distributed to all the nodes that produced correct data. This mechanism will prevent any wrong-doing or cheating within the network.

     

    Details of the ICO

     

    As mentioned in the very beginning, the ICO raised 114,285 ETH, or USD $32 million. Before the ICO, there was a private sale wherein the going price was 3120 LINK/ETH (roughly ~$0.09) and came with a 20% bonus. Tokens in the public sale were offered at 2,600 LINK/ETH, or ~US$0.11. A combined total of 350 million LINK tokens were sold during these two sales. After this, an additional 650 million LINK tokens were issued. Of these 650 million:

     

  • 55% will be used to reward node operators.
  •  

  • 45% will be allocated to ChainLink’s parent company Smart Contract Limited.
  •  

     

    Conclusion

     

    Interoperability is one of the most significant needs in the crypto space and ChainLink looks to be well on its way to solving this for good. As of press-time, LINK is enjoying some massive bullish sentiment as its price has risen from $2.85 to $4.58 over the last two weeks. ChainLink has the potential to be mass adopted by both the crypto world and the non-crypto world. It really is one of the most promising projects in the space.

    Rajarshi Mitra
    Blockchain Researcher