CCIP (Cross-Chain Interoperability Protocol) GuidešŸ§µšŸ› ļø

Av. Elif Hilal Umucu
Chainlink Community
24 min readJul 29, 2023

Hi everyone, this is a guide that I have been planning to write for a long time, but could not find the opportunity to write. I wanted to write this article especially after we announced CCIP at the ETH CC eventšŸ˜Š

Disclaimer: All opinions of the author are their own

In this blog post, I will try to explain everything from scratch to you. In this way, even if you have no idea about the subject, I will help you learn about it. If there is something you do not understand, please do not hesitate to share it with me :)

Now let me talk about what you will see in this article respectively; it will be a long article again, sorry. Long articles always appear because I want to share everything Iā€™ve learned. The content of this article is as follows:

āœ… Cross-Chain

āœ… CCIP

āœ… CCIP Terminology

āœ… Features of CCIP

āœ… Use cases of CCIP

āœ… Market Leaders and CCIP

āœ… Programmable Token Transfers & Simplified Token Transfers

āœ… Active Risk Management Network (ARM)

āœ… Off-Chain ARM Node

āœ… On-Chain ARM Node

āœ… CCIP Components

In todayā€™s evolving world of decentralized finance, multiple blockchain networks are increasingly engaging in cross-chain communication.

One such groundbreaking innovation is the Chainlink Cross-Chain Interoperability Protocol (CCIP). It is essential to have a strong understanding of this protocol and broaden your knowledge in the blockchain sector, and that is what this article aims to provide.

The Chainlink Cross-Chain Interoperability Protocol (CCIP) recently entered its Mainnet Early Access phase on multiple blockchain networks, including Avalanche, Ethereum, Optimism, and Polygon, with more on the horizon.

Leading DeFi protocols in the derivatives and lending sectors have begun to harness the power of CCIP. Notable live users on the mainnet include influential projects like Synthetix and Aave. Moreover, BGD Labs is now integrating the mainnet CCIP into its protocol, indicating a growing trend in its adoption.

The CCIP protocol showcases several innovative features:

  1. Programmable Token Transfers: These allow for the customization of transfer conditions, enabling more complex financial interactions on the blockchain.
  2. Simplified Token Transfers: This feature reduces the complexity of token transfers, making transactions more streamlined and user-friendly.
  3. Active Risk Management Network (ARM Network): This risk management system is designed to enhance the security and stability of transactions.
  4. Rate Limits: These can control the speed and quantity of token transfers, providing a safeguard against malicious activities.
  5. Smart Execution: This feature optimizes transaction efficiency, ensuring smoother and quicker blockchain operations.
  6. Time-Locked Upgradability: This provides an option to schedule updates or changes to the system, ensuring the adaptability of the protocol in line with technological advancements.

To explore this opportunity, you can gain early-stage access to CCIP. To do so, fill in the necessary details via the provided link.

Understanding and utilizing the Chainlink Cross-Chain Interoperability Protocol (CCIP) is more than just a technological advancement ā€” itā€™s a step toward the future of decentralized finance.

Meanwhile, as of July 20, CCIP is available to all developers on five testnets: Arbitrum Goerli, Avalanche Fuji, Ethereum Sepolia, Optimism Goerli, and Polygon Mumbai.

šŸŖ© Cross-Chain and Multi-Chain šŸŖ©

Web3, or the decentralized internet, has expanded into a landscape of multiple chains. The first concept we need to grasp in this context is cross-chain, but while weā€™re at it, itā€™s worth understanding the difference between cross-chain and multichain.

āœ… Developers and users have an array of hundreds of blockchains to choose from, including layer-2 networks, side chains, subnets, application-specific chains, parachains, and others.

Ethereumā€™s Influence in the Evolution

As we know, Ethereum was the first blockchain to fully support programmable decentralized applications (dApps) through smart contracts, leading to a rapid worldwide adoption thanks to network effects. The proliferation of smart contracts introduced a new way of accessing financial services entirely on-chain, with dApps such as Compound, MakerDAO, Uniswap, and EtherDelta at the forefront.

