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.
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
- Benefit from high security and decentralization by being built directly on L1.
- All transactions and data are carried out or stored on Layer 1.
- Dapps have high transaction fees, slow processing power and slow finality of block transactions.
- They have low transaction speed, hence limited scalability functions.
- Highly trustless with a strict consensus governance model.
- Poor design and user experience limit how Dapps operate and what they are capable of doing.
Off-chain Dapps
- The underlying L2 blockchain is built on L1, benefiting from its security and decentralization.
- Most transactions are carried out off-chain, with the final proof conducted on Layer1.
- Dapps have lower transaction fees, high processing power and faster finality of block transactions.
- High transaction speed and throughput lead to improved scalability.
- Improved user experience.
- Share similar features and consensus model with Layer 1.
- Most Dapps are still in the experimental stage and may be risky for asset management.
Sidechain Dapps
- Dapps are built on separate L2 blockchains and do not derive their security or data availability from L1 protocols.
- They are however compatible with Layer 1 chains because they possess the bridging feature and share similar computation.
- Dapps have lower transaction fees, high processing power and faster finality of block transactions.
- High transaction speed and throughput lead to improved scalability.
- Generally higher trust assumptions are susceptible to fraud due to the presence of supernodes.
- Flexible consensus model which eases user experience and transaction fees
- Trade-offs in decentralization and security for scalability.
Appchains
- Dapps have their separate blockchains with their own rules.
- Dapps do not derive their security or data availability from Layer1 protocols.
- Dapps have lower transaction fees, high processing power and faster finality of block transactions.
- High transaction speed and throughput lead to improved scalability.
- High scalability features promise a more fluid user experience
- Interoperable with L1 via cross-chain bridges.
- 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
-
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.
-
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.
-
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
-
Appchains are useful if your Dapp will be handling high-volume transactions which will require its specific blockchain to make processing faster.
Further Reading
- A Beginner's Guide to Understanding the Layers of Blockchain Technology
- Bitcoin as a Dapp
- L1/L2 Bridges
- How Sidechains work
- How to launch an Appchain