The Dual Giants of Cross-Chain: Cosmos

IOBCCapital
2022-03-28 17:49:04
Collection
In the multi-chain era, cross-chain is a necessity in the blockchain industry.

Source: IOBC Capital

In the multi-chain era, cross-chain is a necessity in the blockchain industry. Application layer projects like DeFi and GameFi have different performance requirements from public chains: DeFi has high demands for composability, GameFi requires high concurrency performance, and SocialFi has high storage requirements. Therefore, various Layer 1 or Layer 2 solutions focused on vertical fields have recently emerged, such as Ronin for GameFi and DESO for SocialFi.

The cross-chain model of Cosmos is very suitable for these public chains focused on vertical fields. Cosmos provides modular blockchains, making it easier for application developers to use public chains that suit their needs. Applications and protocols in the Cosmos ecosystem connect using IBC (Inter-Blockchain Communication Protocol), enabling the free exchange of assets and data between independent blockchains.

Currently, there are four main cross-chain technology solutions:

  1. Notary Schemes
  2. Side Chains/Relays
  3. Hash-locking
  4. Distributed Private Key Control

Cosmos is a typical case of the Relays technology, with Polkadot being another example. Cosmos establishes connections for cross-chain through the IBC protocol, while Polkadot achieves cross-chain through XCMP protocol via slots.
This article focuses on the cross-chain solutions of Cosmos.

1. Overview of Cosmos

Cosmos is a heterogeneous network supporting cross-chain interaction, launched by the Tendermint team. The ICO of Cosmos took place in April 2017, raising 4870 BTC and 240,000 ETH. ATOM has no upper limit and will be issued with a maximum annual inflation rate of 20%, with the specific inflation rate negatively correlated with the staking rate. The current staking rate is 186M/291M (63.9%), with an annual inflation rate of 10.05%.

The ultimate goal of Cosmos is to create a blockchain internet that allows numerous autonomous and easily developed blockchains to expand and interact with each other. Developed based on Tendermint, the Tendermint consensus algorithm is a Byzantine Fault Tolerant consensus engine characterized by high performance, consistency, and Byzantine fault tolerance. Cosmos can achieve thousands of transactions per second based on the Tendermint engine, approaching VISA transaction speeds.

The cross-chain network of Cosmos consists of three core components: the central network Hub, the regional space network Zone, and the cross-chain protocol IBC.

The central blockchain network HUB is the economic center of Cosmos and the trust center for cross-chain messages. It supports a multi-asset distributed ledger, with these token assets transferring from one space to another via the IBC cross-chain protocol. In addition to the official Cosmos Hub, there are multiple cross-chain Hubs that can provide cross-chain services, such as IRISnet.

The regional space network ZONE is an independent blockchain that can communicate, exchange information, and exchange assets with the Cosmos central network HUB through IBC cross-chain communication.

The IBC protocol, IBC (Inter-Blockchain Communication Protocol), is the communication protocol between blockchains designed for the Cosmos network, relying on its timely finality characteristics for message passing between Hub and Zone, thereby achieving cross-chain objectives. IBC is also one of the modules in the Cosmos SDK.

image

The core logic of Cosmos's cross-chain: Cosmos Hub establishes IBC connections with compatible chains to achieve cross-chain exchange of assets and data. The Hub acts as a centralized market for cross-chain, making it the best place to hold digital assets and manage accounts across multiple chains. The Hub needs to track the status of each Zone, while each Zone is obligated to continuously report its newly produced blocks to the Hub.

Once a Zone establishes an IBC connection with the Hub, it can automatically access all Zones connected to that Hub; when a Zone receives tokens from other Zones through the Hub, it only needs to trust the Hub and not all other Zones in the network.

How does IBC actually work? Let's illustrate with an example: transferring 10 ATOM from ChainA to ChainB.
Both ChainA and ChainB support the Cosmos SDK, becoming a Zone in the Cosmos ecosystem. A Relayer is an off-chain relay responsible for polling and routing IBC data packets, and the general process of cross-chain is as follows:
ChainA------Relayer------Cosmos Hub------Relayer------ChainB
This includes several steps:

  1. Tracking: The IBC modules of ChainA and ChainB continuously synchronize the block header information on each other's chains, allowing both parties to track changes in the set of validators on each other's blockchains. Essentially, they maintain a light node of each other's chain;

  2. Bonding: After using Cosmos for cross-chain transfer, the IBC module of ChainA will record the transfer, and the 10 ATOM on ChainA will be in a locked state;

  3. Proof Relay: A proof that ChainA has locked 10 ATOM will be routed to the IBC module of ChainB;

  4. Validation: ChainB, using the light node information from ChainA, will validate this proof, and if successful, ChainB will "mint" 10 ATOM Vouchers, which can be used for subsequent circulation. Of course, these Vouchers can also be returned to ChainA through the same cross-chain method, and then the locked ATOM on ChainA will be unlocked.

