Blog
To Chain or to Rollup? The Sophisticated dApp Dilemma

To Chain or to Rollup? The Sophisticated dApp Dilemma

Tech Talks

By

George Spasov

10 Min Read

This blog post outlines the choices that a sophisticated dАpp faces if they decide that the features of the smart contract are not enough (hitting the EVM constraints). Blockchain scalability is a core challenge in the industry, as increasing user and transaction volumes can impact performance and efficiency, driving the need for more advanced solutions like appchains and rollups.

It showcases the options they have - to become an app-chain or app-rollup. Both appchains and rollups are considered leading scaling solutions in the blockchain space, addressing network limitations related to transaction throughput, cost, and congestion.

Lastly, it suggests some advancements in terms of infrastructure and protocols that can help the app-rollups become a viable choice for many sophisticated dАpps.

When Smart Contracts aren’t Enough

Arguably, the programmability of the blockchains via smart contracts is the single most important factor that enabled web3 to gain traction. While this programmability is needed in order to foster the creativity of millions of developers around the world, smart contracts also come with limitations. These might be technical limitations - like missing a certain function or use-case-specific limitations - insufficient speeds, expensive operations etc. In many cases, the technical requirements for deploying scalable and efficient dapps exceed what smart contracts alone can provide, prompting the need for more advanced solutions.

Some dАpps start as smart contract-based applications, but eventually need their own sophisticated features, better costs or speeds. Some notable examples of these are Axie Infinity and dYdX.

Others cannot start as smart contracts due to the said limitations, and opt to go directly for a more sophisticated approach.

It is at this point that they arrive at crossroads, and need to decide their path forward. Dapp developers must carefully evaluate their technical requirements and long-term goals when choosing between appchains and rollups. One option is to create their own chain and become an app-chain (requires the bootstrapping of own security). Another option is to create their own rollup and become an app-rollup (inheriting the security of L1).

Speach Bubble IllustrationGlow Blog Banner

Becoming a custom blockchain app-chain

The first viable option is launching its own chain. This gives the app the flexibility it needs in order to realize the use case needs. Appchains are a type of customized blockchain, allowing developers to build their own custom blockchain tailored to their application's needs. With App-chains the developers can:

  • Have complete control of their tech stack – Appchains provide full control over the blockchain architecture, consensus mechanism, and data availability, giving developers complete authority over the stack and infrastructural choices needed in order to realize the sophisticated use case.
  • Have speed through focus – Specialization leads to better performance and higher transaction throughput, allowing the ability to quickly steer and influence the app-chain development.
  • Make specific use-case tradeoffs – Some dАpps are willing to sacrifice speed for lower costs, while others would do the opposite. The point is, with app-chains you can do any tradeoff that makes sense for your use-case and users.
  • Interconnect with other highly specialized app-chains – While this is not necessarily true for all app-chains, for the ones built in the Cosmos, Polkadot or Avalanche ecosystems it is. In those ecosystems, Cosmos Hub and Polkadot Relay Chain act as central blockchains that provide shared security and interoperability for appchains within their respective ecosystems. Appchains can also be built on existing blockchain networks, leveraging their shared security and infrastructure to enable even better use cases.

Appchains are application specific blockchains, also known as custom chains or separate blockchains, designed for particular use cases.

On paper, app-chains make complete and total sense, however, there is a hidden downside that needs to be pointed out.

App-chain developers need to procure their own validator set. This means managing the entire network, including finding and persuading (normally through economical advantages and incentives) validators to start and continue validating your network, maintaining a healthy user base, and providing tools like a block explorer for transparency. If you find too few of these, your app-chain will suffer massive centralization. In practice, a very small percentage of app developers have the connections and resources to pull off getting a big validator set. This limits app-chains as a viable approach only to the most connected and resourceful groups. Modular blockchains and different ecosystems (such as Cosmos, Polkadot, Avalanche) offer frameworks for building customized blockchains and blockchain applications.

Becoming an App-rollup

