Blog

Getting Started with IBC: What are the IBC transport and application layers?

17.01.2024
Mary McGilvray

The current state of the blockchain ecosystem is akin to the early days of computer networks: powerful but isolated systems. Imagine having a Mac and a PC next to each other, both computing machines, but unable to share files or execute programs across the two. This is the problem that IBC aims to solve for blockchains. IBC addresses this glaring issue by providing a secure and efficient framework for inter-blockchain communication. It allows blockchains to understand each other's transactions and smart contracts, enabling seamless interaction between different protocols.

IBC is a general-purpose message-passing protocol that aims to become the universal standard for communication between heterogeneous blockchains, just like TCP/IP for the internet. It serves as the connective tissue that enables 100+ different blockchains to securely, permissionlessly, and efficiently communicate with each other. IBC aims to unlock a new realm of possibilities for cross-chain interactions, from simple token transfers to complex cross-chain smart contract executions.

In this blog post, we will discuss how IBC's two abstraction layers, the IBC transport and application layers make IBC development and day-to-day usage as easy as possible for developers.

The IBC Transport Layer: Transporting, Authenticating, and Ordering Data

The IBC protocol achieves reliable and secure data packet transmission between disparate blockchains through its Transport Layer. The Transport Layer’s primary responsibilities can be distilled into three key attributes: transport, authentication, and ordered communication, or “TAO”.

  • Transporting: Every transaction or data packet that is sent via IBC needs to be transported between blockchains. The IBC Transport Layer accomplishes this through a system of on-chain and off-chain components.

  • Authenticating: Both blockchains use light clients to verify that the data was sent by blockchain A & received by blockchain B.

  • Ordering: In many blockchain applications, the order in which transactions are processed can be crucial. The Transport Layer ensures that data packets are not only transmitted securely but also in the sequence they were sent, maintaining the integrity of the transaction process.

The IBC Protocol's transport layer is designed to be agnostic regarding the content of data packets it transmits, never specifying the content or interpretation of data. This design choice keeps the transport layer focused solely on the secure and orderly delivery of these data packets.

The IBC Transport Layer is responsible for data transport, authentication, and ordering.
The IBC Transport Layer is responsible for data transport, authentication, and ordering.
The IBC Transport Layer.

Components of the Transport Layer

The Transport Layer is a complex system. Its functionality can be understood by breaking it down into its core components.

Light Clients

The IBC light client is essentially an on-chain, lightweight version of a full blockchain node. They are designed to verify the state of another blockchain without having to download the entire blockchain’s data. Light clients are crucial for reducing the computational and storage overhead involved in inter-blockchain communication. For example, if Celestia wants to communicate with dYdX, it will set up a dYdX light client on its chain. dYdX, in turn, will set up a Celestia light client.

In addition, IBC light clients offer powerful flexibility to the developer: the client can be a solo machine or otherwise, and the developer can define their preferred security model based upon the light client type they choose.

Connections

In the IBC terminology, a connection refers to a pair of light clients that are actively communicating. Each light client in the pair resides on one of the two blockchains wishing to establish communication. The connection ensures that the two blockchains can trust each other's state.  In our example above, the Celestia and dYdX blockchains will maintain a connection between their light clients so that data can pass between them.

Channels

A channel connects two applications (or in IBC terminology, modules). While modules exist on the IBC application layer, the channels between them are on the IBC transport layer.

Channels are established over connections. One connection between two blockchains may have many channels. An example could be a channel between the ICS-20 token transfer module on Celestia and the ICS-20 token transfer module on dYdX.

Relayers

Relayers are off-chain services that actively monitor the state of connected blockchains. When a state change (like a new transaction or smart contract execution) occurs on one blockchain, relayers are responsible for transmitting this information to the connected blockchain. They act as the data messengers of the IBC Protocol.

The architecture of IBC.
The architecture of IBC.
The architecture of IBC.

How the IBC Transport Layer Works

The functioning of the IBC Transport Layer can be likened to a well-coordinated postal system. When Blockchain A wants to send a message to Blockchain B, it packages the message into a data packet and commits a cryptographic hash of this packet to its own blockchain. This is akin to sealing a letter and putting it in a mailbox.

