v1-content
?
You are viewing an older version of the content, click here to switch to the current version

# The Cosmos Ecosystem

synopsis

Cosmos is a network of independent blockchains, which are:

  • All powered by consensus algorithms with Byzantine Fault-Tolerance (BFT).
  • All connected through the Inter-Blockchain Communication Protocol (IBC), which enables value transfers, token transfers, and other communication between chains, all without the need to involve exchanges or make compromises regarding the sovereignty of each chain.

Cosmos is also a blockchain ecosystem complete with protocols, SDK, tokens, wallets, applications, repositories, services, and tools.

In this section, you will get an introduction:

  • Of the Cosmos Ecosystem
  • Into the Cosmos SDK
  • To the Inter-Blockchain Communication Protocol
  • To the Ignite CLI
  • Into CosmWasm

# A whole universe to discover - tokens, wallets, apps, and services

Cosmos is an ever-expanding ecosystem of tokens, wallets, and tools, as well as interconnected applications and services, all built for a decentralized future.

In 2022, almost $100 billion in digital assets are under management and secured by Cosmos. Digital assets on Cosmos include fungible and non-fungible tokens (NFTs). You can issue in-application tokens to conduct settlements, bespoke issuance, handle inflation/deflation, and much more.

Among the fungible tokens secured by Cosmos are the Binance Coin (opens new window), Terra (opens new window), and ATOM (opens new window). Remember that because the tokens are defined on application-specific blockchains their developers are free from the constraints of a hypothetical general-purpose blockchain.

For an overview of the tokens Cosmos secures across applications and services, see the Cosmos market capitalization overview (opens new window).

In addition to the vast number of tokens, a variety of applications, services, wallets, and explorers are Cosmos-based.

Hundreds of applications and services build on Cosmos. Currently most applications and projects deal with finance, closely followed by infrastructure-related applications. Applications and projects in areas such as privacy, marketplace, and social impact are also emerging.

Do you want an up-to-date list of all the applications and services built on Cosmos? Go to the Cosmos Ecosystem overview (opens new window).

While most applications and projects are deployed on the mainnet, some are currently either in proof of concept, still in development, or have been deployed to a testnet only.

Moreover, 35 wallets (opens new window) and block explorers for Cosmos are part of the ecosystem. Most are for Android, such as the Atomic Wallet (opens new window) and Coinex (opens new window), or for iOS, like AirGap (opens new window) and Wallet.io (opens new window), but you can also find a number of web wallets like Exodus (opens new window) and Keplr (opens new window).

Do you want to find out more about the wide variety of wallets in the Cosmos Ecosystem? We recommend looking at the wallets and block explorers for Cosmos (opens new window).

# The Cosmos SDK - modular and customizable

The Cosmos network focuses on an ecosystem for easy blockchain development that provides customizability and interoperability. It establishes a stable universe determined by rules that apply to the whole ecosystem equally.

Before Cosmos came along, developing a whole new chain was much more difficult and expensive than building a smart contract. Now, with the Cosmos SDK, entirely flexible, secure, high performance, and sovereign application-specific blockchains can be developed. To allow this, building modular, adaptable, and interchangeable open-source development tools is at the center of Cosmos' mission.

The main aim of the Cosmos network is to provide an ecosystem for easy blockchain development based on the Tendermint BFT and the Inter-Blockchain Communication Protocol (IBC) with the so-called Cosmos SDK (opens new window).

Each chain in the Cosmos Ecosystem relies on the Tendermint fast-finality BFT consensus algorithm. This ensures a common consensus mechanism at work in all chains of the network. Next to its use in Cosmos, the Tendermint consensus mechanism is also utilized in the IRIS Hub (opens new window), Binance Chain (opens new window), Terra (opens new window), Kava (opens new window), and more.

If you want to dive deeper into application-specific blockchains, look at the section A Blockchain App Architecture.

The Cosmos SDK is a generalized framework to build secure blockchain applications on the Tendermint BFT in Golang. It is a modular framework for application-specific blockchains. The design is based on two major principles: modularity and capability-based security. The Cosmos SDK was envisioned to be an npm-like framework for secure applications on top of Tendermint. Over time it has become an advanced framework for custom application-specific blockchains.

The ready-built modules of the Cosmos SDK are easy to import, adapt, and use. Developers can create their own modules to introduce specific functionalities. With the growth of the ecosystem, the number of modules will grow, facilitating the development of more complex applications.

Building on modular components, many of which you did not write yourself - does this increase the potential for attacks, and faulty or malicious nodes operating undetected? No need to worry.

The Cosmos SDK is built on the object-capability model (opens new window). It not only favors modularity but also encapsulates code implementation. An object-capability model ensures that:

  • There is no way for objects in the memory to be discovered just by going through the composed objects of others.
  • The only way to have references to objects or to access services is to have been passed the relevant object references.

The default consensus mechanism available when developing with the SDK is the Tendermint Core (opens new window).

# The Inter-Blockchain Communication Protocol

The Inter-Blockchain Communication Protocol (IBC) (opens new window) is the basis for interoperability in Cosmos. It leverages the instant finality of Tendermint to allow for the transfer of value (token transfers) and communication between heterogeneous chains. Blockchains with different applications and architecture specifications become interoperable whether or not they share a validator set.

