Scaling Solutions of Monolithic and Modular Chains

Authors: Felix Chen, Dinesh Kumar Gnanasekaran, Chase Jeter

Benjamin Chai
Blockchain@USC
8 min readNov 22, 2022

--

Summary: In this paper we go over how monolithic and modular blockchains, namely Ethereum and Cosmos, approach the problem of scaling.

Introduction

Being a distributed, immutable ledger, blockchains often have to sacrifice resources in order to have all the nodes in the network unanimously come to a consensus in a decentralized manner. Out of scalability, security, and decentralization, a blockchain can usually only capture at most 2 of the 3 properties. For example, Bitcoin does a really good job of being decentralized and secure, however, it is incredibly difficult to scale. This phenomenon is referred to as the “blockchain trilemma” by Vitalik Buterin.

With the rise in popularity of modular blockchains, it is interesting to see how modular blockchains approach the problem of scaling while remaining decentralized and secure. Modular blockchains are different from monolithic blockchains in the sense that instead of fulfilling all of the layer 1 demands (consensus, data availability, execution, settlement), it specializes in only a few and outsources the rest. In this article, we will explore the scaling solutions of Ethereum and Cosmos, and see how scaling a modular blockchain(Cosmos) is different from scaling a monolithic one (Ethereum).

Ethereum Scaling

Summary

By market cap, Ethereum is the second most valuable blockchain network and the most valuable smart contract platform. There are a lot of dApps (Decentralization Applications) that run on Ethereum, but there is a huge issue when it comes to processing transactions through Ethereum Mainnet. Ethereum can only process approximately 15 transactions per second, which is incredibly slow when we want to scale these dApps to a larger customer base. In order to combat this issue a lot of scaling solutions are built to suit the needs of the dApps.

Rollups

Rollups perform transactions outside Ethereum Mainnet (off-chain). Rollups bundle multiple off-chain transactions together in a large bundle and then post these transactions to the Ethereum Mainnet after a consensus is achieved. There are two types of rollups with different security models.

  • Optimistic rollups
  • Zero Knowledge(ZK) roll ups

Optimistic Rollups

Optimistic rollups assume that the transactions posted are valid and do not submit the proof of the validity of the transaction on the chain, hence the name. After a batch of transactions is submitted on Ethereum, there is a window where changes can be made based on a consensus mechanism called fraud-proof. If the fraud-proof succeeds, the rollup updates the state of them accordingly. After the rollups are complete, a L2 operator fee is paid to the rollup node for the computation resources used in processing the transaction. The transaction fees of the rollup network are lower than on Ethereum mainnet due to the network’s higher transaction throughput. They also use compression mechanisms to reduce the data to post on Ethereum Mainnet. Optimism and Arbitrum are two of the most popular optimistic rollup projects:

  1. Optimism: Optimism runs on EVM. Optimism uses a single round of fraud proof, that relies on L1 to execute the entire L2 transaction. This causes the gas fee to be higher and transactions to be slower.
  2. Arbitrum: Arbiitrum runs on Arbitrum Virtual Machine(AVM), which does multi-round fraud proof. All the L2 transactions are not done by L1 which decreases gas fees. Also Arbitrum focuses on a single point of transaction, rather than the entire bundle which increases throughput.

ZK Rollups

Unlike optimistic rollups that post all the transaction data on the Mainnet, ZK rollups post only the summary of changes on the Mainnet. This reduces the amount of data we need to post on the Mainnet. A validity proof must be submitted by the ZK nodes for verification. This validity is cryptographic proof of the transactions in the batch. There are no delays when moving funds from ZK rollup to Ethereum, but withdrawing funds may take a while. ZK rollups rely on ZK proofs. A zero-knowledge statement allows you to prove whether a statement is true without the contents of the statement and without the procedure used to validate the statement. A ZK protocol must satisfy three criterias:

  1. Completeness: A zero-knowledge protocol will always return true if the statement is valid. If the statement is true the verifier and prover will act honestly and the proof can be accepted.
  2. Soundness: A lying prover cannot fool an honest verifier (except with a tiny margin of probability). Thus it is theoretically impossible to trick a zero-knowledge.
  3. Zero-knowledge: The verifier knows nothing about the context of the statement except its validity.

There are two forms of ZK proofs

  1. Interactive Zero Knowledge Proofs: made up of three elements (Witness, Challenge, Response)
  • Witness: The hidden information is the witness. The prover wants to prove some knowledge of the hidden information. The prover assuming that it has knowledge of the witness, forms a set of questions that can only be answered with the knowledge of the information. The prover randomly chooses the question and calculates the answer and sends it to the verifier.
  • Challenge: The verifier randomly picks another question from the set and asks the verifier to answer it.
  • Response: The prover receives the questions, calculates the answer and returns the answer. Then the verifier checks the answer. To ensure that the prover did not give a blind guess the verifier asks more questions.

2. Non-Interactive Zero Knowledge Proofs

Unlike Interactive Zero Knowledge Proofs which require two rounds of interaction to prove, Non-Interactive Zero Knowledge Proofs require only one round of interaction. A special algorithm receives the secret information from the prover to compute the zero-knowledge proofs. This is sent to the verifier who checks whether the prover knows the secret information using another algorithm.

Differences Between Optimistic rollups and ZK rollups

