Modularity and App-Specific Chains

Blockchain@NUS
12 min readMar 25, 2023

--

Written by Keith Lim @dududumeister
Ping Yun (Twitter: @EatWhatVege, Medium: https://medium.com/@YoungestPing)
Joshua Chua @cylJosh
Torben Leowald

Introduction

In the quest to achieve true decentralisation in blockchains, there have been many products that offer different solutions and technologies to best solve the blockchain trilemma. In this research article, we will be diving specifically into the aspect of modularity and specification.

We will explore the concept of modular blockchains, as well as the case for app-specific chains.

Modular vs Monolithic Blockchains

In general, there are 2 types of blockchains — modular and monolithic. A modular blockchain is one where the network is made up of many replaceable modules that can be tailored and built to suit particular requirements. A monolithic blockchain, on the other hand, is created as a single, integrated system that is difficult to change or modify.

The concept behind modular blockchains is that individual parts of the blockchain can be changed or replaced without having an impact on the rest of the network. This enables more adaptability and flexibility since developers can construct new modules that carry out particular tasks or alter current ones to accomplish those tasks more efficiently. A modular blockchain, for instance, might contain distinct modules for consensus methods, transaction validation, and smart contract execution, all of which can be altered and changed as necessary.

On the other hand, monolithic blockchains are created as a single, integrated system, with all parts being closely integrated and interdependent. As there are no external components that can be hacked or compromised, this method offers higher stability and security. It can, however, also make adding new features and enhancing performance more challenging because any modifications made to one area of the system could have an impact on other areas.

Application-specific Blockchains

Building on the concept of modular blockchains, there has been one emerging design pattern named the application-specific blockchains, or “AppChains”. Simply put, an AppChain is a blockchain that dedicates its blockspace to a specific application. Applications that build AppChains can customize multiple layers of their stack, such as their security model, fee token, and write permissions, among others.

There are three main reasons why developers have increasingly turned to building AppChains instead of launching smart contracts on shared blockspace, namely performance, customisability, and value capture.

Firstly, popular dApps frequently consume an excessive amount of on-chain resources. Since dApps compete with one another for blockspace on the same network, this raises transaction prices and causes delays for users of other dApps on the same chain (e.g. Polygon and Arbitrum). Thus, AppChains gives projects the chance to maintain predictable, low transaction costs and latency, which improves end users’ experience.

Secondly, developers must keep improving their applications for users as their dApp gains in popularity. dApps will need to trade off key design factors, like ecosystem alignment, throughput, finality, security level, permissioning, and composability, among others. This extent of customisability is only possible with Appchains.

Lastly, there are many opportunities for dApps to capture value by launching their own Appchain. One example could be how a dApp can be able to capture MEV by running its own sequencers or validators, which can create opportunities for new crypto-native business models.

Cosmos, Celestia, Canto

We will now be deep-diving into blockchain technology that makes modular blockchains and app-specific chains a possibility. While there are various Decentralised Finance (DeFi) protocols and products in the market, we have pinpointed Cosmos, Celestia and Canto as the focus of this article to help us form an argument for the utility of Appchains.

Cosmos

What is Cosmos?

The Cosmos Network comprises 3 main core components:

  1. Tendermint Core → Byzantine Fault Tolerance (BFT) Consensus
  2. Cosmos Software Development Kit (SDK) → Framework for applications
  3. Inter-Blockchain Communication (IBC) → for interoperability

The Cosmos SDK is an open-source framework for building multi-asset public Proof-of-Stake (PoS) blockchains, as well as permissioned Proof-of-Authority (PoA) blockchains. Blockchains built with the Cosmos SDK are generally referred to as application-specific blockchains.

Utilising the Cosmos SDK, developers can create their custom application-specific blockchains. There are currently over 200 projects built using the Cosmos SDK.

Revisiting application-specific blockchains

Essentially, application-specific blockchains are as their name suggests, customised to run an application. Currently, applications (or more precisely, side chains) on the largest blockchain ecosystem, Ethereum, are built on top of its underlying blockchain. This means that developers build around the main blockchain, and their applications utilise smart contracts to make changes to the Ethereum blockchain. However, this comes at the cost of increased gas prices, slower transaction speeds, and reliance on Ethereum’s governance.

Application-specific blockchains do not have the same reliance on the main blockchain (such as Ethereum) and can be considered their own blockchains with the additional benefit of being connected to all the other blockchains that build on the same ecosystem.

How does it work with the Cosmos SDK?

As a developer, you might have an application or service you want to build. But you don’t want to build your own consensus mechanism because it’s way too complex and risky. I mean, what if your blockchain breaks? The Cosmos SDK utilises the default consensus engine which is the Tendermint Core to secure your application.

What about interoperability? How can you enable your application or service to be able to talk and interact with other applications seamlessly? Applications built using the Cosmos SDK are all able to interact with each other through IBC.

What about the process of building the application itself? Do you need to learn to code the logic of every part of your desired application? Nope. The Cosmos SDK enables developers to utilise existing, production-grade, modules to implement the business logic of your application.

Why build with the Cosmos SDK?

The first cryptocurrencies were monolithic blockchains. But over the years, we’ve seen how they perform poorly when they try to accomplish all aspects of the blockchain trilemma: decentralisation, security, and scalability.

Recently, discussions about Modular Blockchains have been picking up. Just like how the current infrastructure of the internet is modular, perhaps blockchains should follow the same design principles. By allowing applications to specialise in specific functionalities, work can be done on different layers which leads to greater efficiency.

If we believe the future of blockchain to be multi-chain, multi-purpose, and cross-industry, then the principles of modularity that enabled the internet to do so must apply. Therefore, applications should be built and designed with modularity in mind. Right now, the Cosmos SDK is at the forefront of application-specific blockchains.

Celestia

The current landscape of monolithic vs modular blockchains

Due to the high cost and scalability issue of monolithic blockchains, modular blockchains are created to alleviate this problem.

To discuss the topic, we need to understand the basic components (layers) of a blockchain:

1) Execution (where transactions are done)

