The Great Inter-chain Battle (part 1)

Cross-chain protocols, such as Cosmos and Polkadot, are attempting to bring together different Blockchains that offer different value to its users, by trying to standardise the way in which they work at lower levels, such as block validation and communication. This is not much different from how the Internet works today, where communication protocols were standardised to allow various applications to communicate with each other. For this reason, these solutions are often known as a Network or Internet of Blockchains.

THE COSMOS NETWORK

The Cosmos (Network) started with the release of Tendermint, a P2P gossip protocol that, using a Byzantine Fault-Tolerant consensus mechanism (similar to PBFT), serves as the backbone of the Cosmos Network.

(image Cosmos Tendermint Stack)

Tendermint consensus mechanism uses validator nodes to vote on new blocks, with each validator node having a certain amount of voting power. These validators are chosen by regular nodes, and their voting power is determined by the number of tokens they stake when voting for blocks. This voting power is then used to vote in a new block, proposed at each consensus round by a randomly chosen round-leader. If the proposed block is voted by the validators that hold more than 2/3 of the total voting power the block is validated. Validator nodes that are caught voting with malicious intentions are slashed, which means that they lose the tokens they are staking.

Tendermint is implemented in Tendermint Core, a “consensus engine” that can turn any deterministic Blackbox application into a blockchain and replicate it to build a distributed system. Tendermint Core connects to blockchain applications via the Application Blockchain Interface (ABCI), allowing blockchain applications to be programmed in any language, not just the programming language that the consensus engine is written in. ABCI also makes it possible to easily swap out the consensus layer of any existing blockchain stack, making it easier to copy entire Blockchains to the Cosmos Network by swapping the consensus layer and retaining the rest of the characteristics.

The Cosmos Network is split into zones, with each zone representing a different Blockchain. Tendermint consensus mechanism uses validator nodes to vote on new blocks, with each validator node having a certain amount of voting power. These validators are chosen by regular nodes, and their voting power is determined by the number of tokens they stake when voting for blocks. This voting power is then used to vote in a new block, proposed at each consensus round by a randomly chosen round-leader. If the proposed block is voted by the validators that hold more than 2/3 of the total voting power the block is validated. Validator nodes that are caught voting with malicious intentions are slashed, which means that they lose the tokens they are staking.

Tendermint is implemented in Tendermint Core, a “consensus engine” that can turn any deterministic Blackbox application into a blockchain and replicate it to build a distributed system. Tendermint Core connects to blockchain applications via the Application Blockchain Interface (ABCI), allowing blockchain applications to be programmed in any language, not just the programming language that the consensus engine is written in. ABCI also makes it possible to easily swap out the consensus layer of any existing blockchain stack, making it easier to copy entire Blockchains to the Cosmos Network by swapping the consensus layer and retaining the rest of the characteristics.

The Cosmos Network is split into zones, with each zone representing a different Blockchain.

The first Blockchain in the Cosmos Network will be the Cosmos Hub. The Cosmos Hub will then connect to different zones (via an inter-blockchain connection protocol) and will keep information on the state of each zone connected to it. Similarly, each zone will have information on the state of the Hub. The Hub will then allow assets to be transferred from one zone to another by tracking the different assets and its quantity present in each different zone. Ultimately, the Hub acts as a central ledger, mediator, or exchange, to the entire Network.

Other Blockchains from outside the Cosmos Network can also interact with this ecosystem. This is done by using what Cosmos calls a Peg-Zone. (image Illustration on how Ethereum could be connected to a Network through a Peg Zone)

A Peg-Zone is a blockchain that tracks the state of another blockchain. The Peg-Zone itself has fast-finality and is therefore compatible with IBC and can “convert” a proof-of-work Blockchain such as Ethereum in a fast-finality Blockchain. To do so, first, the Peg-Zone needs to decide on a finality threshold for the origin chain.

For example, we can consider that a given state of the origin’s chain is final when a certain number of blocks have been added after that state and we are confident that the Network will not fork before it or when reaching it. Using the main Ethereum blockchain as an example let’s say that we define 250 as the number of confirmations needed to be confident that a given state is final. A contract is deployed into the Ethereum main Network, which will be tracked by the Peg-Zone. When users want to send tokens from Ethereum to Cosmos, they actually send tokens to this contract. Then, the contract freezes the assets and 250 blocks after a representation of these assets is released on the Peg-Zone. A similar mechanism is used to send assets back to the Ethereum chain.

The Cosmos Network will have two different native tokens:

  • The Atom, which is the governance token. Atoms are used to vote on validator nodes and for validator nodes to vote on new blocks. It is also used for nodes to vote on new proposals that may change system parameters and properties, such as the maximum amount of fees or changes to the “constitution” of the Cosmos Hub.
  • The Photon, with an initial distribution of Photons taking the form of a hard spoon of the Ethereum chain. This hard spoon is a snapshot of the Ethereum chain at a given date, with Atom holders voting on the parameter of the hard spoon, such as the date of the snapshot or the initial distribution. Additionally, bonded Atom holders will receive newly created Photons as block rewards. Photons will be distributed at a fixed rate in proportion to each bonded Atom holder’s stake. This rate will be decided via governance.

Each transfer on the Cosmos Hub comes with transactions fees. These fees can be paid in any currency that is whitelisted by the Hub’s governance. The first whitelisted tokens at launch will be Atoms and Photons.

part 2 will take a look at Polkadot.


This post was written by Tomás Carvalho developer at Blocksmith.

Blocksmith is supporting BCDC and other Blockchain related events in London. We are a blockchain development studio that helps startups and corporates use blockchain technology to solve real business problems by developing innovative solutions.

Get to know them better. https://blocksmith.tech

Come down to the BCDC: Cosmos vs Polkadot https://skillsmatter.com/meetups/11283-blockchain-developers-club#overview