However, the rising demand for Ethereumā€™s smart contracts increased the networkā€™s block space demand, leading to higher transaction fees. While Ethereumā€™s main network remains one of the most secure smart contract networks, many users began seeking cheaper alternatives.

This demand created opportunities for founders and entrepreneurs to develop alternative smart contract platforms and grab a slice of Ethereumā€™s market share.

The Emergence of the Multichain Ecosystem šŸ„³

This dynamic has led to the rise of the multichain ecosystem. In a multichain setup, several independent blockchains function simultaneously within a single network.

Each of these chains could serve a different purpose or host a unique token. However, these chains are designed to work separately. They canā€™t share data or directly interact without a third-party interface or bridge.

The development of multichain technology is a major leap forward, allowing multiple blockchains to communicate concurrently without needing to transfer their assets from one network to another. As we venture further into the world of Web3, it becomes clear that cross-chain and multichain are not just industry jargon but pivotal elements in shaping the future of blockchain technology!šŸ˜Š

Understanding the Multichain Approach

ā€˜multichainā€™ refers to a system where multiple independent blockchains operate simultaneously within a single network.

Each chain could serve a different purpose or host a distinct token.

Why the Difference Mattersāœ…

Itā€™s important to note that while the terms are often used interchangeably, they refer to different aspects of how blockchains interact. A better understanding of these concepts can help you navigate the world of blockchain technology more effectively, whether youā€™re a developer, a user, or simply an enthusiast. So, keep exploring, and enjoy the journey through this exciting landscape!šŸ˜Š

SO? What Does It Mean?

Multi-Chain šŸ†

In essence, multichain technology allows multiple blockchains to communicate simultaneously without needing to move their assets from one network to another.

The growth of blockchain technology has brought about exciting ways these networks can interact. As we explore further, it becomes clear that multichain and cross-chain are not just industry jargon but pivotal elements in the future of blockchain technology.

In a multi-chain smart contract, each dApp instance is isolated with no connection to other blockchains.

šŸ§µBy the way, I want to give you some information. Any application that requires a single source of truth about the situation, such as an on-chain domain name system with a central registry, is difficult to implement in a multi-chain context. If multiple records are distributed across multiple networks, the same name can be registered multiple times in different chains with different owners.

For this reason, applications that require a global state of consistency are often deployed on a single network šŸŽˆ

Multi-chain models actually offer certain advantages, such as allowing different chains to have different parameters and governance rules, accommodating various transaction types and payloads, reducing network congestion, and providing a certain level of adaptability to the network. Now, if you donā€™t have a question mark here, let me explain the term cross-chain.

Cross-Chain? šŸŽ

Cross-chain are mechanisms that increase interoperability between different blockchains by allowing different blockchain networks to communicate with each other and transfer data or value between each other.

Cross-chain smart contracts are a unified application consisting of multiple smart contracts distributed across multiple networks.

Cross-chain technology is designed to allow separate blockchains to communicate and interact with each other.

This interaction facilitates the exchange of data and digital assets between the different chains, enhancing the functionality and reach of individual blockchain networks.

In the realm of cross-chain, different smart contracts on different chains execute different tasks. Still, they all maintain synchronization to support a single use case within a unified application. This fantastic functionality allows developers to leverage the unique benefits of various networks.

In simpler terms, imagine several teams working on different aspects of a project across various locations. Each team focuses on a specific task, yet they work in harmony to complete a single project. Thatā€™s what cross-chain does on a blockchain network.

šŸ† Unlocking Interactions with Cross-Chain šŸ—½

The beauty of cross-chain doesnā€™t stop at synchronization. It also enables interaction between chains. This capability allows a digital asset or data on one blockchain to be recognized and used on another :)

Think about it like traveling to a foreign country with your driving license. Even though your license was issued in your home country, itā€™s recognized and accepted in the foreign country, allowing you to drive. This recognition across borders is similar to how cross-chain works, enabling data or assets to be accepted and used across different blockchains.

