Blockchain Interoperability: Cosmos vs. Polkadot
Blockchain interoperability may be the next big wave of innovation that creates massive value in expanding the decentralized internet.
Two of the top contenders to create a network of blockchains are The Cosmos Network and The Polkadot Network. We will explore each teams protocols, network design, security models, tech stacks, and more.
But first we need to explain what blockchain interoperability means from a high level.
What is Blockchain Interoperability?
Blockchain interoperability is complex, so let’s try to explain it in the simplest way.
Blockchain interoperability would be sending Ether, and receiving Bitcoin naturally through blockchain protocols, without a third party such as an exchange. It is a simple desire, but it has yet to come true.
Both Polkadot and Cosmos are building protocols for blockchains to safely and reliably interact with one another. The protocols allow for the creation of new blockchains that are able to send transactions and messages between each other.
Why is it Important?
A network of blockchains allows for network effects to improve the decentralized internet. When everything is connected, it brings more capital, a better user experience, and more minds brainstorming to improve the network.
Blockchain interoperability can significantly increase scalability, speed, and extensibility of blockchains. For example if you have a blockchain capped at 100 transactions per second, you can create a second identical blockchain to reach 200 transactions per second that can interoperate with the other blockchain. You can do this to allow for 1000’s of transactions.
It also allows for private, public, and consortium blockchains to connect. Eventually blockchains could even interoperate with fiat banking systems like SWIFT. 
Why Focus on Cosmos and Polkadot?
From my research I have found them to be the most promising projects. They both have strong technical teams, they have good reputations in the decentralized community, they have been in the blockchain space for many years, and they have written a significant amount of blockchain code from scratch.
They have similar strategies to solve blockchain interoperability, but with subtle differences in protocols and designs. These differences have tradeoffs between security, privacy, efficiency, flexibility, and ease of use.
Now let’s dig in and see what the future of blockchain interoperability looks like!
The Cosmos Network
The Cosmos team has been working on blockchain interoperability since 2014 with the release of Tendermint.  Tendermint is a Byzantine Fault-Tolerant consensus engine, along with a peer-to-peer network gossiping protocol.
They are building The Cosmos Network, which is a blockchain built on top of Tendermint. Tendermint and Cosmos are both under the InterChain Foundation. Two simple diagrams below explains how they have designed the network.
Technical Design and Protocols
Tendermint (Consensus and Networking)
Tendermint is a Practical Byzantine-Fault Tolerant (PBFT) state machine. It requires a known set of Validators to agree to come to consensus on a block. The Cosmos Network requires at least 2/3’s to reach consensus. Assuming less than 1/3 of the Validators are byzantine, the network will never fork , because Validators cannot commit conflicting blocks at the same height. This is rooted in the fact that Tendermint favours safety over liveness. 
Application Blockchain Interface (ABCI)
The ABCI is an interface that defines the boundary between the replication engine (Tendermint) and the state machine (the blockchain). The ABCI is the only way for the blockchains state to be updated, and only Tendermint has access to state changing functions for the blockchain. This design is a great strategy for security because there is only one point of entry to change state.
The diagram below breaks down the Tendermint Stack, showing how nodes are connected in a peer-to-peer network, along with the components of each node.
Interoperability on Cosmos
Inter Blockchain Communication (IBC)
The Cosmos Network has the Inter Blockchain Communication (IBC) protocol to allow blockchains to interact with other blockchains. The network of blockchains will communicate through IBC, with the Cosmos Network as the central hub. Blockchains are connected in a hub and spoke model to the Cosmos Hub. The spokes of the network are called Zones, as seen in the diagram below.
The more technical term for IBC is a Chain Relay.  Chain Relays allow for blockchains to read and validate events in other blockchains. For example, a smart contract on Chain A wants to figure out if an event happened on Chain B. To do that, a smart contract on Chain B needs to take a block header of Chain A and verify that it has met consensus and reached finality. 
In essence Cosmos is building a network where it is easy to create new blockchains that can interact through chain relays from day one. Each blockchain would be running on top of Tendermint, as the diagram below shows.
As long as a new blockchain follows the IBC protocol, it will be able to join the network. This includes both public and private blockchains.
Peg Zones will allow for The Cosmos Network to connect to live blockchain networks, such as the Ethereum Mainnet. Being able to connect to live blockchains is a main requirement of any blockchain interoperable network. Peg Zones are complicated, but let’s try to explain in simple terms how they work.
You must have a shared security model, where the Cosmos Peg Zone Validator is also running an Ethereum Mainnet node. The special Validator approves the interactions between the two chains. This is a complicated infrastructure to set up, and you also need to trust the team running the Peg Zone. 
The actual exchange of assets would require an Ethereum Mainnet smart contract to lock in Ether, which would in turn create new tokens in the Peg Zone that represent “Cosmos-Ether” that can be sent around the Cosmos Network through IBC. On the Cosmos side the Validator would lock up Atoms, which would in turn create an ERC-20 Atom token that can be sent around the Ethereum Mainnet.  This would allow for full interoperability of assets between Cosmos and the Ethereum Mainnnet.
Reaching Interoperability Between Two Chains
Any interoperable network needs at least two blockchains that can exchange messages and transactions. Ethermint is the solution that Cosmos has came up with for the first chain that will interact with the Cosmos Hub.
Ethermint is a blockchain that the Cosmos team plans to launch after the Cosmos Hub Mainnet launch. It is slotted for Q4 2018.  The simplest way to describe Ethermint is that it is the Ethereum blockchain, with the proof-of-work consensus algorithm taken out, and the Tendermint consensus engine replacing it. This allows for an Ethereum Virtual Machine based blockchain to easily interact over IBC with the Cosmos Network. 
The genius behind Ethermint is the “hard spoon” that the team is planning to do. They are going to take a snapshot of all Ethereum accounts at a point in time, and use that state to create the new Ethermint zone. This allows them to bootstrap the existing network of Ethereum developers, and it will provide everyone with new tokens and faster transaction speeds.
Ethermint was chosen to be created first instead of a Peg Zone to the Ethereum Mainnet because it is technically simpler to build. However it is essential for a network of blockchains to have Peg Zones. Bitcoin and Ethereum have so much momentum behind them that ignoring them would be a very risky move for Cosmos or Polkadot.
The Cosmos Hub
The Cosmos Hub is the main blockchain that acts as a central connector for all of the blockchains in The Cosmos Network. It is a multi asset proof-of-stake blockchain powered by Tendermint. The main token of the Cosmos Hub is the Atom, and the Atom will be used for staking and governance of the blockchain. The hub will launch with 100 Validators to start, and it will increase every year. 
Atom holders can either be a Validator or a Delegator. A Validator sets up a full node that secures the network and processes transactions. A Delegator delegates their Atoms to a Validator, based on their personal review of which Validators are trustworthy and capable of running a node.
Validators stake the Atoms, and receive Atom as rewards every block. These rewards get passed down to the Delegators with a small fee withheld for operating the Validator node. 
In order to keep Validators honest, a Validator who acts maliciously, and publishes incorrect data to the blockchain, is penalized financially by losing some of their Atoms. This is commonly called “slashing.” These game theoretical requirements are used to incentivize good behaviour in a proof-of-stake blockchain. 
The tokens also represent governance. One Atom is one vote for any proposal on the network, such as software upgrades. Cosmos’ governance protocols are fairly simple. Delegators can choose to vote themselves, or they can pass on their voting power to the Validator they delegate to. Validators must vote on every proposal, otherwise they will be slashed.
Current Status on the Mainnet Launch
They are currently testing the testnet with partial functionality, but they are very close to having a fully implemented version of the Software ready for testing. They will release the live Mainnet sometime in Q3 2018. However, they will freeze transactions until they are satisfied the network is stable. 
Once that is done, they will implement IBC, and then do a “hard spoon” of Ethereum for Ethermint.  A more in depth explanation on their roadmap can be found here.
Developers Building on Cosmos
There are two ways developers can build on top of the Cosmos Network. Building new blockchains that use IBC to interact with each other, and building smart contracts in Cosmos Zones. To build Blockchains, they have created The Cosmos SDK to allow developers to easily spin up new blockchains on the Cosmos Network.
The Cosmos team is releasing the “Cosmos SDK”, which allows developers to design their own blockchains on the network with a simple modular approach. The SDK is being used to build the Cosmos Hub, so when the Mainnet launches, the SDK will also be ready for developers to build their own blockchains. The Cosmos Hub builds off of the base application that runs on the Cosmos Network with Tendermint, and then has modules added for staking, governance, and IBC. 
This will allow developers to use the SDK, choose the base blockchain application, add modules such as governance or staking, build their own modules, and easily launch their own blockchain that can interoperate. This is an exciting opportunity, as it will create a new decentralized platform for developers to build on, instead of only having the token model Ethereum popularized.
The SDK is written in Golang, with plans for future languages being supported. But for the first year or so a blockchain on the network will have to be written in Go.
Building dApps on Cosmos
Ethermint will be the first implementation where you can build dApps on the Cosmos Network. Since it is an EVM based blockchain, the contracts can be written in Solidity. The transaction speeds of this network will also increase, because Tendermint consensus can handle many more transactions per second than Ethereum Mainnets proof-of-work consensus.
The Polkadot Network is another project that is tackling blockchain interoperability with a strong technical team. Polkadot is being developed by Parity, the same team behind the Ethereum client of the same name, which is written in the language Rust.
Technical Design and Protocols
They have also decoupled the consensus architecture from the state application, as Cosmos has. Their consensus engine is actually inspired by Tendermint and HoneyBadgerBFT according to their whitepaper. 
However, recently in a Youtube video they have mentioned that they plan on using a hybrid consensus mechanism with Aurand and Tendermint for PBFT. Aurand allows a randomly chosen Validator to propose a block without needed 2/3’s consensus. The hybrid design allows for much faster consensus, but it also brings in the possibility that some blocks would have to be reverted if a Validator acts maliciously. 
The interoperability strategies of Cosmos and Polkadot are also similar. The Polkadot Network has the Relay Chain, which is the central connector, functioning like the Cosmos Hub. It has blockchains connecting to the Relay Chain, which they have named Parachains. Cosmos Zones and Parachains serve the same purpose. Polkadot will also have bridges to connect to live blockchains, which are similar to Cosmos’ Peg Zones.
Parachains and Cosmos Zones are both using chain-relays to have blockchain interoperability. But they do differ in their implementation. The biggest difference is on how they plan to connect the chains and share security. With Polkadot the network security is pooled and shared. This means that individual chains can leverage collective security without having to start from scratch to gain traction and trust. 
This is done through bonding Dots to create new Parachains, as well as removing Parachains that become non-useful by unbonding Dots. Cosmos does not require Atoms to be bonded to create another chain, they use governance to decide whether or not the main Cosmos Hub should connect to a Cosmos Zone. 
Bridges and Peg Zones are two names for the same thing. They both allow for a connection to a live blockchain network such as the Ethereum Mainnet. It is expected that both Cosmos and Polkadot will want to quickly Bridge to the Ethereum Mainnet at the start.
Reaching Interoperability Between Two Chains
As stated before, the first chain to interoperate with the Cosmos Hub will be Ethermint. It is likely that Polkadot will create one as well. They shouldn’t have much trouble making one since they already have so much experience with the Ethereum Parity client.
The Polkadot Network is a proof-of-stake blockchain, and its native tokens are “Dots”. The Dots provide governance, as well as game theoretical incentives for token holders to behave in honest ways. The networks central hub is the Relay Chain, which functions similar to how the Cosmos Hub does in the Cosmos Network.The network has Validators, Nominators, Collators, and Fishermen as the four major stakeholders.  Polkadot also has slashing to penalize bad behaviour.
Validators on Polkadot serve the same purpose as Validators in Cosmos, and Nominators in Polkadot are like the Delegators in Cosmos.  A diagram below from the Polkadot whitepaper shows how each shareholder interacts with one another.
Validators will not be expected to maintain a fully synchronized database of all Parachains, as it would be too much data to store. Therefore Validators will hand off the task of storing and Validating new Parachain blocks to a third party, known as a Collator. A Collators main function is to produce valid Parachain blocks. They must maintain a full node. They will execute an unsealed block with a zero knowledge proof and provide it to one or more Validators who are responsible for proposing a Parachain block to the Relay Chain. Collators and Validators will receive transaction fees for these tasks. 
Fishermen are like independent bounty hunters seeking large one off rewards. It is expected the mere existence of them will result in misbehaviour seldom occurring, because Validators and Collators know they will be caught and slashed. Fishermen will send proofs of any illegal activity created by Validators or Collators. 
Governance has a few layers, the main one being voting through the network with Dots. They also plan to have a council of 12–24 accounts who vote on proposals that did not receive attention from stakeholders.  This is a backup solution to low voter turnout. They have promised to add in Adaptive Quorum Biasing. They have opened the door to adding in different voting metrics, such as giving more weight to long terms holders or Validators, or even dApp teams that have a long history of contributing to the network.  But these are just ideas at the moment.
Current Status on the Mainnet Launch
Their first proof of concept has been able to validate blocks and agree upon state transitions. They have been able to send a few Dots across a testnet. The proof of concept is written in Rust, and the runtime is architected on WebAssembly. 
They have announced a target launch date of Q3 2019, and have continually stated they are on pace to meet this. 
Developers Building on Polkadot
Substrate is a tech stack to build blockchains on. It is a very similar idea to what Cosmos has done with The Cosmos SDK. The Polkadot Network is built on top of Substrate, just like The Cosmos Hub is built on top of the Cosmos SDK. You don’t have to worry about consensus or networking, you can just focus on the blockchain application.
Substrate is written in Rust, however the core functionality of the state machine compiles into WebAssembly. It can run natively using the complied Rust code, or through the WebAssembly interpreter.  This can be seen in the diagram below.
Building dApps on Polkadot
You can built dApps on top of the Parachains that support smart contracts. This is similar to Cosmos, wherein both the Polkadot Relay Chain and the Cosmos Hub do not have smart contract support, but their connecting chains can.
Comparing Cosmos and Polkadot
Let’s take a look at the main components of each network, and how they stack up against each other. This is the juicy part of the article where you can compare the differences and decide for yourself which network is likely to be more successful!
They both use Tendermint for PBFT consensus, although Polkadot is promising to use hybrid consensus with Aurand. The hybrid approach will speed up consensus, but it may result in the reverting of blocks. Both approaches still need to be battle tested on a live blockchain network. Both protocols are much faster than Ethereum or Bitcoins proof-of-work protocols.
Polkadot also mentions on their website that they plan to use “Optimistic BFT Proof of Authority”, however it isn’t clear what they mean by this. The Web3 foundation stated more recently that “Polkadot is Envisaged to be fully open and public without any particular organization or trusted authority required to maintain it.” Judging from the overall design Polkadot laid out in the whitepaper, it is clear that proof-of-stake with Dots will be the dominating factors for consensus. If proof-of-authority is used, it will probably be in a minor role.
Token and Proof-of-Stake Design
They both have a token used for governance and staking. Each has Validators securing the network, and then Delegators/Nominators that bond tokens to a Validator. Polkadot has added in Collators to help with the Parachains, and Fisherman to keep a watchful eye on any bad actors.Both of them have slashing for bad actors, and the slashing parameters are likely to be tweaked and tested upon network launch. Polkadots proof-of-stake design is more advanced, but this also makes it more complicated.
Cosmos’ advantage is they will be first out of the gate with the Mainnet, and their simple design will make it easier for stakeholders to organize and create a stable decentralized network. Polkadots advantage is that the four stakeholders allow for the network to be even more decentralized. It is hard to pick out which strategy will work better, but time will tell.
Cosmos has a less complex protocol in governance, as it is only based on Validators, Delegators, and a written constitution.
Polkadot is promising more in governance, by adding adaptive quorum biasing, and a council of Validators who vote on proposals that have low stakeholder turn out.
Proof-of-stake governance is largely untested in live blockchains, and both teams can be expected to put forward proposals that tweak the governance protocols at the start. Both designs are simple enough to allow for a natural progression towards a stronger decentralized governance system through small iterations and improvements. It is better to start simple and add complexity, rather than impose a bunch of rules and regulations at the start.
The networks also appear to be decentralized enough to prevent a few Validators from controlling the network. Hopefully this will allow them to avoid some of the issues the EOS Mainnet launch has encountered with their low threshold of 21 block producers who have been accused of being too centralized.
Polkadot allows for shared pool security between Parachains and the Relay Chain, and Cosmos has left it up to the Zones to secure their own networks. What these means is in order to start a new Parachain, you need to accumulate a large amount of Dots, and stake them in order to attach your Parachain to the Polkadot Network. Therefore the security of every Parachain is rooted in the Dots themselves, which creates a shared security model for the whole network.
Cosmos plans to allow for Zones to govern their own security model, which is known as a Sovereign Zone. The Cosmos Hub will use governance to decide what Zones are allowed to connect to it. Other Hub’s and Zone’s are allowed to choose their own security method, which offers a lot of flexibility for the network.
In any case, only do an IBC token transfer with another Zone or Hub that you trust. A Zone could be secretly planning to censor transactions in the future, so you would want to review the Zone’s history and determine if they are truly decentralized and trustworthy. However, this is true of any blockchain, as you wouldn’t want to trade away your Bitcoin for another blockchain token you’ve never heard of.
It is important to note when doing an IBC transfer, you must trust the Zone you are exchanging tokens with, and any relayers. If you receive a token on Zone B that originated from Zone A but went through the Hub (Zone A -> Cosmos HUB -> Zone B), then you need to trust all three blockchains (not only Zone A).
What is typically done today when trading tokens between blockchains is similar, in that you need to trust the centralized exchange you use to trade cryptocurrencies. You must trust both Blockchain A and B, as well as the centralized exchange as a trusted third party.
With Cosmos’ Sovereign Zones, every Zone that connects has to create a secure decentralized network on their own. So if the Cosmos Hub had 5 fully working Zones, there might be 100 Cosmos Validators, And 5 x 100 Zone Validators. This is a much more decentralized model than Polkadot, and if it works it should work well.
It is conceivable that 100 Polkadot validators could secure the Relay-Chain and 5 Parachains, while the Cosmos Network would need 100 Hub Validators and 500 Zone Validators. This shows that Polkadots model makes it easier to create new Parachains, but it also means there is power concentrated in Dot ownership. Cosmos is allowing for a more decentralized security model, but it will be harder to implement.
However, Cosmos has stated that they also plan to support a shared security model shortly after launch. Once they have this, it gives developers more flexibility, since on Cosmos they could share the security rooted in Atoms, or create their own token and security. The trade off they are making to have both models is that Sovereign Zones get added to the network through governance, which opens up the possibility for a malicious zone to connect, although it should be unlikely that this would happen.
A unique feature that Polkadot has is the ability to upgrade the runtime without the need for a fork. They do this by actually storing WebAssembly runtimes on the chain. Nodes that have not updated their local versions of the client will be forced to use this runtime. This eliminates the need to do off chain coordination for the Validators to update their software, which increases the security by eliminating a potential for chain splits.
Speed and Scalability
Both of the consensus protocols allow for 1000’s of transactions per second. This depends on how many nodes there are and what the parameters are. For each Parachain or Zone added, it will increase the amount of transactions that can be done, easily reaching 1000’s of transactions per second for both networks. The actual bottleneck will be in the state machine applications running in each Zone or Parachain.
Each network is using chain-relays to connect to a central hub. They both are using Peg Zones/Bridges to connect to the Ethereum Mainnet, and they are both aiming to make this connection very quickly. They will both make it easy to run EVM Zones/EVM Parachains on their respective networks. Cosmos will launch Ethermint after the Mainnet launch is stable, and Polkadot is likely to do something similar.
The Cosmos-SDK and Polkadots Substrate are the same idea for a development platform. They make it simple for developers to create their own blockchains on the network. Both teams are focusing on being developer friendly, and trying to open a new platform for development. Just like Ethereum did with smart contracts and tokens.
Where development on each platform differs is in Polkadots commitment to WebAssembly and Rust, and Cosmos’ commitment to Golang.
Polkadot is looking to the future by supporting WebAssembly. WebAssembly is supported by Google, Apple, Microsoft, and Mozilla, and the chances are high that it becomes very widely used in the next decade.  Rust has also been pushing to be one of the leading languages that compiles into WebAssembly. On a 5 year outlook, it appears that Polkadot is making the right moves to attract developers long term.
However as we have seen with Ethereum, sometimes being first to market is more important. There are other smart contract blockchains that allow writing of smart contracts in other languages, but Ethereum accounts for almost all the smart contract activity because they built an ecosystem around Solidity and the EVM that caught on early with developers.
Right now there is no work by Cosmos to support WebAssembly. However you can bet at some point soon Golang will add support to compile into WebAssembly. They are already making good progress. Lastly, Golang is also a simpler language to learn when compared to Rust, and there are more Golang developers worldwide.
Cosmos is launching in Q3 2018. However they have stated they will lock transactions down until the network is stable, and are open to rollbacks until everyone is convinced the network is safe to run live.
Polkadot is launching in Q3 2019, so they are giving a year head start to Cosmos.
Cosmos appears to have the advantage here, but Polkadot also has the opportunity to learn for Cosmos’s mistakes.
It is too hard to tell now which network will be more successful. But it is safe to say whichever one attracts more developers will be the one that grows the fastest and takes the biggest share of the market.
As a developer, you would want to start learning Golang if you think Cosmos is going to be more successful, or Rust and WebAssembly if you believe in Polkadot. You can also write a parachain in any other language that compiles down to WebAssembly, such as C or C++.
While one will end up being bigger than the other, it is interesting to note that it is possible to have a world where they both exist, and are connected with each other. For example, if both networks create Peg Zones/Bridges on the Ethereum Mainnet, you could be trading an ERC20 replica of Dots for an ERC20 replica of Atoms. This would allow the two networks to be fully interoperable. This could create a massive intertwined blockchain network where all the tokens on Ethereum, all the Parachains, and all the Zones are interoperable. This would allow the Ethereum Plasma chains to be connected as well.
As you can see the network effects for Polkadot and Cosmos creating a blockchain interoperable network are astronomical. It is well worth the time to follow each networks progression, and root for both of them to succeed.
 Polkadot Whitepaper
 Polkadot Lightpaper