Sidechains

Sidechains are a separate entity that are connected to Ethereum mainnet through a two way bridge. Sidechains have their own parameters and consensus algorithm to provide efficient ways to process transactions. Sidechains may compromise on decentralization or security to achieve a higher throughput. Some side chains are compatible with EVM, so they can handle smart contracts written for EVM. One of the most popular Ethereum sidechains is the Polygon PoS chain.

Polygon:

Polygon offers a wide range of scaling solutions, some of them are in development and some of them are in public beta as of now. A number of these solutions implement different rollups and other techniques to scale according to the needs of the user. The popular solution is Polygon Proof-of-Stake (PoS), which uses sidechains and PoS validators to increase the transaction throughput tremendously and ensures asset security.

Avalanche (AVAX):

Avalanche is another popular blockchain platform. Avalanche uses subnets to scale. Subnets are individual blockchain with their own rules and parameters, while being a part of a primary network. It comprises three built-in blockchain.

  1. Exchange Chain (X-Chain)
  • X-Chain deals with transactions of digital assets.
  1. Platform Chain (P-Chain)
  • P-Chain keeps track of validators and subnets.
  1. Contract Chain (C-Chain)
  • C-Chain handles the smart contract, which is EVM compatible.

Cosmos

Summary

Cosmos is a web3 project that aims to be the “internet of blockchains.” With more than 40 chains based on Cosmos, it is one of the most horizontally scalable web3 ecosystems. Cosmos provides tools for developers to develop application specific blockchains easily and have those blockchains communicate with each other. Each blockchain created with Cosmos’ toolkit (referred to as “zones”) can have its own consensus protocols and governance. All zones are connected to Cosmos’s main blockchain — Cosmos Hub.

Cosmos’ toolkit consists of Cosmos SDK, which developers can use to easily develop application specific blockchains without worrying about underlying consensus mechanisms; and IBC, a protocol that allows blockchains to communicate with each other through Cosmos Hub. The ease of developing on Cosmos lowers the barrier to developing a secure, decentralized, and independent blockchain, and creates tremendous horizontal scalability for the Cosmos ecosystem. Interchain security, a feature that allows Cosmos Hub to share security with chains based off of Cosmos, is coming soon and will lower the barrier even more and further increase Cosmos’ scalability.

Cosmos SDK

Cosmos SDK is a tool that developers can use to develop application specific blockchains on top of Cosmos. Because Cosmos SDK utilizes Tendermint Core — a PoS consensus protocol engine able to handle 10,000 transactions per second, developers can focus on developing just the application layer of the blockchain without needing to think about the consensus and networking layers. It should be noted that developers can also choose to opt out on Tendermint and develop their own consensus protocol. Cosmos SDK also has tons of modules that developers can use by simply importing them. The usability of this SDK is one of the key factors in the horizontal scalability of Cosmos.

Cosmos Hub and Interchain Security

Cosmos Hub is the main and biggest blockchain on Cosmos. It uses the Tendermint consensus engine, which is a Byzantine Fault Tolerant and Proof of Stake consensus mechanism developed by Cosmos. Its native currency is ATOM, with a market cap of $4.2 billion. Because of Cosmos Hub’s scale and consensus protocol, it is more secure than most blockchains. Cosmos Hub contributes to the overall scalability of Cosmos by lending its security to its consumer chains.

A blockchain’s security lies in the difference between the cost to attack the chain, and the total value locked by the chain. Whenever the total value locked by the chain becomes greater than the cost to attack the chain, the blockchain becomes insecure. Small chains are especially prone to attacks since the cost of corrupting ⅔ of their nodes is small. However, Cosmos’ new feature — Interchain Security will overcome this by sharing Cosmos Hub’s security with chains developed on Cosmos, making the cost to attack even a small chain on Cosmos to be equal to the cost to attack Cosmos Hub itself.

Interchain security essentially works by having Cosmos Hub share validators with its consumer chains. In order to produce blocks on the consumer chain, the validator would need to stake ATOM on Cosmos Hub, and risk having it destroyed if the blocks are malicious.

Conclusion

Because of its modular nature, Cosmos is able to scale horizontally much better than Ethereum, whereas Ethereum has to rely on vertical scaling via layer 2 scaling solutions. With many exciting scaling solutions still being in development on both ends, there is still a lot of room for improvement for both Ethereum and Cosmos. All in all, modular blockchains approach scaling differently than monolithic blockchain in the sense that it scales horizontally instead of vertically. It has the potential to become a great alternative to many monolithic blockchains that are difficult to scale.

Sources

  1. https://ethereum.org/en/developers/docs/scaling/
  2. https://ethereum.org/en/layer-2/
  3. https://ethereum.org/en/developers/docs/scaling/optimistic-rollups/
  4. https://ethereum.org/en/developers/docs/scaling/zk-rollups/
  5. https://ethereum.org/en/developers/docs/scaling/sidechains/
  6. https://101blockchains.com/optimistic-rollups-vs-zk-rollups/
  7. https://ethereum.org/en/zero-knowledge-proofs/
  8. https://www.makeuseof.com/arbitrum-vs-optimism-whats-the-difference/
  9. https://blog.cosmos.network/interchain-security-is-coming-to-the-cosmos-hub-f144c45fb035

Twitters:

--

--