(I hope everything I wrote so far is clear and understandable)

Wrapping Up

Cross-chain presents us with an alluring vision of a seamlessly connected blockchain ecosystem where data and digital assets can freely move and interact. These interactions and synchronizations could revolutionize how we use blockchain technology, bringing us a step closer to a more interconnected digital world. So, as we continue to venture into this thrilling terrain, understanding the workings of cross-chain is a valuable piece of the puzzle.

CCIP ā€” Cross-Chain Interoperability Protocol šŸ—

Interoperability is the cornerstone of all technological revolutions. It allows technologies to grow, spread and gain universal adoption.

The CCIP is ā€œa new open-source standard for cross chain communicationā€ which can connect both private and public blockchain networks. What makes this possible is a large network of node operators that can provide the means through which information can be transferred from one blockchain to another.

šŸ“Œ Just as Web2 needs TCP/IP to connect isolated computer networks, Web3 needs an interoperability standard to connect blockchain network islands.

šŸ“Œ CCIP is the most secure, reliable and easy-to-use interoperability protocol for building cross-chain applications and services.

Here I would like to share an information that I find important. According to Chainalysis, 64% of funds stolen in DeFi attacks in 2022 came from cross-chain bridge attacks.

CCIP Terminology

  • Sender ā€” A smart contract or an EOA
  • Source Blockchain ā€” The blockchain the sender interacts with CCIP from
  • Message ā€” Arbitrary data and/or tokens
  • Receiver ā€” A smart contract or an EOA. Note: An EOA cannot receive arbitrary data. It can only receive tokens
  • Destination Blockchain ā€” The blockchain the receiver resides on

Features of CCIP

āš” Not only does it give developers the flexibility to build their own cross-chain solution on CCIP using Arbitrary Messaging, CCIP also provides Simplified Token Transfers that allow protocols to quickly start transferring tokens between chains using audited token pool contracts that they control without writing custom code.

āš” The Chainlink Cross-Chain Interoperability Protocol (CCIP) is bolstered by the Chainlink decentralized oracle networks, which have a proven track record of securing billions of dollars and facilitating over $8 trillion in on-chain transaction value. As CCIP is built upon the same foundation as the existing Chainlink services, it calls for virtually no additional trust assumptions. If a decentralized application (dApp) already trusts Chainlink for Price Feeds, itā€™s a natural choice to also trust CCIP for cross-chain interactions.

āš” CCIP also brings added security measures that exceed those found in other cross-chain solutions. These include customizable rate limits for token transfers, and an independent Active Risk Management Network (ARM) that monitors the validity of all cross-chain transactions.

āš” Bringing it all together, the Chainlink Cross-Chain Interoperability Protocol (CCIP) is a secure, proven, and logical choice for dApps looking to venture into the world of cross-chain interactions. Its additional security mechanisms provide an extra layer of assurance, making it a dependable solution for those navigating the multi-chain landscape.

āš” One of the unique features of the CCIP is a technology stack which connects blockchains via an open-source programmable token bridge that can span any blockchain network. Thus, even permissionless blockchains such as central bank digital currencies (CBDCs) can be linked via the programmable token bridge to permissionless, decentralized blockchains and smart contracts to provide a limitless set of use cases between individuals, governments and financial institutions.

āš” These include: cross-chain collateralized loans, cross-chain yield aggregators and eventually any service that requires data exchange between blockchains not limited to voter registration, acquisition of state and federal government identification, welfare services etc.

āš” Because CCIP has the potential to connect any application using a blockchain, CCIP may be the new ā€œstandard gaugeā€ for blockchain technology, accelerating the international adoption of smart contracts and cryptocurrency by governments, financial institutions and individuals across the world.