2) Consensus (nodes verify and come to an agreement)

3) Data Availability (availability of data upon request)

4) Settlement (immutable data added to chain’s history).

On a monolithic blockchain, all of these layers are adopted on a single plane in the blockchain.

In contrast, modular blockchain focuses on specific layers — in the case of Celestia: Consensus and Data Availability layers. In short, monolithic blockchains have been adopting initiatives such as ZK- and Optimistic rollups (Execution layer) and sharding in the case of Ethereum. One potential (very likely) problem for these L2s, after scaling/solving for transaction throughput of the network, is the bottleneck of capacity for data availability in their L1s.

The key benefit to utilising Celestia is the separation of the consensus and execution layers and their technique of reduction in complexity to verify blocks, which will be further discussed in the benefits section.

How Celestia Works

Overview of Celestia Block validity rules

Celestia acts as a data centre making ‘data available’. In general, Celestia’s long-term vision is to be the data availability layer in the blockchain ecosystem that can be integrated with other layers such as the execution layer. Celestia’s purpose is just to a) order transactions and b) guarantee data availability.

Celestia’s proposed solution utilises erasure code (error-correcting codes) and random sampling.

Erasure code, in simple terms, enables the original message to be derived from a portion of the original code. Hence, less capacity is needed for the light node to process that smaller portion of data to understand the entire block.

In Celestia, a valid block needs to have the data behind it available. The validity check (proof/consensus) can be done by non-consensus nodes (non-block-producing nodes). Hence, as the number of consumers in the network increases, the more secure the network becomes. Additionally, the process of validating is simplified by using data availability sampling where each consumer sample a small random portion of the data. Collectively, consumers will validate and have proof with statistical certainty that the entire blockchain is secure. In theory, this will proliferate the flywheel of demand and security and bring scaling to a greater extent.

Refer to the coinflip example to understand how random sampling enables statistical certainty of validation at a portion of verifying the entirety of data available (the IMPROVEMENT is mad!!!).

With this solution, Celestia allows consumers to be computationally easier to validate with minimal hardware, and hence increase capacity in the blockchain. This, as a result, allows for scalability and lower fees. The fraud-proof size is O(√n).