2. Consensus Mechanism of Cosmos

The consensus algorithm of Cosmos is based on a PoS (Proof of Stake) and BFT (Byzantine Fault Tolerant) consensus mechanism. The staking module of the Hub is built on the Tendermint BFT consensus mechanism, allowing ATOM token holders to protect the security of the Cosmos blockchain by staking their ATOM in exchange for transaction fees.

Currently, there are 342 validators on the Cosmos Hub blockchain, with 150 active validators and an average block time of 7.29 seconds.
Cosmos Tendermint's PoS rules

Assuming there are three validators A, B, and C, who have staked 1, 2, and 3 tokens respectively;

image

  1. In the first round, C has the most staked assets, so C is elected as the proposer for the first round;

  2. In the second round, since C was the proposer in the previous round, their Votepower becomes prevotingPower - (stakea + stakeb), which is 3 - (1 + 2) = 0, while B's votepower equals prevotingPower + stake, which is 2 + 2 = 4, and similarly, A's vote_power equals 2. Therefore, in this round, B has the highest voting power and is elected as the proposer;

  3. In the third round, A's votepower is 3, B's votepower is 2 - (2 + 0) = 0, and C's vote_power is 0 + 3 = 3. Since A ranks ahead of C, A is elected as the proposer;

  4. In the fourth round, A's vote_power is -1, B's is 2, and C's is 6, so C is elected as the proposer.
    …… and so on.

In general, the person with the most staked assets becomes the proposer first, and then they take turns based on the amount of staked assets.

Cosmos Tendermint's BFT Rules

BFT stands for Byzantine Fault Tolerant, and this consensus mechanism can be traced back to the Byzantine Generals Problem.
Byzantine Generals Problem
Byzantium was the capital of the Eastern Roman Empire, and due to the vast territory of the Byzantine Roman Empire, the camps of each army were far apart, and the generals could only rely on messengers to communicate. During a war, the generals must formulate a unified action plan.
However, among these generals, there are traitors who will convey false messages. Therefore, the generals must have a predetermined method to reach a consensus on action among all loyal generals. Essentially, it is about enabling the Byzantine generals to establish a consensus on battle plans in a non-trust environment with traitors.

Tendermint is an easy-to-understand BFT consensus protocol that follows a simple state machine principle. So, how does Tendermint reach consensus in a trustless environment?

There are two roles in the protocol:
Validators: The roles or nodes in the protocol, with different validators having different powers (Vote Power) during the voting process;
Proposers: Elected from the validators. Validators (proposers) propose blocks for transactions and vote on the proposed blocks.

Blocks are submitted to the chain, and each block represents a block height. However, blocks can also fail to be submitted, in which case the protocol will select the next validator (to become the proposer) to propose a new block at the same height and restart the voting process.

image
Process:

  1. Propose phase: The Proposer broadcasts a Proposal to the entire network;

  2. Prevote phase: Each Validator signs and broadcasts a Prevote for the Proposal block received in the current round;

  3. Precommit phase: Each Validator determines if they have collected more than 2/3 Prevotes; if so, they sign and broadcast a Precommit vote for this block. If they collect more than 2/3 Prevotes for an empty block (Nil), they will release the previously locked block and return to the Propose phase. If they do not collect more than 2/3 of the Prevotes, they will not lock onto any block;

In the later stages of the Precommit phase, if a Validator collects more than 2/3 of the Precommit votes, they enter the Commit phase; otherwise, they enter the next round of the Propose phase;

  1. Commit phase: The Validator receives the block that has been committed by the entire network and broadcasts a Commit vote for this block; Validators need to collect more than 2/3 of the Commit votes for the block that has been Precommitted by the entire network. Throughout the consensus process, as long as a node receives 2/3 of the Commit votes, it will immediately enter the Commit phase, set the CommitTime to the current time, and then enter the NewHeight phase (new block).

In simple terms, to successfully submit a block, there must be more than 2/3 of validators voting in both the Prevote and Precommit phases. As long as less than 1/3 of the validators are Byzantine nodes, Tendermint can produce blocks normally; as long as no more than 2/3 of the validators are Byzantine nodes, Tendermint will not produce malicious blocks.

So, how does Tendermint transmit the underlying consensus to the state layer?

Tendermint mainly consists of two parts: Tendermint Core, the blockchain consensus engine responsible for data transmission between nodes and Byzantine consensus; and ABCI, the Application Blockchain Interface, which is also a protocol that supports transaction processing implementations in any language.

