Chainlink's CCIP: Unlocking the Potential of Hybrid Smart Contracts

Smart contracts operate within the blockchain system, carrying out calculations, repetitions, and actions automatically according to predefined...

Read more

Chainlink's CCIP: Unlocking the Potential of Hybrid Smart Contracts

Smart contracts operate within the blockchain system, carrying out calculations, repetitions, and actions automatically according to predefined instructions from their creators. However, in many scenarios, smart contracts require specific information to act as a trigger for their execution, like they might need to know the current exchange rate of a cryptocurrency against the USD.

In such cases, the smart contract must reach beyond the blockchain to obtain the necessary information and proceed based on the results. This role of providing external information is fulfilled by entities known as ‘oracles’, leading to the creation of a more advanced type of smart contract called 'Hybrid smart contracts.’

Better yet, Chainlink leverages these hybrid smart contracts to create an even more advanced version known as a "cross-chain hybrid smart contract", which then gives rise to their Cross-Chain Interoperability Protocol (CCIP).



So, What is a Hybrid Smart Contract?

In short, a hybrid smart contract is a type of smart contract that blends computations within the blockchain system (on-chain) with computations that occur outside the blockchain (off-chain). A hybrid smart contract has 2 parts: a smart contract, a self-executing program on the blockchain, and a decentralized oracle network (DON), a secure off-chain service that supports the smart contract.



What is a DON?


Figure 1. CCIP Decentralized Oracle Network. Source: Chainlink

To begin, we need to understand the concept of blockchain oracles. A blockchain oracle functions under the control of a solitary entity or organization. Its role encompasses the retrieval and transmission of data to smart contracts. However, this centralized setup gives rise to single points of failure and the potential for data tampering, thereby jeopardizing the dependability and trustworthiness of the smart contract. Due to the automated and unalterable nature of blockchain transactions, an erroneous smart contract outcome stemming from inaccurate data will remain irreversible.

To address these concerns, the solution lies in a Decentralized Oracle Network (DON). A DON involves a network of autonomous nodes or participants that collaboratively furnish and authenticate external data. This approach significantly heightens security and dependability by curtailing the risks associated with data tampering and the vulnerability of single points of failure.



How Chainlink Empowers Hybrid Smart Contracts

Chainlink’s DONs establish an advanced hybrid smart contract framework, enabling seamless, secure, and comprehensive automation across diverse systems and blockchains. These hybrid smart contracts not only promote trustworthy collaborations but also simplify the integration of current infrastructure into blockchain networks, all without backend changes. Through DONs, Chainlink empowers developers to transcend smart contract limitations by merging blockchain's deterministic execution with other secure outsourced services, improving connectivity, privacy, scalability, and fairness.

And through this sophisticated hybrid smart contract approach, Chainlink introduced the Cross-Chain Interoperability Protocol (CCIP) to facilitate cross-chain communication and interaction between networks.

Figure 2. CCIP Architecture and Billing. Source: Chainlink

In the context of a CCIP cross-chain transaction that comprises on-chain and off-chain execution, let's dissect the primary components for each domain.



On-chain Components
Router

Serving as the point of entry for users seeking to transmit messages or tokens across various chains, the router's primary role is to direct requests to the appropriate OnRamp contract located on the source chain.

There is only 1 router contract per chain.


Commit Store

The Committing DON is a ‘messenger’ who passes a summary message (called the Merkle root) of the completed messages on the original blockchain to a special storage place called the Commit Store on the destination blockchain. But before this message can be used on the destination blockchain, it needs to be accepted by the Risk Management Network.

There is only 1 Commit Store per lane.


OnRamp

Responsible for verifying the legitimacy of incoming requests and facilitating their submission to the Committing DON, the OnRamp contract also manages billing and any necessary token transfers by interacting with the TokenPool.

There is only 1 OnRamp per lane.


OffRamp

OffRamp’s job is to verify the proof provided by the Executing DON against the blessed Merkle root, and ensure transactions do not repeat. After checking, the OffRamp sends the message to the Router. If tokens are involved, the OffRamp arranges for the receiver to get them from the TokenPool.

There is only 1 OffRamp per lane.


Token Pools

Every blockchain has its own token pool. These token pools can be set up in a way that the tokens are either locked or burned on the original blockchain and then unlocked or created on the new blockchain when needed.



Off-chain Components
Committing DON
  • The Committing DON is responsible for bundling the requests and creating a Merkle root.
  • The Merkle root is then signed by a quorum of oracle nodes and submitted to the CommitStore contract on the destination chain.

The job waits for ‘finality’, which is based on the source blockchain. This finality ensures that funds on the destination chain are accessible only after they've been securely added to the source chain. The time for this confirmation can differ among networks; some provide immediate confirmation while others need several checks.