The second viable option is launching your app-rollups (sometimes referred to as L2/L3s). App-rollups are a type of rollup chain that execute transactions off chain and post transaction data back to the main blockchain. Rollups as a service (RaaS) providers offer managed solutions for deploying and maintaining these custom chains, simplifying the process for developers. App rollups have similar flexibility to app-chains. With app-rollups developers can:

  • Have good control over the tech stack – Rollups provide more control over resource allocation and performance management, with limitations depending on the choice between validity and fraud proofs.
  • Speed through focus – Similarly to app-chains, they can move at much greater speeds than a generalized system.
  • Make specific use-case trade-offs – Again similarly to app-chains, app-rollups can make different trade-offs needed for the use case.
  • Derive security from L1 – The security layer of the rollup is inherited from the main chain. Rollups use cryptographic proofs such as fraud proofs, validity proofs, and zero knowledge proofs to ensure security. This means that app-rollups do not need to worry about the validator set for their rollups.

While the last point is a major advantage of app-rollups over app chains, again, we find ourselves at a place where a hidden downside exists.

Optimistic rollups and zk rollups are two main types of rollup chains. Both process transaction execution off chain, then post transaction data and proofs to the main blockchain. Optimistic rollups assume transactions are valid by default and introduce a challenge period during which invalid transactions can be disputed and reversed, relying on fraud proofs. Zk rollups, on the other hand, use zero knowledge cryptography for generating validity proofs, ensuring that only valid transactions are finalized without revealing sensitive data.

Unlike app-chain ecosystems, app-rollups don’t have access to primitives that have proven valuable. App-chains within Cosmos and Polkadot can plug into existing infrastructure and utilise them through the use of IBC/XCMP. However, if an app-rollup needs a DEX it must build it on its own chain and bootstrap the liquidity. The same example is true for stablecoins, NFTs and NFT marketplaces etc. You get the point. In theory, you can go through bridges or through L1, but these are limited solutions and most dApps would need a more sophisticated interaction (f.e. a data oracle).

Rollups rely on execution engines to process transactions off chain, offloading transactions from the main chain to improve cost efficiency and transaction throughput. Gas costs and gas fees are important considerations for rollup chains, as they impact the cost efficiency and adoption of blockchain technology. RaaS providers and service RaaS platforms offer API services to support the deployment and management of custom chains and rollup chains.

Key advantages and key benefits of rollups include scalability, security, and the ability to handle high transaction volume. Significant advancements in rollup technology, such as decentralized sequencing and improved cross-rollup communication, are driving mainstream adoption and enabling new scaling solutions for blockchain scalability.

Appchains and rollups represent two leading approaches to scaling solutions in the blockchain space.

The Inflection Point for App-rollups

The main reason that hinders the existence of app-rollups is the lack of proper cross-rollup communication protocol and infrastructure. If we are to speculate, the creation of such infrastructure would be the inflexion point for app-rollups. It will remove their major downside. Data availability is a key requirement for effective cross-rollup communication, ensuring that information can be reliably accessed and verified across different rollups.

Firstly, such an infrastructure would need to be able to pass arbitrary data messages between rollups. Secondly, such an infrastructure needs to be extremely easy to integrate into the app-rollup. Thirdly, the infrastructure should be scalable. Ideally, adding new rollups should reuse existing infrastructure.

Lastly, the infrastructure should be completely decentralised. This means using validity proofs to ensure security and crypto-economical incentives to ensure the liveness of the system.

Significant advancements in interoperability and data availability are paving the way for mainstream adoption of app-rollups. If a protocol that meets the four requirements above comes, app-rollups can use it and create an ecosystem around it. App-rollups won’t exist in a vacuum anymore and use cases won’t be limited to the few groups with enough connections and resources to pull off an app-chain. This cross-rollup communication protocol, however, is a complex piece of work and is yet to come to life.

Speach Bubble Illustration
Contact Us
Glow Blog Banner

Conclusion

Complex dApps that cannot be efficiently expressed within smart contracts, face the choice between becoming an App-chain or an App-rollup. App-chains offer the freedom to express the business logic of the dApp but require complex social and crypto-economical coordination in order to procure and maintain an active validator set for its chain. App-rollups don't need a validator set as they derive their security from L1. App-rollups, however, currently exist in a vacuum and don't have access to an ecosystem of services/dApps that is needed for the successful execution of most sophisticated use cases.

We describe an infrastructure that will enable app-rollups to interoperate and create a network for themselves, thus removing the ecosystem limitation and becoming a viable choice for most of the use cases. We strongly believe such infrastructure will be created soon.

Drop us a line.

Or just shoot us a message on Telegram

Select Contact Method
Looking for

Thank you! Your submission has been received!

Oops! Something went wrong while submitting the form.
Mail Box IllustrationCube Illustration 2