# Introduction to Interoperability Problem and Chainlink CCIP

## Chainlink CCIP

General overview of the Chainlink CCIP

### The interoperability problem <a href="#the-interoperability-problem" id="the-interoperability-problem"></a>

**Interoperability** is the ability to exchange information between different systems or networks, even if they are incompatible. Shared concepts on different networks ensure that each party understands and trusts the exchanged information. It also considers the concept of *finality* to establish trust in the exchanged information by validating its accuracy and integrity.

The Web3 ecosystem has become multi-chain, with the rise of layer-1 blockchains and layer-2 scaling solutions like appchains, subnets, and more, where each network has its own approach to scalability, security, and trust.

However, blockchains are isolated networks that operate independently and cannot communicate natively. To create a truly interoperable Web3 ecosystem, data and value must move seamlessly between chains. This is where bridges come in.

<figure><img src="https://3336775262-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVxFPzCGStHLGRVz3QBdQ%2Fuploads%2F33AtXEgXHke5BTfE62PG%2F1.png?alt=media&#x26;token=4fa199b0-615f-45ab-afdd-d929aa33c325" alt=""><figcaption><p> Example of a traditional bridge</p></figcaption></figure>

Traditional bridges are one of the biggest problems in today's Web3 ecosystem because they are centralized. When you are transferring funds from one chain to another using bridge, you are essentially giving your funds to some centralized entity, and you are trusting them that the funds will appear on the other side. And surprise, surprise, numerous bridge hacks have happened so far.

<figure><img src="https://3336775262-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVxFPzCGStHLGRVz3QBdQ%2Fuploads%2FOm9vCp7oO7QIn4U1dn9A%2F2.webp?alt=media&#x26;token=dae87167-1eb6-40f7-a2a6-b2a86b4017b9" alt=""><figcaption><p>Trust assumptions - Patrick bridging funds</p></figcaption></figure>

### The solution - Chainlink CCIP <a href="#the-solution-chainlink-ccip" id="the-solution-chainlink-ccip"></a>

The *Chainlink Cross-Chain Interoperability Protocol (CCIP)* provides a single simple interface through which dApps and web3 entrepreneurs can securely meet all their cross-chain needs, including token transfers and arbitrary messaging.

Chainlink CCIP connects blockchain networks via **lanes.** The lane is a unique combination of source blockchain to destination blockchain path, e.g., from blockchain A to blockchain C. To transfer messages in reverse order, from blockchain C to blockchain A using Chianlink CCIP, you will need to use a different lane, the one which is unique to the C -> A path.

<figure><img src="https://3336775262-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVxFPzCGStHLGRVz3QBdQ%2Fuploads%2FYTmbvKwFT0b5LmZYCI06%2F3.png?alt=media&#x26;token=fc2abb2d-ebcf-49e0-bf85-9457cc881736" alt=""><figcaption><p>Example of bi-directional CCIP lanes between two blockchains</p></figcaption></figure>

Chainlink CCIP will always support bi-directional lanes for each new chain added in the future. The logical question is how CCIP knows through which lane to transfer a CCIP cross-chain message. It's actually quite simple - each blockchain supported by CCIP has a unique **chain selector**.

<figure><img src="https://3336775262-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVxFPzCGStHLGRVz3QBdQ%2Fuploads%2FOtJffLoJuaiIunEo0OJ9%2F4.png?alt=media&#x26;token=65a8fb1a-9803-41e0-b5de-549626c0a790" alt=""><figcaption><p>CCIP lanes</p></figcaption></figure>

We said multiple times that by using Chainlink CCIP, you can send **cross-chain messages**. But what can a cross-chain message consist of? With Chainlink CCIP, one can:

* Transfer (supported) tokens
* Send any kind of data
* Send both tokens and data

CCIP sender can be:

* EOA
* Any smart contract

CCIP receiver can be:

* EOA
* Any smart contract that implements `CCIPReceiver.sol`

<figure><img src="https://3336775262-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVxFPzCGStHLGRVz3QBdQ%2Fuploads%2FlNv8OD1FvRjxp61WpzlD%2F5.avif?alt=media&#x26;token=d5c9ad22-6206-4c18-9730-b957c34330cf" alt=""><figcaption><p>Basic CCIP Architecture</p></figcaption></figure>

**Note**: If you send a message and token(s) to EOA, only tokens will arrive.

For now, you can consider CCIP as a "black-box" component and be aware of the Router contract only. We will explain the Chainlink CCIP architecture in the following chapters.

The **Router** is the primary contract CCIP users interface with. This contract is responsible for initiating cross-chain interactions. One router contact exists per chain. When transferring tokens, callers have to approve the router contract to be able to "spend" (transfer) the caller's tokens. 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.

### Recap <a href="#recap" id="recap"></a>

The Chainlink Cross-Chain Interoperability Protocol provides a single interface to transfer tokens and data across multiple chains in a secure and decentralized manner.

| New Terms              | Meaning                                                                                                           |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Interoperability       | The ability to exchange information between different systems or networks, even if they are incompatible          |
| Chainlink CCIP         | The protocol that allows you to send tokens and arbitrary messages across different blockchains                   |
| Lane                   | The unique combination of source blockchain to destination blockchain path                                        |
| Chain Selector         | The unique identifier of a blockchain in Chainlink CCIP                                                           |
| CCIP Message           | The message that you can send across blockchains through CCIP lane which can consist of tokens and arbitrary data |
| Sender                 | A smart contract (of the User) or an EOA that sends the CCIP Message                                              |
| Source blockchain      | The blockchain the CCIP Message is sent from                                                                      |
| Receiver               | A smart contract or an EOA that receives the CCIP Message                                                         |
| Destination blockchain | The blockchain the CCIP Message is sent to                                                                        |