Executing DON

The Executing DON's job is to check if the transaction is recorded under any Merkle root in the CommitStore contract while waiting for approval from the Risk Management Network.

  • Once approval is clear, it makes a proof that the OffRamp contract confirms.
  • Once confirmed, it finishes the transaction on the destination blockchain via OffRamp contract.

The Risk Management Network

The Risk Management Network consists of nodes that check transactions in the Merkle roots that have been sent to the Commit Store.

  • Nodes compare stored data with new transactions.
  • If they match, the system approves ("blesses") the data.
  • If there's an issue, the system flags ("curses") it.
  • Too many flags pause the system to stop any further transactions.


Other Use Cases of CCIP: Real World Asset (RWA)

Chainlink's CCIP serves as a pivotal link, enabling cross-chain hybrid smart contracts to facilitate the secure and dependable exchange of data between diverse blockchains and external data sources, including real-world assets.


Figure 3. CCIP serves as the bridge that connects both private and public blockchain networks, forming a cohesive Internet of contracts. Source: Chainlink

Sergey Nazarov, Co-founder of Chainlink, emphasized that the CCIP goes beyond connecting DeFi applications to various chains and establishing a standardized communication framework among different chains. According to him, the CCIP also introduces a private-public dynamic that extends access from traditional finance to digital assets.

With CCIP in play, we've entered a flourishing era of Real World Assets (RWA). By integrating Chainlink CCIP, traditional systems can join forces with blockchain technology, enhancing security, efficiency, and transparency in business and social processes. The proof lies in the impressive partnerships, including global giants like SWIFT projects, BNY Mellon, Citigroup Inc., BNP Paribas, among others.

The integration of Crypto and TradFi promises increased liquidity, heightened demand, and a substantial influx of Real World Assets. According to projections by Northern Trust and HSBC Bank, tokenized assets could comprise 5-10% of the global total by 2030. Larry Fink, the CEO of BlackRock, shares the belief that the tokenization of assets such as bonds and stocks will emerge as a significant trend in the coming years.



Conclusion

DONs enable an advanced hybrid smart contract framework, seamlessly automating collaboration among independent entities across systems and blockchains. Chainlink empowers developers to overcome smart contract limitations, leveraging blockchain's execution guarantees while securely outsourcing functions like connectivity, privacy, scalability, and order fairness to DONs.

In conclusion, this innovative technology lays the foundation for CCIP, enabling secure and dependable data sharing between different blockchains and external data sources, including real-world assets. CCIP brings efficiency and transparency to a wide range of sectors, including identity verification, financial markets, supply chain management, insurance, gaming, marketing, and governance. These advancements fill the gaps in services that blockchains cannot inherently provide, extending secure collaboration beyond the blockchain infrastructure itself.



Reference

  1. Slava Nahnybida on Avivi, Hybrid smart contract and the role of the Oracles, August 18, 2022

  2. Chainlink, Hybrid Smart Contracts, July 25, 2023

  3. Chainlink Blog, Unlocking Cross-Chain Smart Contract Innovation With CCIP, January 19, 2022

  4. Elizabeth Licorish on Chainlink Today, Chainlink CCIP To Enable Cross-Chain Hybrid Smart Contracts In 2022, January 6, 2022

  5. Pedro Solimano on Decrypt, Chainlink Launches Cross-Chain Protocol to Bridge Blockchains With Traditional Capital Markets, July 18, 2023

  6. Chainlink, Chainlink for Enterprises: The Gateway to All Blockchains, March 09, 2022

  7. Chainlink Docs, CCIP Concepts

  8. Chainlink Docs, CCIP Architecture and Billing

  9. Dan Sleep on Northern Trust, Beyond Asset Tokenisation, January 20, 2023

  10. David G.W. Birch on Forbes, Larry Fink Says Tokens Are “The Next Generation For Markets”, March 01, 2023

 

  



M3TA Analytics
 — Website | Twitter | Telegram | Substack | CoinMarketCap | Threads

Established in 2022, M3TA is an AI-enabled data analytics platform dedicated to Web3 & emerging blockchains. Our team, composed of experts from Stanford, MIT, and Fortune 300 companies and seasoned in Defi, NFT, Metaverse & Gaming and Web3, distills over 10TB of data, covering 500+ projects and 5K+ tokens to produce clear insights for all audience levels. Boasting a robust presence in Korea, Vietnam, and South-East Asia, and spanning an evolving partner network, most currently with Google Cloud and FactBlock, M3TA is your trusted partner in unraveling blockchain complexities.

Writer & Reviewer: Research Analysts & Content Writers at M3TA Analytics

#SmartContract #HybridSmartContract #CCIP #Oracle #M3TA