Decentralization, scalability, and security have ever since challenged the idea of an open, decentralized network due to the problems of the first-generation blockchain Layer 1 Bitcoin, Ethereum, and their variants. While we’ve yet to see the upgrade of Ethereum 2.0, a new-gen Smart Contract Platform like Cosmos, Polkadot, Avalanche and LayerZero with promising proposes for the Internet of Blockchain. The term Internet of Blockchain refers to application-specific blockchains that co-exist and interoperate with one another. With several multiple-chain networks under development, it’s no certainty to forecast the winner of the scalability race between Smart Contract Platform. However, it is possible to dig deeper and explore the fundamental ideas underlying each one.
Cosmos, Polkadot, Avalanche and LayerZero have critical distinctions at the protocol level (e.g., consensus method, economic security topology) that affect platform capabilities (e.g., inter-chain communications, token economics, types of viable applications) and how they grow their networks (e.g., validator participation, staking attributions). This article aims to differences between these architectures and their trade-offs.
To help our readers understand this topic of The Internet of Blockchain comprehensively, before diving into this topic of The Internet of Blockchain, we will walk you through a few jargons which will be used frequently in this article.
Trilemma of blockchain
A blockchain cannot possess all three attributes of scalability, decentralisation, and security.
- Scalability refers to the ability of a blockchain to expand in the increased number of transactions and nodes
- Decentralisation ensures that the decisions made in the network are not concentrated on one central entity
- Security in blockchain involves two dimensions: liveness and safety. While liveness indicates that consensus among validators in a blockchain must finally be reached, safety guarantees that validators do not misbehave. In light of safety, there is accountable safety: when more than ⅔ of the network behaves honestly, the chain cannot be forked but if it does (and ⅓ of stake is burnt for such misbehaviours), the network can point out the identities of those ill-behaved entities
Consensus is the agreement of the network on the validity of a transaction before adding it to the block.
- Deterministic consensus is applied when there are voluminous flows of messages between validators to finalise the transactions. Once transactions are added, they cannot be reverted but forking the chain, thereby improving the network security. Also, since there is no waiting time for nodes to confirm that a transaction is valid, deterministic consensus helps lower the latency in transaction processing
- Probabilistic consensus indicates that the probability that a transaction added to the chain will not be reverted increases when the chain gets longer. Thus, transactions are not really “finalised” but are becoming more valid when more blocks are added to the chain. Moreover, probabilistic consensus does not require complex flows of messages between network entities, thereby enhancing the scalability of a blockchain
First mentioned by Ryan Zarick, co-founder and CTO of LayerZero Labs, in order to build a blockchain bridge, a developer will face the trade-offs between these three properties:
- Instant Guaranteed Finality, meaning that funds must be successfully transferred from the source chain to the destination chain
- Unified Liquidity, indicating that multiple chains must be able to get access to a single liquidity pool for the sake of higher capital efficiency
- Originality of Assets, specifying that the funds being moved to the destination chain must be the native (or the most liquid synthetic) ones being sent from the source chain, otherwise, users will receive synthetic assets that do not have much liquidity which then signifies the risk they have to incur
A light client is a software or application that helps users interact with the blockchain without storing the entire data on it.
Unlike other blockchains, Avalanche has 3 separate networks to handle different tasks on the network: X-Chain for asset trading, C-Chain for smart contract creation, and P-Chain for overview platform coordination.
What problems does Avalanche solve?
Its consensus mechanism is leaderless directed acyclic graph where a node keeps querying other nodes for the validity of a transaction for a randomly determined number of rounds. There will also be a confidence counter that represents the number of times that a majority of the network accepts the validity of a transaction.
For example, the network must together agree on one of the two colours, gray and yellow. One node (denoted as node A) currently has gray as its choice. In the next round, if a majority of nodes being asked vote for yellow, and the confidence of A in yellow exceeds the confidence of A in gray, A will switch to choose gray. This process is repeated among all nodes until consensus is reached.
Because this mechanism is leaderless and the number of validators being able to join the network is boundless, it satisfies the need of decentralisation for a blockchain.
With the help of EVM subnets, it ensures the scalability of the network and allows customization on blockchain in an effortless manner which is suitable for enterprise adoption or instantiation of a new project but with different jurisdictions.
Since a node can always change its decision based on the accrued confidence level after each round, the equilibrium of the network remains unstable, thereby discouraging ill-behaved nodes from attacking the entire network.
A problem of Avalanche is that it does not have slashing. This may reduce the barrier of entry to become a validator, but also put the safety of its system at risk. Because decisions of a validator for a transaction on Avalanche can always be changed given enough confidence, it is hard to detect malicious actors in the network. In short, accountable safety is not satisfied.
At the time of writing, Avalanche has 19 subnets with 1,609 validators and more than 520,000 active addresses on all chains.
The first subnet deployed on Avalanche is of DeFi Kingdoms, the famous game title that originated from Harmony. The number of unique contracts deployed on DeFi Kingdoms mainnet has reached 218, up by roughly 8 times since launch in March 2022.
Apricot, the upgrade of Avalanche blockchain, has released Phase 5 in November 2021 with including major improvements especially for gas fees reduction. Most recently, transaction allowlist precompile was introduced on Avalanche, assisting in building a KYC/private subnet for enterprise or government adoption.
Officially launched in 2020, Polkadot aims to solve the interoperability issue of blockchain. It achieves this by (i) relay-chain, where Polkadot’s consensus, communication & information are coordinated, (ii) a network of para-chains, including blockchains to process transactions parallelly, and (iii) para-threads, functioning the same as para-chain but only used temporarily.
What problems does Polkadot solve?
Security & Scalability
Para-chains on Polkadot inherit shared security of the relay-chain. Furthermore, the consensus of Polkadot has two separate mechanisms for block production and transaction finalisation. When producing blocks, there will be slots (to product blocks) that are assigned randomly to validators. On the other hand, validators will vote on the chain that they deem to be the most valid, and a chain that has more than ⅔ of validators voting for will have its latest block being finalised. This will help enable the scalability of the chain in a probabilistic manner but also ensure the security and the speed when processing transactions as of deterministic consensus.
Currently, to be in the active set of validators of Polkadot, a newcomer must hold at least 1.75 million DOT, which is equivalent to $30M. Additionally, each chain only requires 5 validators, a tradeoff between scalability and security (as well as decentralisation). Polkadot also has a higher finality time (12-60 seconds), much longer than the speed of a few seconds compared to Avalanche or Cosmos. Also, parachain slots are limited, therefore also preventing other projects from building on Polkadot’s chains.
At the time of writing, Polkadot has 14 para-chains, 15 para-threads with 297 validators, and more than 520,000 active addresses on all chains.
Each para-chain can be classified into 3 categories: DeFi, Smart contract platform, and Infrastructure. All of them exist to deliver a variety of products and enrich the diversity of the Polkadot’s ecosystem.
XCMv2 (the core messaging format between para-chains of Polkadot) Second Audit has been finished and XCMv3 is in the final stage of development.
Cosmos is a network consisting of multiple independent parallel blockchains, called Zones, powered by the Tendermint Core consensus algorithms. These Zones link to Hubs – which function as the interoperation bridge between Zones. Hubs and Zones communicate with others through an inter-blockchain communication (IBC) protocol, similar to a virtual UDP (User Datagram Protocol) or TCP (Transmission Control Protocol) for blockchain. The vision behind Cosmos is to be the Internet of Blockchains, a network of blockchains able to interoperate with one another in a decentralised way while retaining its sovereignty.
What problems does Cosmos solve?
A set of open-source tools such as Tendermint, the Cosmos SDK, and IBC allow developers to build custom, secure, scalable, and interoperable blockchain applications quickly. These tools have highlighted their ability to solve the obstacles of Scalability, Usability, and Sovereignty.
Tendermint BFT manages the blockchain’s networking and consensus layers, giving the application layer to developers. The Tendermint BFT engine is connected to the application by a socket protocol (i.e., a data transporter) called the Application Blockchain Interface (ABCI). ABCI enables blockchain applications to be written in any language, thus making it easier to onboard potential developers to build on top of the Tendermint BFT engine while also freely adjusting their blockchains.
The three benefits of Tendermint for developers include simplicity, great performance, and fork-accountability.
Tendermint consensus allows the hub/zone to process thousands of transactions per second, with commit latencies of 6 to 7 seconds. Notably, there is no limit to the number of Zones and Hubs that can be created on Cosmos.
Additionally, another benefit of Tendermint’s consensus algorithm is simplified light client security, thus solving the scaling problems for Cosmos.
Cosmos SDK streamlines the progress of blockchain applications. This toolkit contains a series of pre-built modules (building blocks) from which developers can choose as desired for building a new chain.
The Cosmos SDK has already been used to build many application-specific blockchains that are already in production. Among others, we can cite Cosmos Hub, IRIS Hub, Binance Chain, Terra or Kava and many more are building on the Cosmos SDK.
Every Zone and Hub in Cosmos has their own validator set and different trust assumptions, which allows it to inherit the security and interoperability of the public Cosmos network without sacrificing control over its underlying service. The Cosmos architecture achieves this by using a global hub with regional autonomous zones, where voting power for each zone is distributed based on a common geographic region. For instance, a common paradigm may be for individual cities, or regions, to operate their own zones while sharing a common hub (e.g. the Cosmos Hub), enabling municipal activity to persist in the event that the hub halts due to a temporary network partition.
The connection between blockchains is achieved through Inter-Blockchain Communication protocol (IBC). Once integrated, IBC allows zones and hubs to open communication portals between one another, serving as the information rails, meaning that blockchains with different applications and validator sets are interoperable. IBC is the cornerstone of this otherwise sprawling network of sovereign chains.
Cosmos Hub is one of many hubs in the network, and there is no central hub or limit on the number of zones/hubs that can be created. Whilst Tendermint consensus is limited to around 200 validators before the performance starts to degrade, thus, reducing the decentralisation of the network. Limiting validators on the system leads to a high barrier to becoming a validator. Currently, a person needs a minimum of 47,231 $ATOM (~ $1M) to be in the active validator set of the Cosmos Hub
The Cosmos ecosystems have a fragmented network structure in which distinct blockchains with diverse priorities can have their own validator set and connect with one another via bridges when necessary. This topology is criticised for being as secure as the weakest chain (when the most secured chain accepts assets from the least secured chain, it becomes less secure). However, the new IBC versions will use shared security mechanisms (see Billy Rennekamps’ speech).
Cosmos Hub’s utility
While IBC is a significant milestone forward for the utility of the Cosmos Hub, it will not be the only hub competing for the market of cross-chain transfers. Cosmos’ hyper-modular architecture allows other hubs to compete for a share in the market. This hub rivalry may affect (though somewhat) the outlook for the Cosmos Hub and ATOMs.
The idea for Cosmos ecosystem hubs is to become the one with the highest reputation, garnering the most transaction submissions and related fees for network stakers. However, decentralised protocols should strive towards being lean and efficient economic activity routers, which would limit the share of validator revenue earned by fees. Fee revenue might be further eroded by fierce competition among hubs. Despite its essential role in Cosmos’ genesis, the Cosmos Hub and its ATOM tokens are not privileged within the ecosystem.
Allowing other blockchains with Interchain Accounts to create and control accounts on the Cosmos Hub
Allowing the Cosmos Hub to perform transactions natively on other chains
Cosmos development teams plan to add shared security to the Cosmos Hub. This feature will enable Cosmos SDK networks to obtain security from the validator set of the Cosmos Hub. The design for Cosmos’ shared security feature is less-defined relative to Polkadot.
At a high level, Cosmos Hub stakeholders will be able to delegate their ATOMs to secure different zones, earning fees and even incentives (e.g., the zone’s native token inflation) for each chain protected.
LayerZero is an omnichain interoperability protocol, competent for exchanging messages to any contract on any chain. It also permits user applications to have complete control over its architecture and interpretation. LayerZero is a messaging transport layer that allows smart contracts to interact with one another across chains.
LayerZero is a User Application (UA) configurable on-chain endpoint that runs an Ultra Light Node (ULN). To transfer messages between on-chain endpoints, LayerZero relies on two parties: the Oracle and the Relayer, to transmit messages between on-chain endpoints.
Highlight solutions by LayerZero
By providing direct transactions across all chains without having to rely on a trusted custodian or intermediate transactions, LayerZero satisfies the rule of native assets.
Regarding the unified liquidity property, allowing transactions to flow freely between chains provides opportunities for users to consolidate fragmented pockets of liquidity while also making full use of applications on separate chains thanks to the combination of two independent entities: an Oracle and a Relayer,
LayerZero is generalizable enough to run on any chain, across the full spectrum of security and scalability assumptions, thus meeting the need for instant guaranteed finality.
Relayer & Oracle
A cross-chain transaction consists of a transaction tA on A, a communication protocol between A and B, and a message m. As per valid delivery states, m is delivered if and only if tA is committed and valid. The key notion behind LayerZero is that if 2 distinct entities confirm the validity of a transaction (in this case, tA), then chain B may be certain that tA is valid.
LayerZero accomplishes this by integrating two separate entities: an Oracle, which gives the block header, and a Relayer, which offers the proofs associated with the aforementioned transaction.
LayerZero utilises the security attributes of the established oracles (Chainlink and Band) with an extra layer of security via the open relayer system by splitting duties between the Oracle and Relayer. While this may appear to be a minor distinction at first look, its ramifications are far-reaching. For starters, it means that the worst-case security of this new network is still equal to that of the Oracle. If you select Chainlink as your oracle, every malicious action in the system is still reliant on first defeating the Chainlink DON. Even if the Oracle’s consensus is corrupted, it also requires the Relayer’s active collusion.
The implementation of LayerZero Endpoint – the interface to LayerZero is a lightweight on-chain client, on multiple chains allowing cross-chain transactions. A LayerZero Endpoint is currently implemented as a series of smart contracts on each chain included in the LayerZero network. The core functionality of a LayerZero Endpoint is encapsulated in three modules: Communication, Validation, and Network.
One key point of LayerZero Endpoint is that rather than replicating and storing block headers within the client, it delegates the task of fetching the necessary cross-chain headers and transaction proofs to off-chain entities: the Oracle and Relayer. This results in LayerZero Endpoints being incredibly lightweight, making them cost-effective even on expensive chains like Ethereum.
In addition to the core modules, LayerZero Endpoint can be extended via Libraries, which are auxiliary smart contracts that define how communication for a specific chain should be handled. Each chain in the LayerZero network has an associated Library, and each Endpoint includes a copy of every Library.
LayerZero is now in beta and has launched across EVM-compatible networks like Ethereum, Avalanche, Polygon, BNB Chain, Fantom, Arbitrum, and Optimism, with integrations on Solana and Cosmos coming soon.
While the first application to integrate with LayerZero was Stargate – a liquidity transport protocol, it’s worth emphasizing that cross-chain lending, yield aggregation, and trading are only the beginning.
Implementing The Dome, a system that (at the relayer level) deflects all attacks from malicious external contracts rendering them useless..
Blockchain networks that are diverse Cosmos, Polkadot, Avalanche and LayerZero provide remarkable infrastructures to support the internet of blockchains, demonstrating that the asynchronous heterogeneous network paradigm works effectively and is an enhancement over Bitcoin and Ethereum as they now function. They will eventually be able to support millions of daily active users and realize the user-owned and managed Web 3 vision.
Co-existence of these major architectures is healthy for a true decentralized internet, as they have their own design choices and tradeoffs in their own right. Based on the data across development activity and the total active addresses, Avalanche is currently take the lead. It is noteworthy that each platform has different priorities and limitations tailored to the specific circumstances they’ve outlined.
Kyros Research Team