In conclusion, the limitation of this model is the adoption of the blockchain as the proof is directly tied to the number of consumers.

How do blockchains build on top of Celestia, Validating data availability in Celestia

Refer to this article for a summary of rollups. As mentioned above, the limitation of rollups is the bottleneck at the L1 layer when they have to post the transaction data. As a result, this is where Celestia comes in. Celestia’s main target audience are now rollups.

In this new model, rollups will still have to verify the proofs and post them to Celestia (as Celestia does not have an execution layer).

The ideal situation is that rollups build directly on top of Celestia and be in the Cosmos ecosystem. However, there is a strong demand for data availability in EVM chains. Hence, in the case of Ethereum, Celestia’s Quantum Gravity Bridge facilitate the attestation of data to an EVM-compatible chain from EVM-native rollup.

i.e EVM-native rollup runs the execution and posts proofs to the EVM chain. Celestia provides the consensus layer and ensures the availability of data to the EVM chain. EVM chain then runs as a settlement layer.

In summary, Celestia is part of the Cosmos ecosystem and building on top of this platform allows greater synergy. However, Celestia identified the lack of off-chain data availability that is relatively cheap and has adequate security, therefore venturing into bridging rollups with their base L1 blockchain. Any EVM-compatible L2 will be able to adopt Celestia. However, rollups are the target audience in this case because they have solved the problem of transaction throughput but are limited by the blockchain capacity.

Canto

Canto is a layer-1 blockchain built to deliver on the promise of DeFi in the Cosmos ecosystem. It is a permissionless, general-purpose blockchain running the Ethereum Virtual Machine (EVM). Canto is part of the Cosmos network of blockchains, apps, and services. It enables accessibility, transparency, and trustless transactions for users, and its decentralized exchange, lending market, and overcollateralized currency provide a range of DeFi services. The Canto blockchain is secured by a Proof-of-Stake consensus mechanism and its native token, CANTO, is used to operate the network.

Canto’s Features

Canto does not have any built-in transaction fees. Instead, it relies on a Proof-of-Stake consensus mechanism, where validators stake their CANTO tokens to verify transactions and secure the network. As an incentive for the validators, the network rewards them with newly minted CANTO tokens. By keeping the transaction fees at zero, the Canto network can offer free decentralised infrastructure and make DeFi accessible to everyone.

The Canto Blockchain is EVM compatible, meaning it can run Ethereum Virtual Machine (EVM) code. This allows developers to easily port existing applications from Ethereum to Canto and take advantage of the additional features and functionality of the Canto network. This includes faster transaction times, improved scalability, and lower fees. Additionally, the Canto team has created several tools and services to make development on the platform easier, such as a faucet and an explorer. As a result, the Canto Blockchain provides developers with an accessible and efficient platform to create and deploy decentralized applications.

Development on Canto

Canto DEX is a decentralized exchange protocol that enables trustless and permissionless trading of digital assets on the Canto network. By using the Canto DEX, users can exchange tokens securely and without the need for third-party intermediaries. Canto DEX also features a dynamic liquidity pool, which allows for more efficient and cost-effective trading, and it is integrated with various decentralized protocols, such as Uniswap and Binance DEX, to provide users with access to a wide range of digital assets. Additionally, Canto DEX is designed to provide users with a secure and transparent trading environment, as all transactions are publicly verifiable and the protocol is secured by decentralized validators.

The Canto Lending Market is an adaptation of Compound v2. Its functional design is unchanged in that the primary means of interacting with the lending market is to supply and borrow digital assets, such as USDC and USDT. When users supply assets, they receive liquidity provider (LP) tokens in return, which can be used as collateral when borrowing assets. The Canto Lending Market also features a dynamic liquidity pool, allowing users to access a wide range of digital assets. Additionally, all transactions on the Canto Lending Market are publicly verifiable and are secured by decentralized validators.