Overall, Tendermint can be understood as a modular blockchain software framework that allows developers to customize their own blockchains without worrying about the implementation of consensus and network transmission.
image
Tendermint separates blockchain applications (state) from the underlying consensus, with the consensus engine and P2P network encapsulated in Tendermint Core, and interacts with the Cosmos SDK through ABCI (Application Blockchain Interface). Based on this architecture, application developers can easily implement their own blockchains.

image

The Cosmos SDK contains the program code for Cosmos Hub and is also a blockchain development framework that provides some common functional modules for other blockchain developers, such as: IBC, accounts, governance, authentication, etc. Among them, IBC is the key protocol for cross-chain communication: the inter-blockchain communication protocol.

Cosmos encapsulates the consensus algorithm and network module in the form of an SDK, forming a ready-to-use blockchain development framework.
In summary, theoretically, Cosmos solves the three most difficult blockchain problems today:

  1. Scalability: The Tendermint consensus mechanism can be understood as a voting consensus system, based on PoS and BFT algorithms, where PoS selects proposers, and under the BFT mechanism, as long as 2/3 of the nodes are honest, the voting results can be guaranteed to be consistent;
  2. Usability: The modular framework of the Cosmos SDK allows for very convenient construction of interoperable, application-specific blockchains;
  3. Interoperability: Cosmos achieves cross-chain communication between HUB and ZONE through the IBC communication protocol, functioning similarly to TCP/IP.

3. Cosmos's Cross-Chain Ecosystem

According to official data, as of now, the Cosmos ecosystem has 12 major categories totaling 247 projects, with a total market value close to $150 billion, having developed into the second-largest blockchain ecosystem after Ethereum.
image

Leading projects in the Cosmos ecosystem include: Osmosis, Cosmos, Stargaze, Juno, Umee, Terra, Chihuahua, Crypto.org, Injective, Cronos, Secret, Axelar, Sifchain, Akash, Comdex, Persistence, Gravity Bridge, Sentinel, Desmos, KiChain, etc.
Infrastructure of Cosmos Hub

1. Gravity DEX

Enables users to seamlessly swap digital assets from across the cross-chain. The protocol improves existing designs by combining the AMM mechanism with an order book model, providing a richer and more efficient trading experience.

For real users in the Cosmos ecosystem, Gravity DEX is like a convenience store in the neighborhood. While it may not be chosen for large-scale investment trades, it is very convenient for configuring some assets during cross-chain processes.
However, to maintain the core spirit of "Credible Neutrality" of the Cosmos Hub, the development team will migrate Gravity DEX to a separate blockchain, Crescent Network.

2. Gravity Bridge

Gravity Bridge is part of the infrastructure of the Cosmos ecosystem, a secure, efficient, and decentralized cross-chain bridge. It leverages billions of dollars of staked ATOM on the Cosmos Hub to bring Cosmos assets into the Ethereum ecosystem in the form of ERC-20 tokens, and similarly, ERC-20 tokens from the Ethereum ecosystem can flow into the Cosmos ecosystem.
Gravity Bridge is developed by the Althea team and has its own token, GRAV.

3. Domain Name Service

The domain name service of the Cosmos ecosystem will be managed on the Cosmos Hub, making it easier for Interchain users to identify the chains they want to interact with.

4. Liquid Staking

Liquid staking will become an important primitive in the cross-chain DeFi space, with the core being claims against staked ATOM. Just like staked ATOM, liquid staking will generate staking rewards, but unlike regular staking, liquid staking is liquid, and the staked ATOM can be transferred. Since they represent staked ATOM, there is a risk of being burned if the underlying ATOM is slashed.

Core Projects of Cosmos Zone

This chart shows the most active Zones for IBC Transfers. Currently, there are a total of 43 Zones in the Cosmos ecosystem, of which 42 are active (with IBC Transfers).
image
Compared to last year, this year's IBC Transfers data has seen significant growth. In 2021, the active Zones in the Cosmos ecosystem had a total of 5.8 million IBC Transfers throughout the year; however, in the last 30 days, the number of IBC Transfers has exceeded 13 million.

image

1. Osmosis (OSMO)

This is an advanced AMM protocol built using the Cosmos SDK. It has attracted $700 million in liquidity to date and supports trading of IBC tokens, with a total trading volume exceeding $9.5 billion. Osmosis has become a key force in bringing IBC to market.
Notably, Osmosis is the first DEX project outside the Ethereum ecosystem to receive investment from Paradigm.

2. Terra (LUNA)

In October 2021, Terra enabled IBC, bringing over $18 billion in liquidity assets to the Cosmos ecosystem along with its native LUNA token and stablecoin UST.

The large-scale addition of a public chain to the IBC ecosystem greatly boosted the morale of the Cosmos community and drew more attention to the development status of the Cosmos cross-chain ecosystem. It is precisely because of the addition of these leading projects that the Cosmos ecosystem has developed into the second-largest economy after Ethereum.