Developers, applications, and enterprises can use CCIP to unlock a variety of use cases, such as:

  1. The Transfer of Tokenized Assets Across Chains: With CCIP, developers can design interfaces that permit seamless movement of tokens between different blockchains. This eliminates the need to construct your own bridge solutions.
  2. Facilitating Cross-Chain Collateral: CCIP enables the creation of lending applications that work across multiple chains. Users can pledge collateral on one blockchain and borrow assets from another.
  3. Bridging Liquid Staking Tokens Across Chains: CCIP can transfer liquid staking tokens across various blockchains, enhancing their usage in decentralized finance (DeFi) apps operating on different chains.
  4. NFT Cross-Chain Capabilities: Users can originate a non-fungible token (NFT) on one blockchain and have it delivered on another, all thanks to CCIP.
  5. Account Abstraction Across Chains: Build intelligent contract wallets that possess native CCIP capabilities, enhancing the user experience of making cross-chain function calls. For example, it could empower users to authorize transactions on any chain using a single wallet.
  6. Cross-Chain Gaming Experiences: Design gaming experiences that are blockchain-agnostic. Players can secure high-value items on more secure blockchains and play on more scalable blockchains.
  7. Cross-Chain Data Storage and Computation: Utilize data storage solutions allowing users to store arbitrary data on one blockchain and perform calculations using a transaction from a different blockchain.

Overall, the versatility of CCIP opens up a world of possibilities for developers and users in the Web3 space.

Market Leaders Use CCIP šŸ‘€

CCIP is currently running live on the Mainnet for Early Access participants, which includes two of the leading DeFi protocols:

  • Synthetix ā€” CCIP enables synth tokens to flow seamlessly across chains to wherever there is the greatest immediate demand, deepening liquidity and increasing capital efficiency.
  • Aave ā€” CCIP is being integrated to power Aaveā€™s multi-chain governance system, saving significant time and developer resources and increasing protocol security.

ā€œSecurity is critical when dealing with on-chain assets, which is why we leverage Chainlink CCIP for our cross-chain Synths Teleporter.ā€ ā€” Kain Warwick, Founder, Synthetix

Aave

Aave is a non-custodial liquidity protocol that allows users to borrow and lend assets on-chain.

Previously, Aave had implemented several distinct native chain bridges to facilitate its multi-chain governance mechanism, with Ethereum notably serving as the voting network. However, this inter-chain architecture turned out to be a costly affair, both in terms of significant development and maintenance expenses and in the high cost to participants for casting votes.

With the introduction of Chainlink CCIP, the scenario began to change. The Aave community cast their votes in favor of integrating the protocol, swayed by its gas-saving design, its well-tested infrastructure, the scalability it offers to new networks, and the ease of integration.

Therefore, to future-proof their cross-chain system, a Web3 development initiative known as BGD Labs decided to incorporate Chainlink CCIP into Aave Governance V3. This integration is set to enhance the efficiency, scalability, and robustness of Aaveā€™s governance mechanism in the ever-evolving blockchain landscape.

ā€œWeā€™re excited to leverage Chainlink CCIP for secure, reliable, and scalable cross-chain communication on the next iteration of the Aave protocol. With seamless integration into the cross-chain governance mechanism, CCIP is set to save valuable developer time that can be better spent enhancing the core features of Aave.ā€ ā€” Ernesto Boado, Co-founder, BGD Labs

CCIP and the Global Finance Scene šŸ—ļø

Imagine the enormity of the global financial markets, which handle transactions worth trillions of dollars. In such markets, the need for a universal and seamless link cannot be overstated. It brings tremendous value to all participants, hence the widespread adoption of trusted financial market infrastructure providers like DTCC, Euroclear, and Swift. Ever paused to consider the impact even a minor snag in banking operations could have on you? The importance of seamless and dependable operation in this sector is paramount, perhaps more so than we often perceive.

Even though a massive 97% of institutional investors concur that ā€œtokenization will bring about a revolution in asset managementā€, there have been long-standing hurdles in transferring assets worth hundreds of trillions of dollars onto the chain:

  1. Blockchain connectivity (legacy-to-blockchain): The ability to connect the core business infrastructure of existing financial systems to any blockchain.
  2. Cross-chain interoperability (blockchain-to-blockchain): A highly secure communication standard that can connect any public or private chain to one another.