To conclude, Canto is a Cosmos-based EVM-compatible Layer-1 Blockchain that specialises in providing free infrastructure for the decentralised finance ecosystem. Canto is important to the future development of the Cosmos ecosystem, as it functions as a bridge between Ethereum-compatible blockchains and the cosmos ecosystems. Thereby creating a link between the two ecosystems which hitherto did not exist. The promise of bridging to the Ethereum ecosystem is the onramp of assets, developers, and the expansion of the services available in the Cosmos ecosystem.

Conclusion

To reiterate, Cosmos is an ecosystem of blockchains that can communicate through standard IBC (inter-blockchain communication). Chains built on the cosmos ecosystem have higher throughput and faster finality time than Eth L1’s. However, most of the chains on Cosmos run on CosmWasm VM instead of EVM. As a result, most Cosmos dApps are built using Rust or Go, which is a significant adoption hurdle for the core smart-contract developers who are only familiar with EVM’s solidity.

Now, with Canto, an EVM chain with IBC compatibility on Cosmos that can facilitate the interoperability between EVM-based and CosmosSDK chains. This is a big opportunity for Cosmos and modular blockchains because developers who are familiar with EVM and solidity can now quickly build IBC-compatible dApps using codes already written for Ethereum.

Pairing this with Celestia’s technology which uses Celestia as a Data Availability layer and Canto as a Settlement layer, expands canto’s rollups capability which can enable more throughput, scalability, and better experimentation on the execution layers.

The trio of Cosmos, Celestia and Canto serve as the building blocks of blockchain modularity. Appchains are at the forefront of innovation that will take decentralisation to new frontiers.

References

Modular vs. Monolithic Blockchains. (2022, July 8). Modular Vs. Monolithic Blockchains. https://www.alchemy.com/overviews/modular-vs-monolithic-blockchains

Berenzon, D. (2022, October 4). Application-Specific Blockchains: The Past, Present, and Future. Medium. https://medium.com/1kxnetwork/application-specific-blockchains-9a36511c832

C. (2023, February 25). GitHub — cosmos/cosmos-sdk: A Framework for Building High Value Public Blockchains. GitHub. https://github.com/cosmos/cosmos-sdk

List of Modules | Cosmos SDK. (n.d.). List of Modules | Cosmos SDK. https://docs.cosmos.network/main/modules

C. (2023, February 20). Modular blockchains could be the next hot crypto market trend in 2023. Cointelegraph. https://cointelegraph.com/news/modular-blockchains-could-be-the-next-hot-crypto-market-trend-in-2023

Quantum Gravity Bridge: Secure Off-Chain Data Availability for Ethereum L2s with Celestia. (2022, February 8). Celestia Blog. https://blog.celestia.org/celestiums/

Celestia: A Scalable General-Purpose Data Availability Layer for Decentralized Apps and Trust-minimized Sidechains. (2019, November 6). Celestia Blog. https://blog.celestia.org/celestia-a-scalable-general-purpose-data-availability-layer-for-decentralized-apps-and-trust-minimized-sidechains/

Twitter. (n.d.). Twitter. https://twitter.com/celestiaorg/status/1465292086526177286

Al-Bassam, M. (2019, May 22). LazyLedger: A Distributed Data Availability Ledger With Client-Side Smart Contracts. arXiv.org. https://doi.org/10.48550/arXiv.1905.09274

Twitter. (n.d.). Twitter. https://twitter.com/nickwh8te/status/1559977957195751424

Charbonneau, J. (2022, February 20). Celestia — The Foundation of a Modular Blockchain World. Medium. https://medium.com/@Jon_Charbonneau/celestia-the-foundation-of-a-modular-blockchain-world-95900fe2cfb0

Weston, G. (2022, August 25). Optimistic Rollups Vs Zero-Knowledge Rollups. 101 Blockchains. https://101blockchains.com/optimistic-rollups-vs-zk-rollups/

Research, H. (2022, September 5). Canto — an EVM compatible Layer 1 blockchain built in Cosmos SDK with free DeFi. Medium. https://medium.com/huobi-research/canto-an-evm-compatible-layer-1-blockchain-built-in-cosmos-sdk-with-free-defi-6fbabc277aad

--

--

Blockchain@NUS

Exploring and Learning as a community. Written by a bunch of blockchain nerds, not giving any financial advice. #vroomboom