Nervos Network: Which Layer Should I Build On?

Nervos Network- Which Layer should I build On?

Share This Post

 

Designing With the Blockchain Trilemma In Mind

Every design choice we make as developers opens doors and closes others. This is especially true with blockchain technology. When you set out to build your blockchain project, you have a vast selection of blockchains, technologies, and protocols.  

Figuring out how to ask the right questions about your project needs will help you, the developer, create a product that people love.

For instance, are you building a game that requires fast transactions?  Are you building a tool for infrastructure that needs super-tight security? Is this an internal project for a company you work for, and needs to be a private blockchain with its own nodes and consensus mechanism?

Before digging into how Nervos Network answers these questions with its layered technology, we need to understand what questions to ask for our specific use cases.


The blockchain trilemma can help us here. As a refresher, the blockchain trilemma states that an increase in one (scalability, security, decentralization) usually comes at the expense of the other two. Therefore, increasing all three at once with just one blockchain is most likely impossible.  Smart questions would be focused on the trade-offs between those three things.

Let’s examine the blockchain trilemma more closely and why the need for a layered, interoperable, multichain architecture in the first place.

Nervos Network - Blockchain Trilemma

Photo by Viswanath V Pai on Unsplash

Scalability

Scalability is the number-one challenge for blockchain projects today. While there is much more to scalability than transactions-per-second (TPS), we will focus on TPS for now. Take Bitcoin, for example, which is limited to 10 TPS versus an average of around 2,000 TPS for Visa. 

Why is Bitcoin slow? Bitcoin favors security and decentralization as a top priority and has been designed this way intentionally. It is possible to speed up Bitcoin, but there is always a tradeoff. Bitcoin Cash is a fork of Bitcoin which increased the block size to achieve scalable transactions suitable for buying coffee at a coffee shop. However, Bitcoin Cash is objectively viewed to have significantly lower security and decentralization. This is a far cry from Bitcoin’s original intention—to be the most secure, decentralized money on earth.
So how do you speed it up? You use a layer two scaling solution, protocol, or sidechain with a faster consensus mechanism.

Security

If you’ve been in the blockchain space for even a week, you’ve seen headlines about all the security issues that plague the blockchain world. Common reasons include using inappropriate consensus mechanisms for certain applications, the number of network nodes needed to confirm a transaction before it is final, and how these miners (in the case of Proof-Of-Work blockchains) or validators (in the case of Proof-Of-State blockchains) get rewarded. Ensuring a secure blockchain has everything to do with how consensus is achieved and rewarded over time. 

Many of these aren’t concerns of the blockchains themselves but rather their endpoints, like exchanges, bridges, wallets, and others. The challenge here is that often, for users to have a good experience with an application, that application assumes more risk in favor of speed. These are design decisions that need to be made based on the use case of each application.

Decentralization

The topic of decentralization is a hot topic. The debate of Proof-Of-Work (PoW) vs. Proof-Of-Stake (PoS) is a clear example. With PoW, if a colluding group of miners acquires 51% or more of the network’s hash rate, then they can attack the network and temporarily take control of it as if it was a centralized system.

PoS chains have a similar challenge, and many analysts believe these chains could be compromised if just 34% of the network validators collude. In a broad generalization, PoS enables better scalability but reduces how decentralized—and less secure—that network is. There is much more to be said here, but Nervos strongly believes in the battle-tested, time-proven PoW consensus mechanism for all layer one protocols. Nervos believes layer one should provide the security anchor for all the other layers built on top of it.

All modern systems of any notable complexity are designed using a modular or layered scheme to break apart and manage complexity. Recognizing that the Blockchain Trilemma would never be solved with just one layer, Nervos designed its technology from the ground up, assuming any arbitrary number of layers could be built on top of it.

“Attempts to solve the trilemma typically commit a key error: the assumption that all transactions must occur on a single base layer of the blockchain. This is to misunderstand what is revolutionary about blockchains and what their transformational power can accomplish.“

Nervos Lead Architect and Researcher, Jan Xie

Nervos Network - Layered Approach

Nervos Network – Layered Approach

In a nutshell, the Nervos layered approach is this:

Layer 1 – Should be a secure, decentralized, long-term store of value. (Nervos Layer 1 CKB)

Layer 2 – Should be interoperable components that allow for scaling (Godwoken Layer 2 Scaling Solution, Axon Sidechain).


Decentralized Applications (dApps) can be built on layers 1 or 2,

but that isn’t to say you couldn’t have any number of layers in between.

This is the beauty of Nervos.  


Other Development Considerations

In addition to the blockchain trilemma, common software development concerns must be addressed while plotting your path to Web3 victory.

Software development is generally time-consuming and costly, but blockchain adds more challenges, including security and overall complexity. You may want to build your project with the programming language that you are familiar with, and you might only care about just a few of the other factors! 

For instance, if you are a Solidity developer, you’d likely want to stick with our 100% EVM-compatible technology (Layer 2 – Godwoken).

If you are a Rust developer, you’d likely choose Nervos CKB Layer 1 (built using Rust).

Language alone might be the deciding factor, and none of what follows would make a difference.  

Here are some other concerns developers have when choosing a layer to build on:

      • The flexibility of the programming model.
      • Ecosystem Infrastructure and longevity.
      • Tools, documentation, tutorials, guides.
      • Adoption rate: (strength of the community).
      • Difficulty level to build on (EVM compatibility, programming languages used, and complexities of protocols)
     

    Lastly, if I had to summarize how to choose a layer, this is how I would do it:

        • Choose CKB L1 if you care about security and decentralization.
        • Choose Axon if you care about performance.
        • Choose Godwoken if you want to find a balance in the trade-offs.
       

      Stay tuned as I dive deeper into this topic in part 2 of this 4-part blog series, where I outline the why behind this summary. I compare and contrast CKB L1, Godwoken, and Axon regarding their relative strengths and weaknesses concerning Security, Speed, and Decentralization


      We’ve Got Your Back!

      We’d love to support you in any way we can. 

      We have grant programs and Build Club (a super-supportive community just for developers looking to get started with Nervos.)

         

        Don’t need any help and want to start right this second?

        Check out our tutorials below:

          Lastly, if you want a shortcut to try and figure out what layer you should be building on, we’ve created a handy tool for you that can help!

          To stay updated on all things Nervos

          Join our community: Discord Github Nervos Talk Forum Twitter.

          For discussions or questions, join the conversation on Discord.

          More To Explore

          Image1
          Blockchain Professional

          My 1st Experience With Tenderly – A Guest Blog

          A Guest Blog by Travis Richardson In blockchain development, where every transaction carries real value and network fees can be costly, ensuring smooth and error-free

          NFTs and Mass Adoption
          Blockchain Professional

          NFTs and Mass Adoption – A Report

          Introduction The cryptocurrency world has rapidly evolved over the past few years, with NFTs emerging as one of the industry’s most exciting and promising developments.