Swift, along with over a dozen financial institutions and financial market infrastructure providers, have already embarked on the journey to explore CCIP. Theyā€™re using it to instruct token transfers between public and private chains via the existing Swift messaging infrastructure. So, whoā€™s currently partaking in this blockchain interoperability collaboration? The impressive roster includes the Australia and New Zealand Banking Group (ANZ), BNP Paribas, BNY Mellon, Citi, Clearstream, Euroclear, Lloyds Banking Group, SIX Digital Exchange (SDX), The Depository Trust and Clearing Corporation (DTCC)ā€¦ and the list goes on. Exciting times, arenā€™t they? šŸ™‚

ā€œ[This collaboration] will also highlight the potential value of using a blockchain interoperability protocol to securely transfer data and value between legacy systems and a potentially unlimited number of blockchains.ā€ ā€” Jonathan Ehrenfeld, Head of Securities Strategy at Swift

The first interoperability standards completely transformed the Internet, how? Letā€™s remember right away.

TCP/IP, HTTP, and e-mail protocols were later used by millions, providing seamless connectivity between users who saw the value of web applications increase exponentially as more people joined the network.

It doesnā€™t matter on which blockchain you launch a dApp or token or what kind of backend you want to interact with; as long as this environment adheres to an interoperability standard, it can access any chain and supported dApps.

With CCIP, we have a standard that links traditional finance and smart contracts, making their interaction a breeze. It sets the stage for a unified financial system, one where tokens and messages flow seamlessly across different environments.

Analogous to the pivotal role TCP/IP plays in Internet communication, Chainlinkā€™s CCIP forms the cornerstone of an interoperable blockchain ecosystem. However, thereā€™s a key difference between TCP/IP and CCIP. While TCP/IP facilitates the free flow of information over the Internet, CCIP ensures secure value transfer across networks. The launch of CCIP marks a significant milestone in the evolution of the Internet, bringing us a step closer to a world underpinned by interoperable smart contracts ā€” what we might call the Internet of Contracts. Exciting, isnā€™t it? :)

ā€œJust like key standards such as TCP/IP remade a fragmented early internet into the single global internet we all know and use today, we are making CCIP to connect the fragmented public blockchain landscape and the growing bank chain ecosystem into a single Internet of Contracts.ā€ ā€” Chainlink Co-Founder, Sergey Nazarov

NOTE: The following part of the blog contains technical explanations, so if there is anything you donā€™t understand, don't hesitate to get in touch with me. I know, this post is a bit too long, sorry! :(

Chainlink CCIP supports three main capabilities:

  1. Arbitrary Messaging is the ability to send arbitrary data (encoded as bytes) to a receiving smart contract on a different blockchain. The developer is free to encode any data they wish to send. Typically, developers use arbitrary messaging to trigger an informed action on the receiving smart contract, such as rebalancing an index, minting a specific NFT, or calling an arbitrary function with the sent data as custom parameters. Developers can encode multiple instructions in a single message, enabling them to orchestrate complex, multi-step, multi-chain tasks. Note: This capability is specifically for smart contract receivers because EOAs on EVM blockchains cannot receive messages.
  2. Token Transfer: You can transfer tokens to a smart contract or directly to an EOA (Externally Owned Account) on a different blockchain.
  3. Programmable Token Transfer is the ability to simultaneously transfer tokens and arbitrary data (encoded as bytes) within a single transaction. This mechanism allows users to transfer tokens and send instructions on what to do with those tokens. For example, a user could transfer tokens to a lending protocol with instructions to leverage those tokens as collateral for a loan, borrowing another asset to be sent back to the user. Note: Use this capability only for smart contracts. If you send data and transfer tokens to an EOA, only tokens will be transferred.

Active Risk Management Network (ARM) šŸ›

The Active Risk Management (ARM) network operates as an autonomous entity that persistently monitors and verifies the behavior of the primary CCIP network, delivering an extra layer of security.