3. Juno

Juno is a public chain in the Cosmos ecosystem that provides an environment for deploying interoperable smart contracts. Currently, over 50 applications and more than 2000 DAOs have been built on Juno.
Recently, a community proposal to "tax whale assets" sparked heated discussions in the community, prompting a rethinking of the "Code is Law" principle in the blockchain world.

4. Kava

Kava is a DeFi platform based on Cosmos cross-chain, similar to MakerDAO. Users deposit collateral into a collateralized debt smart contract to obtain the stablecoin USDX.
After joining the Cosmos ecosystem, Kava has evolved from a single application blockchain to a protocol with over $2 billion in on-chain value, achieving great success.

5. Sifchain

Sifchain is the first cross-chain DEX from Cosmos to Ethereum. At the beginning of 2021, it integrated its Peggy bridge from Cosmos to Ethereum. Peggy uses pegged tokens to allow users to easily and cheaply swap and aggregate between IBC tokens and ERC20 tokens, and it is more efficient than any Ethereum-based DEX.

6. Secret Network

Secret Network, founded by the Secret Foundation, is a privacy public chain based on Tendermint and Cosmos SDK. All data on Secret Network is encrypted, and to view specific transaction data, one must have the corresponding Viewing Key.
Secret Network combines privacy protection, scalability, and cross-chain features.

7. IRISnet

IRISnet is a cross-chain hub in the Cosmos ecosystem, supporting a new set of business scenarios—enterprise-level distributed applications. It adds scale and diversity to the Cosmos ecosystem.

In addition to the projects mentioned above, the Cosmos ecosystem has many other well-known Zones, which will not be detailed here. Future articles will delve deeper into well-known projects within the Cosmos ecosystem.

4. Thoughts on Cosmos

1. Weak Value Capture of ATOM

The initial supply of ATOM is 200 million, adopting an inflation model with a 7% inflation rate in the first year for node rewards. After that, the annual inflation rate will vary with the staking rate—when the staking rate is above 2/3, the minimum annual inflation rate is 7%; when the staking rate is lower, the maximum annual inflation rate can reach 20%; the current staking rate is 63.9%, with an annual inflation rate of 10.05%.

In addition to the staking rewards from joining node validators, in recent years, ATOM holders have gained more from airdrops of ecosystem projects.

New chains in the Cosmos ecosystem generally prefer to use airdrop incentive schemes to attract the attention of Cosmos community members. In 2021, projects such as Osmosis, Juno, Regen, Sifchain, Persistence, Comdex, and Desmos conducted airdrop marketing in the Cosmos ecosystem.
ATOM holders must stake their tokens with Cosmos validators to receive airdrop tokens. Moreover, they cannot stake with exchange nodes, as airdrops in the Cosmos community generally exclude exchange nodes.

In 2022, many projects in the Cosmos ecosystem may also launch airdrops covering areas such as NFT, SocialFi, DeFi, and GameFi, including Evmos, Umee, Gravity Bridge, LikeCoin, Game, Stargaze, BitSong, and Cyber. It is also necessary to ensure that your ATOM is in the correct staking state.

In the cross-chain field, Polkadot's DOT provides a consensus layer security for both relay chains and parachains and charges a certain fee, which is also a form of value capture. However, Cosmos's ATOM is only responsible for the security of the Cosmos Hub. Compared to DOT, there seems to be a gap in value capture.

In terms of blockchain ecosystems, the development of the Cosmos ecosystem is already second only to Ethereum, but ATOM has not captured as much value from ecosystem development as ETH has, and even the market capitalization of individual Zone tokens within the ecosystem is higher than that of ATOM, such as LUNA and MATIC. Many chains developed using the Cosmos SDK, such as Binance Chain and Polygon, seem to contribute little to the value of ATOM.

For ATOM holders, this may be a small flaw, but it may actually be more beneficial for the development and growth of the Cosmos ecosystem.

2. The Truly Important Aspect is the IBC Communication Protocol Between Blockchains

In the Cosmos ecosystem, it is multi-centered and multi-Hub, and in the future, people may focus more on the use of IBC rather than the Cosmos Hub or other Hubs.

Cosmos is referred to as "the internet of blockchains," with the core goal of enabling cross-chain communication between blockchains. Perhaps in the future, many public chains, application protocols, etc., will develop very well within the Cosmos ecosystem, such as Terra.

Although they belong to the Cosmos ecosystem, for these leading public chains, the most valuable aspect of the Cosmos ecosystem is IBC, not the Cosmos Hub. This aligns more with the decentralized spirit of blockchain, where the core of cross-chain projects is to solve the problem of blockchain silos, rather than developing into a new center themselves.

Finally, special thanks to the many technical partners from the Cosmos Chinese community and Anonymous Club community for their support and assistance in this article.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators