paint-brush
Dapps: Offchains, Sidechains & Appchainsby@adedamolaxl
613 reads
613 reads

Dapps: Offchains, Sidechains & Appchains

by AdedamolaXLJune 17th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The scalability of Dapps has held web3 adoption back for a while now. Today, innovation is pushing boundaries beyond Native-Dapps existing on Layer1 protocols to new forms like Off-chain Dapps, Sidechain Dapps and Appchains which offer better accessibility and improved user experience.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Dapps: Offchains, Sidechains & Appchains
AdedamolaXL HackerNoon profile picture

Introduction To Dapps

First, there was blockchain, then Johnstone et al said let there be Dapps, since then building Dapps has become synonymous with buidling for web3 and experts agree the high adoption of web3 very much depends on the scalability and accessibility of Dapps.


Dapps by definition are autonomous, open-source software applications that run on a peer-to-peer distributed network rather than on a single server network. Dapps typically store their data cryptographically on the blockchain and use a token system that users use for transactions, and as a means of consensus governance for decision making.


Essentially, Dapps are autonomously run by code, with distributed authority shared by users with no central point of failure.

Different Kinds of Dapps

The typology of Dapps largely depends on the layer on which they are built. Imagine Blockchain is a building, layers are levels and Dapps are apps that can fit in any layer depending on where you want it. Building in web3 is virtually a case of finding the best layer for solving the trilemma problem.


Nicky Montana has an excellent article explaining the different layers and a wonderful illustration which am plugging here.


(Credit: Nicky Montana)


Currently, most Dapps reside on Layer 1. Layer 1 protocols characteristically have high decentralization and security. However, L1 protocols by default also have scalability issues because:


  • All pending transactions on Layer 1 chains must be confirmed at the same time;
  • The high number of Dapps on Layer 1 means there is an equally high volume of transactions waiting to be processed on-chain at the same time;
  • This forces Dapps to compete against each other to have their transactions added to a block;
  • Consequently, Layer 1 chains struggle to process all transactions at the same time;
  • This slows down the performance of Dapps built on Layer 1.


Solutions to the above issues have led developers to buidl on Layer 2 chains like Arbitrium and Polygon or buidling on Layer 0 protocols like Octopus and Polkadot.


For the sake of this article, Dapps built on L1 will be referred to from here on as Native-Dapps, while those built on L0 are Appchains. There are two different kinds of Dapps built on L2, and it's important to distinguish between them; Off-chain Dapps are built on L2 blockchains directly using Layer 1 protocols, Sidechain Dapps exist on separate L2 blockchains that bridge into Layer 1 chains. It's a significant difference, as we shall see, because they behave differently.


That said let's delve into the characteristics of these various Dapps:

Native Dapps

  1. Benefit from high security and decentralization by being built directly on L1.
  2. All transactions and data are carried out or stored on Layer 1.
  3. Dapps have high transaction fees, slow processing power and slow finality of block transactions.
  4. They have low transaction speed, hence limited scalability functions.
  5. Highly trustless with a strict consensus governance model.
  6. Poor design and user experience limit how Dapps operate and what they are capable of doing.

Off-chain Dapps

  1. The underlying L2 blockchain is built on L1, benefiting from its security and decentralization.
  2. Most transactions are carried out off-chain, with the final proof conducted on Layer1.
  3. Dapps have lower transaction fees, high processing power and faster finality of block transactions.
  4. High transaction speed and throughput lead to improved scalability.
  5. Improved user experience.
  6. Share similar features and consensus model with Layer 1.
  7. Most Dapps are still in the experimental stage and may be risky for asset management.

Sidechain Dapps

  1. Dapps are built on separate L2 blockchains and do not derive their security or data availability from L1 protocols.
  2. They are however compatible with Layer 1 chains because they possess the bridging feature and share similar computation.
  3. Dapps have lower transaction fees, high processing power and faster finality of block transactions.
  4. High transaction speed and throughput lead to improved scalability.
  5. Generally higher trust assumptions are susceptible to fraud due to the presence of supernodes.
  6. Flexible consensus model which eases user experience and transaction fees
  7. Trade-offs in decentralization and security for scalability.

Appchains

  1. Dapps have their separate blockchains with their own rules.
  2. Dapps do not derive their security or data availability from Layer1 protocols.
  3. Dapps have lower transaction fees, high processing power and faster finality of block transactions.
  4. High transaction speed and throughput lead to improved scalability.
  5. High scalability features promise a more fluid user experience
  6. Interoperable with L1 via cross-chain bridges.
  7. Security dependent on how many validators are willing to stake on an appchain.

Comparing Dapps

Features

Native Dapps

Off-Chain Dapps

SideChain Dapps

Appchains

Protocol

Built directly on Layer 1

Built on L2 chains that utilize L1 protocols

Built on L2 that bridge into L1 chains

Built on Layer 0 using relay chains and connected to L1 using bridges

Blockchain

Uses Layer 1 Blockchain

Uses Layer 2 Blockchain

Uses Layer 2 Blockchain

Has its separate Blockchain

Decentralization

Very High

High

High

Customizable

Security

Very High

Very High

High

Customizable

Trust

Highly trustless

Quite trustless

High trust assumptions

High trust assumptions

User Experience

Poor

Better

Better

Much better

Scalability

Low

High

High

High

Transaction Fees

High

Low

Low

Low

Processing Power

Slow

Fast

Fast

Very Fast

Consensus Model

Rigid

Flexible

Flexible

Customizable

Conclusions

In summary, it’s best to keep the following in mind when choosing a suitable layer for your Dapp in Web3


  1. Native Dapps offer the very best of decentralization and security at the expense of scalability. It’s best if your users will not be carrying out high-volume transactions.


  2. Off-chain Dapps put scalability on top of decentralization and security and are perfect if you want to prioritize user experience while still benefiting from L1 impressive features.


  3. Sidechain Dapps are perfect if you are building cross-chain Dapps that are L1 compatible while providing a boundless ecosystem for your users to interact with


  4. Appchains are useful if your Dapp will be handling high-volume transactions which will require its specific blockchain to make processing faster.

Further Reading