Without IBC, the interoperability of heterogeneous chains is difficult to achieve because they may implement the consensus, networking, and application layers in different ways. As soon as a blockchain is compatible with IBC, it becomes interoperable with other blockchains.

Cosmos implements a modular architecture with two blockchain classes: hubs and zones.

Zones are heterogeneous blockchains carrying out the authentication of accounts and transactions, the creation and distribution of tokens, and the execution of changes to the chain. Hubs are blockchains designed to connect the so-called zones. Once a zone connects to a hub through an IBC connection, it gets automatic access to the other zones connected to that hub. At this point, data and value can be sent and received between the zones without risk of, for example, double-spending tokens. This helps reduce the number of chain-to-chain connections that need to be established for interoperability.

There is no enforcement of an actual topology. A hub can be understood as a zone with many connections to other zones. Application zones can be expected to join the hubs in the ecosystem, but they are free to coalesce into any topology the developers find appropriate.

If you want more detailed information on hubs and zones on the mainnet and in the testnet, see this map of zones (opens new window).

The Cosmos Hub (opens new window) was the first hub created. It is a public Proof-of-Stake (PoS) blockchain with a native token, ATOM. The Cosmos Hub can be understood as a router facilitating transactions between the chains connected to it. For example, the Cosmos Hub allows for transaction fees to be paid in different tokens as long as the zone trusts the Cosmos Hub and the other zones connected to it.

How do we connect our chain to a non-Tendermint chain? The IBC connection is not limited to Tendermint-based chains. If another, non-Tendermint blockchain uses a fast-finality consensus algorithm, a connection can be established by adapting IBC to work with the non-Tendermint consensus mechanism.

If the other chain is a probabilistic-finality chain, a simple adaptation of IBC is not sufficient. A proxy chain called a peg-zone helps establish interoperability. Peg-zones are fast-finality blockchains which track chain states to establish finality. The peg-zone chain itself is IBC-compatible and acts as a bridge between the rest of the IBC network's chains and the probabilistic-finality chain.

A peg-zone implementation exists for Ethereum and is named the Gravity Bridge (opens new window). For more information on bridges and the Gravity bridge, see the section Bridges.

# Ignite CLI - building application-specific blockchains with one command

Ignite CLI (opens new window) is a developer-friendly, command-line interface (CLI) tool for application-specific blockchains which builds on Tendermint and the Cosmos SDK. The CLI tool offers everything developers need to build, test, and launch a chain. It accelerates blockchain development by scaffolding and assembling all components needed for a production-ready blockchain. Ignite CLI makes the process from initial idea to production 95% faster. This lets developers build a blockchain in minutes, and frees them to focus more strongly on the business logic of their application.

With Ignite CLI, developers can:

  • Create a modular blockchain written in Go with a single command.
  • Start a development server to experiment with token creation and allocation, as well as module configuration.
  • Allow for inter-chain token transfers by using a built-in IBC relayer to send value and data to different chains.
  • Benefit from a fast-developed frontend with automatically generated APIs and web pages in JavaScript, TypeScript, and Vue.

See the official Ignite CLI documentation (opens new window), and the section on Ignite CLI in the Run Your Own Cosmos Chain chapter.

When you scaffold with Ignite CLI, things like key management, creating validators, and transferring tokens can all be done through the CLI.

# CosmWasm - multi-chain smart contracts

CosmWasm (opens new window) is a multi-chain platform on which to create robust dApps for Cosmos using smart contracts. It builds on Tendermint and the Cosmos SDK. Its key features are:

  • Mature tools for the development and testing of smart contracts
  • Close integration with the Cosmos SDK and ecosystem
  • A secure architecture to avoid attack vectors

With CosmWasm, smart contracts can run on multiple chains with the help of the IBC protocol. It adds further flexibility for developers and makes smart contract development faster. CosmWasm is written as a module to be plugged into the Cosmos SDK, and leverages the speed of Wasm and the power of Rust.

For a deeper dive, read the CosmWasm documentation (opens new window).

# The possibility of using alternative blockchain frameworks and SDKs

As the Cosmos SDK is modular, developers can port existing codebases in Go on top of the SDK. This allows developers to build on Cosmos without having to compromise too much on the toolset and environment used.

For example, with Ethermint (opens new window) developers can use the Ethereum Virtual Machine (EVM) from the main Go Ethereum client as a Cosmos SDK module, which is compatible and combinable with existing modules.

Ethermint is a software developed to port the EVM into a Cosmos module. It makes scalable, high-throughput, PoS blockchains possible. These are fully compatible with Ethereum and the Cosmos SDK.

Ethermint is Web3 compatible, and achieves high throughput with Tendermint and horizontal scaling with IBC. It provides a Web3, JSON-RPC layer to interact with Ethereum clients and tooling.

For more on Ethermint, consult the Ethermint documentation (opens new window).

All Ethereum tools (such as Truffle and Metamask) are compatible with Ethermint. Developers can even port their Solidity smart contracts to interact with the Cosmos Ecosystem. Building a chain is not necessary to develop Cosmos-compatible smart contracts, it can be all done with Ethermint. However, while Ethermint allows running vanilla Ethereum as a Cosmos application-specific blockchain, developers benefit from the Tendermint BFT.

# Next up

Are you ready to get some ATOM? Find out all about the native token of the Cosmos Hub and how to stake ATOM in the next section.