It independently authenticates inter-chain transactions, looking out for any anomalies or unanticipated activities.

The ARM network employs a separate, minimal Rust implementation of the Chainlink node software. It is designed this way to minimize external dependencies, which in turn aids in thwarting supply chain attacks. Moreover, this approach creates a form of client diversity that significantly bolsters the robustness of the network.

In essence, think of the ARM network as an attentive sentinel, purpose-built to constantly check the smooth operation of transactions.

The fact that it operates as a separate network from the main CCIP network is a key element.

The Active Risk Management (ARM) network is built using off-chain and on-chain components:

  • Off-chain: Several ARM nodes continually monitor all supported chains against abnormal activities
  • On-chain: One ARM contract per supported CCIP chain

šŸ˜Ž Off-chain (ARM node)

The ARM network is a secondary validation service parallel to the primary CCIP system. (we already knew it, right?)

It doesnā€™t run the same codebase as the DON (decentralized oracle network) to mitigate against security vulnerabilities that might affect the DONā€™s codebase.

The ARM network has two main modes of operation:

  • Blessing: Each ARM node monitors all Merkle roots of messages committed on each destination chain. The Committing DON commits these Merkle roots. (More information on Merkle roots can be found on the architecture page). The ARM node independently reconstructs the Merkle tree by fetching all messages on the source chain. Then, it checks for a match between the Merkle root committed by the Committing DON and the root of the reconstructed Merkle tree. If both Merkle roots match, the ARM node blesses the root to the ARM contract on the destination chain. The ARM contract tracks the votes. When a quorum is met, the ARM contract dubs the Merkle root blessed. Okay, that's cool but what does this mean? :) Hereā€™s a simplified explanation:

ā­ Blessing

Let me summarize it. Each ARM (Active Risk Management) node looks at all the ā€˜summaryā€™ information (these summaries are called Merkle roots) of messages that are being transferred from one blockchain (the source chain) to another (the destination chain). This ā€˜summaryā€™ information is officially recorded by the DON (Decentralized Oracle Network), which oversees the transfer process.

To ensure everything is correct, the ARM node does its own check. It collects all messages from the original blockchain and creates its own ā€˜summaryā€™ (or reconstructs the Merkle tree). It then compares its summary with the one officially recorded by the DON.

If both summaries match, the ARM node says ā€œokay, everything looks goodā€ (or in technical terms, ā€œblessesā€ the root) to the ARM contract on the destination blockchain. This ā€˜blessingā€™ is like a vote saying that the transaction seems legitimate.

The ARM contract keeps track of these votes. When enough nodes have given their ā€˜blessingsā€™ (this is whatā€™s called reaching a ā€˜quorumā€™), the ARM contract officially considers the ā€˜summaryā€™ information (the Merkle root) as correct or ā€˜blessedā€™.

  • Cursing: If an ARM node detects an anomaly, the ARM node will curse the CCIP system. After a quorum of votes has been met, the ARM contract dubs the CCIP system cursed. CCIP will automatically pause on that chain and wait until the contract owner assesses the situation before potentially lifting the curse. ahahah I know this is really difficult to understand. Hereā€™s a simplified explanation:

ā­ Cursing

If an ARM (Active Risk Management) node finds something unusual during its check (an ā€œanomalyā€), it raises an alarm. This is referred to as the ARM node ā€œcursingā€ the CCIP (Cross-Chain Interoperability Protocol) system.

This ā€˜curseā€™ is like a warning signal that something may not be right with the transactions being processed. When enough ARM nodes have raised this alarm (this is called reaching a ā€˜quorumā€™), the ARM contract confirms that thereā€™s potentially an issue and labels the CCIP system as ā€˜cursedā€™.

Once this happens, the CCIP system automatically stops processing transactions on the affected blockchain. This pause allows for the system to be checked and for any potential issues to be addressed. The system will stay paused until the owner of the contract investigates and decides whether itā€™s safe to resume the transactions (this is referred to as ā€˜lifting the curseā€™).

There are two cases where ARM nodes pause CCIP:

  1. Finality violation: A deep reorganization which violates the safety parameters set by the ARM configuration occurs on a CCIP chain.
  2. Execution safety violation: A message is executed on the destination chain without any matching transaction being on the source chain. Double executions fall into this category since the executing DON can only execute a message once.

On-chain (ARM contract) ā˜ƒ

There is one ARM contract for each supported destination chain. The ARM contract maintains a group of nodes authorized to participate in the ARM blessing/cursing!!

Each ARM node has five components:

  1. an address for voting to curse
  2. an address for voting to bless
  3. an address for withdrawing a vote to curse
  4. a curse weight
  5. a blessing weight

The contract also maintains two thresholds to determine the quorum for blessing and cursing. There are two different voting logics depending on the mode:

  • Blessing voting procedure: every time an ARM node blesses a Merkle root, the ARM contract adds the blessing weight for that node. If the sum exceeds the blessing threshold, the ARM contract considers the contract blessed.
  • Cursing voting procedure: an ARM node that sends a vote to curse assigns the vote a random 32-byte ID. The node may have multiple active votes to curse at any time. However, if there is at least one active cursing vote, the ARM contract considers the node to have voted to curse. The ARM contract adds the cursing weight for that node. If the sum of the weights of votes to curse exceeds the curse threshold, the ARM contract considers the contract cursed.

If the ARM contract is cursed, then the owner of the original contract must resolve any underlying issues the original contract might have. If the owner is satisfied that these issues have been resolved, they can revoke the cursing on behalf of ARM nodes.

CCIP Components ā˜‚

The figure below outlines the different components involved in a cross-chain transaction:

šŸ”„ Cross-Chain dApps are user-specific. A smart contract or an EOA (Externally Owned Account) interacts with the CCIP Router to send arbitrary data and/or transfer tokens cross-chain.

šŸ”„ The contracts in dark blue are the CCIP interface (Router). To use CCIP, users need only to understand how to interact with the router; they donā€™t need to understand the whole CCIP architecture. Note: The CCIP interface is static and remains consistent over time to provide reliability and stability to the users.

šŸ”„ The contracts in light blue are internal to the CCIP protocol and subject to change.

šŸ˜Ž On-chain components

šŸ“Router

The Router is the primary contract CCIP users interface with. This contract is responsible for initiating cross-chain interactions. One router contract exists per chain. When transferring tokens, callers have to approve tokens for the router contract. The router contract routes the instruction to the destination-specific OnRamp.

When a message is received on the destination chain, the router is the contract that ā€œdeliversā€ tokens to the userā€™s account or the message to the receiverā€™s smart contract.

šŸ“ Commit Store

The Committing DON interacts with the CommitStore contract on the destination blockchain to store the Merkle root of the finalized messages on the source blockchain. This Merkle root must be blessed by the Active Risk Management before Executing DON can execute them on the destination blockchain. The CommitStore ensures the message is blessed by the Active Risk Management Network and only one CommitStore exists per lane.

šŸ“ OnRamp

One OnRamp contract per lane exists. This contract performs the following tasks:

  • Checks destination-blockchain-specific validity such as validating account address syntax
  • Verifies the message size limit and gas limits
  • Keeps track of sequence numbers to preserve the sequence of messages for the receiver
  • Manages billing
  • Interacts with the TokenPool if the message includes a token transfer.
  • Emits an event monitored by the committing DON

šŸ“ OffRamp

One OffRamp contract per lane exists. This contract performs the following tasks:

  • Ensures the message is authentic by verifying the proof provided by the Executing DON against a committed and blessed Merkle root
  • Makes sure transactions are executed only once
  • After validation, the OffRamp contract transmits any received message to the Router contract. If the CCIP transaction includes token transfers, the OffRamp contract calls the TokenPool to transfer the correct assets to the receiver.

šŸ“ Token Pools

