Cosmos and IBC: The Internet of Blockchains

Cosmos SDK, CometBFT, IBC, ATOM staking and the memo field: understand the Cosmos app-chain ecosystem and use it without losing funds.

Networks · Intermédiaire · 9 min read · Publié le

The essentials

Cosmos, a "multi-chain" vision

On Ethereum, thousands of applications share one blockchain. Cosmos starts from a different idea: every major application can have its own blockchain, called an app-chain (an application-specific blockchain). A DEX, a stablecoin network or a liquid staking protocol can thus run on a dedicated chain, with its own fee, governance and performance parameters.

The advantage highlighted by the official documentation is sovereignty: developers keep control of every design decision, without depending on the choices of a shared platform. The flip side: each chain has to find its own validators, security and liquidity.

For these chains not to remain isolated islands, you need a way to link them. That's IBC's job, often described as "the internet of blockchains".

The technical building blocks: Cosmos SDK and CometBFT

The Cosmos SDK

The Cosmos SDK is an open-source toolkit for building proof-of-stake blockchains. Rather than coding everything from scratch, a team assembles existing modules (account management, staking, governance, token issuance...) and writes new ones for its own business logic.

Consequence for you: many Cosmos chains feel alike in use. You find the same notions of delegation, governance proposals and unbonding periods, and addresses in a similar format, with a prefix specific to each chain (for example cosmos1... for the Cosmos Hub, osmo1... for Osmosis).

CometBFT, the consensus engine

CometBFT (formerly Tendermint Core) is the default consensus engine for chains built with the Cosmos SDK. It's a BFT (Byzantine Fault Tolerant) consensus: a set of validators votes on each block, and a block is validated when it gathers more than two-thirds of the voting power.

An important practical point: with this type of consensus, a validated block is final immediately. There's no need to wait for many confirmations as on Bitcoin. This fast finality is precisely what makes reliable communication between chains possible.

IBC: how chains talk to each other

IBC (Inter-Blockchain Communication) is an interoperability protocol that lets two blockchains exchange data and tokens. Its official site says more than 115 chains use it.