Relayers, always on the lookout for events emitted by cross-chain messages, pick up this data packet and relay it to Blockchain B. Upon receiving the packet, Blockchain B uses its light client connected to Blockchain A to verify the authenticity of the received packet.

Once the authenticity is verified, the data packet is opened, and the contained message is acted upon. This entire process ensures that the message not only reaches its intended destination but also remains secure and ordered throughout its journey.

The IBC packet flow.
The IBC packet flow.
The IBC packet flow.

The Application Layer

The IBC application layer interprets the packets sent and received by the transport layer. End-user products exist on the application layer. You can think of the Application Layer as the software applications on your computer, which allow you to interact with the underlying hardware.

The Application Layer serves three main purposes:

  • Data Interpretation: It deciphers the data packets received from the Transport Layer, converting them into actionable items like transactions or smart contract calls.

  • User Interaction: This is the layer that end-users directly interact with. Whether sending tokens from one blockchain to another or executing a cross-chain smart contract, all these actions are initiated at the Application Layer.

  • Smart Contract Execution: Many blockchains support smart contracts in execution environments native to the IBC, like wasmvm. The Application Layer is where these smart contracts receive data from other blockchains and execute actions based on predefined conditions. 

    Each end-user product on the application layer consists of many different code modules. In IBC, we call these “IBC applications”. These composable applications can be combined in thousands of ways to build unique end-user products.

The IBC application layer is made up of composable code modules.
The IBC application layer is made up of composable code modules.
The IBC application layer is made up of composable code modules.

Example of an Application Layer Module: ICS-20 Fungible Token Transfers

The power of the Inter-blockchain Communication Protocol comes from the standardization of its modules. The flagship module is ICS-20 Fungible Token Transfers, where ICS stands for ‘Interchain Standards’, which governs the transfer of fungible tokens between different blockchains. 

ICS-20 is not just a set of rules; it's a standardized method for communicating about fungible token transfers. Since all IBC-enabled chains run ICS-20, they can all send & receive tokens from each other.

When a user initiates a token transfer from Blockchain A to Blockchain B, the ICS-20 application on Blockchain A packages the necessary information—such as the amount, the type of token, the sender, and the receiver—into a data packet. This packet is then sent to the Transport Layer, which takes care of transmitting it to Blockchain B. Upon arrival, the ICS-20 application on Blockchain B unpacks the data packet, verifies the details, and executes the token transfer.

Check out a walkthrough on ICS-20 token transfers on the Interchain YouTube below.

Building Cross-Chain Products with the Application Layer

For blockchain developers, the IBC application layer offers many opportunities to create cross-chain applications and services. Here are ideas for how you can leverage the IBC Application Layer:

  • Data Sharing: Create applications that can read and utilize data from multiple blockchains, such as decentralized identity systems or cross-chain oracles, using Interchain Queries.

  • Smart Contracts: Develop IBC-enabled smart contracts that can perform actions based on receipt of an IBC packet, possible through the actor callbacks middleware

  • Resource Utilization: Deploy your app on one chain, and when it’s time to expand your app’s features, use IBC to tap into applications on other chains rather than building new features from scratch. This is possible through cross-chain account control using the ICS-27 Interchain Accounts module

Together, the Transport Layer and Application Layer of the Inter-Blockchain Communication Protocol enable secure, transparent, and efficient communication between different blockchains. This sets the stage for a new era of interoperable blockchain networks.


The IBC Team at the Interchain Foundation

The IBC team at the Interchain Foundation are the stewards of the IBC Protocol. They maintain the ibc spec and ibc-go repositories. Ibc-go is the reference IBC implementation used by 107 chains.

About IBC

The Inter-Blockchain Communication Protocol (IBC) is the most widely adopted trust-minimized, permissionless, and general messaging-passing protocol. IBC connects 100+ for cross-chain activities such as token transfers, inter-chain account control, shared security, data queries, and much more. Build using IBC or join us on Discord.

The Inter-Blockchain Communication Protocol
The Inter-Blockchain Communication Protocol is supported by the Interchain Foundation.
Join the Community
Support for developers building with IBC
[email protected]
Sign up for IBC updates

Manage Cookies

We use cookies to provide and secure our websites, as well as to analyze the usage of our websites, in order to offer you a great user experience. To learn more about our use of cookies see our Privacy Policy.