Each token has its own token pool, an abstraction layer over ERC-20 tokens that facilitates OnRamp and OffRamp token-related operations. Token pools are configurable to lock or burn at the source blockchain and unlock or mint at the destination blockchain. The mechanism for handling tokens depends on the characteristics of the token in question. Here are a few examples:

  • Cryptocurrency like ETH, MATIC, and AVAX can only be made, or ā€œmintedā€, on their own specific blockchain networks. These coins canā€™t be destroyed, or ā€œburnedā€, on one blockchain and made again on another to move them between different networks.
  • Instead, something called the ā€œLinked Token Poolā€ uses a method called ā€œLock and Mintā€. This method ā€œlocksā€ the coin on its original blockchain, then makes a new coin on the other blockchain. This new coin is like a copy or ā€œsyntheticā€ version of the original and can be exchanged back into the original coin.
  • Letā€™s take LINK as an example. Itā€™s originally made on Ethereumā€™s network and thereā€™s a set amount of it that can be made. Because of this, CCIP canā€™t make more LINK on another blockchain. So, to move LINK to another blockchain, it has to use the ā€œLock and Mintā€ method I mentioned.
  • Some coins can be made on multiple blockchain, like USDC, TUSD, USDT, and FRAX. The Linked Token Pool uses the ā€œBurn and Mintā€ method for these coins. This means the original coin is burned or destroyed on its original blockchain, and then a new one is minted or made on the other blockchain. Coins like WBTC or WETH also use this ā€œBurn and Mintā€ method.
  • A token with a Proof Of Reserve (PoR) feed on a specific chain poses a challenge for the ā€œBurn and Mintā€ method when applied to other chains because it conflicts with the PoR feed. For these tokens, ā€œLock and Mintā€ is the preferred approach.

Token pools provide rate limiting, which is a security feature enabling token issuers to set a maximum rate at which their token can be transferred.

šŸ˜Ž Off-chain components

šŸ“ Committing DON

The Committing DON has several jobs where each job monitors cross-chain transactions between a given source blockchain and destination blockchain:

  • Each job monitors events from a given OnRamp contract on the source blockchain.
  • The job waits for finality, which depends one the source blockchain.
  • The job bundles transactions and creates a Merkle root. This Merkle root is signed by a quorum of oracles nodes part of the Committing DON.
  • Finally, the job writes the Merkle root to the CommitStore contract on the given destination blockchain.

šŸ“ Executing DON

Like the Committing DON, the Executing DON has several jobs where each executes cross-chain transactions between a source blockchain and a destination blockchain:

If you want to learn more about the core architecture and code of CCIP, check out the CCIP developer documentation.

You can join our groups to be informed about training and events!šŸ¤—
- Sign up for my meetups in Meetup (Turkish) and Meetup (English)
- And donā€™t forget to join our Telegram channel (english), and Telegram Channel (turkish)

šŸŒ»šŸ‘» I hope the contents of my articles are beneficial to you. šŸ§‘ā€šŸŽ¤šŸ‘©šŸ¼ā€šŸŽ¤ Do not hesitate to contact me šŸ˜‰šŸŽ„Thats me, Elif Hilal! šŸ”® Thank you for reading my articles and blog posts.

Disclaimer: This post is for informational purposes only and contains statements about the future, including anticipated product features, development, and timelines for the rollout of these features. These statements are only predictions and reflect current beliefs and expectations with respect to future events; they are based on assumptions and are subject to risk, uncertainties, and changes at any time. Chainlink CCIP is in the ā€œMainnet Early Accessā€ stage of development, which means that Chainlink CCIP currently has limited functionality that may be changed in later versions. There can be no assurance that actual results will not differ materially from those expressed in these statements, although we believe them to be based on reasonable assumptions. All statements are valid only as of the date first posted. These statements may not reflect future developments due to user feedback or later events and we may not update this post in response. Chainlink CCIP is a messaging protocol which does not hold or transfer any assets. Please read the token pools section of the Chainlink CCIP documentation to understand the various mechanisms involved in transferring value across chains. Please review the Chainlink Terms of Service, which provides important information and disclosures.

--

--