The components

  • Light client: each chain runs, as code, a light client of the other chain. It tracks the partner chain's block headers and makes it possible to cryptographically verify that a message was recorded there.
  • Connections and channels: a connection links two clients; a channel links two specific applications (for example each side's token transfer module). Each channel has an identifier like channel-0, channel-141, etc.
  • Packets: the messages sent from one chain to the other, with an expiry delay (timeout).
  • Relayers: off-chain programs that carry packets from one chain to the other.

IBC's documentation specifies that relayers are permissionless: anyone can run one. Above all, they cannot forge a message, because the destination chain verifies each packet with the origin chain's light client. A relayer can slow down or fail to deliver a packet, but cannot invent a transfer.

Why IBC isn't a "classic" bridge

Many bridges rely on a group of signers who attest that a deposit took place: if those signers are compromised, so are the funds. IBC relies on light-client verification: you trust the consensus of the two chains involved, not an intermediary committee.

That doesn't mean "risk-free". If the validators of one of the two chains behave maliciously (more than two-thirds of the voting power), they can fool the light client on the other side. The security of an IBC transfer is therefore at best that of the weakest chain on the route. For bridges in general, see our guide on bridge security.

Token transfer (ICS-20)

The ICS-20 standard defines fungible token transfers:

  1. On the source chain, your tokens are locked (held in escrow) in an escrow account.
  2. On the destination chain, representative tokens (vouchers) are created and credited to your address.
  3. On the way back along the same path, these vouchers are burned and the original tokens unlocked.
  4. If the packet expires or fails, the tokens are refunded on the source chain.

The technical name of a token received over IBC includes its path (the port and channel crossed). In your wallet, it often appears in an ibc/ form followed by a long hash, which the interface translates into a readable name. A little-known consequence: the same asset arriving by two different paths gives two distinct tokens, not directly interchangeable. Hence the recommendation to use the "canonical" channels offered by default in interfaces.

ATOM staking

ATOM is the token of the Cosmos Hub, the ecosystem's original chain. It's used to pay fees, to vote in governance and to secure the network through staking.

Delegating to a validator

You don't run a node yourself: you delegate your ATOM to a validator. The tokens stay at your address in the sense that the validator cannot spend them, but they are locked. In exchange, you receive a share of the rewards (issuance and fees), after the validator's commission is deducted. Your governance voting power is proportional to your stake; if you don't vote, your validator votes in your place by default.

The unbonding period

To get your ATOM back, you must "unbond" them. On the Cosmos Hub, the official documentation states a wait of three weeks. During this time, the tokens are unavailable and you can't sell them. Other Cosmos chains have different durations: always check before staking.

Redelegation (switching from one validator to another), on the other hand, is immediate, with no three-week wait.

Slashing

If a validator commits a fault, for example signing two different blocks at the same height (double signing), part of the stake is confiscated (slashing), including that of its delegators. The documentation recommends doing your due diligence, monitoring your validator and spreading your stake across several validators.

Interchain Security

Interchain Security lets the Cosmos Hub "lend" its security: the Hub's validators also validate so-called consumer chains (the documentation cites Neutron and Stride). With the "Partial Set Security" version, validators can choose which chains they take part in. For a delegator, this means your validator's activity may extend beyond the Hub: find out which chains it validates.

A concrete example

You hold ATOM on an exchange and want to stake it from a Cosmos-compatible wallet (Keplr, for example, among others).

  1. Create the wallet and write down the recovery phrase offline. Your Cosmos Hub address starts with cosmos1.
  2. Withdraw from the exchange by choosing the Cosmos Hub network (native ATOM). Start with a small test amount.
  3. Keep a few ATOM unstaked to pay for future transactions' fees.
  4. Pick two or three validators by looking at their commission, track record and share of voting power. Avoiding the biggest ones helps the network's decentralization.
  5. Delegate, then periodically claim your rewards.
  6. To sell later, start unbonding at least three weeks beforehand, then send the ATOM back to the exchange including the memo it gives you.

The memo field trap

On Cosmos chains, each transaction can contain a memo, a small free-text field. For your personal transfers, it's optional. But many exchanges use a single deposit address for all their clients and tell each client apart by the memo.

Keplr's help center explains it clearly: without a memo, your funds land in a shared pool with no identified recipient, and the wallet can't recover anything, since the funds did arrive at the exchange's address. Only the exchange's support can possibly credit your account manually, on proof of the transaction.

Two rules:

  • Copy the exact memo provided by the exchange, in addition to the address, on every deposit.
  • Never write sensitive information in a memo: it's public and written permanently on the blockchain.

Mistakes to avoid

  • Forgetting the memo on a deposit to an exchange: it's the most frequent cause of loss on Cosmos.
  • Sending to an unsupported chain: an exchange that accepts ATOM from the Cosmos Hub doesn't necessarily accept an IBC version of that token coming from another chain.
  • Using a non-standard IBC channel and ending up with a poorly liquid or unrecognized version of a token.
  • Staking all your tokens without keeping enough to pay fees, or without planning for the unbonding period.
  • Delegating everything to a single validator: in case of slashing, your whole position is hit.
  • Signing transactions on unknown sites: fake airdrop "claim" sites also target Cosmos users. Check the URL and the content of every signature.

Checklist before an IBC transfer

  • Are the destination chain and the token the ones expected?
  • Does the address have the right prefix (cosmos1, osmo1...)?
  • Do you have the source chain's native token to pay fees?
  • Is it a deposit to an exchange? If so, memo copied?
  • Was a small test send made before a large amount?

This guide is general information and does not constitute investment advice.

Key takeaways

  • Cosmos is an ecosystem of sovereign app-chains built with the Cosmos SDK and the CometBFT consensus, which offers fast finality.
  • IBC links these chains via light clients and permissionless relayers: security depends on the chains involved, not on a bridge committee.
  • A token transferred over IBC is locked at the source and represented at the destination; its identity depends on the path taken.
  • ATOM staking involves a three-week unbonding period and a slashing risk shared with your validator.
  • For any deposit to an exchange, the memo is essential: without it, recovery depends on support's goodwill.

Sources

Compare services related to this topic