Which Nervos Network Layer Should I build On? (Part 2 of 4)

Which Layer Should I Build On With Nervos Network?

Share This Post

In the second of our four-part blog series on Which Nervos Network Layer Should I Build on, I discuss three concerns related to the Blockchain Trilemma addressed in part one: Security, Scalability, and Decentralization.

I’ve tried to rank each attribute in order of a layer’s relative strength compared to other layers. Sometimes my conclusions are pretty straightforward, and most would agree with my ordering. Other times my conclusions leave room for healthy debate, primarily based on how projects get configured.

Please read with this in mind.

(Click here for Part 1 of this series )

Give me security: I want my users to feel safe using my dApp.

Nervos Network provides a security anchor

Photo by Adi Goldstein on Unsplash

The consensus mechanism of a blockchain is the most important factor for security. It ensures truth for the entire blockchain, prevents malicious attackers from compromising the blockchain, and ensures reliability for the network. Proof-Of-Work (PoW) and Proof-Of-Stake (PoS) are the two most common forms of consensus today, but there are many other types of consensus algorithms.

PoW, PoS, Delegated Proof of Stake (DPoS), and Proof-Of-Authority (PoA)-based cryptocurrencies account for >93% of the Top 100’s market share. PoW is unarguably the highest form of security available for a blockchain today. Next is PoS, DPoS, and finally, PoA. Here is an excellent article on Why Nervos chose Layer 1 for Security and Decentralization.

#1 – CKB L1

CKB L1 uses PoW and is the most secure of the three layers. PoW is the most battle-hardened, time-tested consensus mechanism of any blockchain and has secured billions of dollars for over a decade. There are a few reasons why CKB L1 is in the top spot here.  

First, with CKB L1, the focus is on validation as opposed to generation. Generation is the off-chain creation of transactions, and validation is the on-chain verification of those transactions. CKB L1 has more efficiency because there are fewer hardware requirements for a validation-focused blockchain. Lower hardware requirements mean lower operational costs, which in turn means a higher level of security and decentralization, as more users can participate in the network.

Second, CKB L1 uses the UTXO-based Cell Model, which is deterministic. Determinism has two beneficial properties. First, the resulting state is always known because it is included in the transaction. You always get what is expected. On Ethereum, there are cases where you execute a transaction, and then you do not get what you thought you would. Second, not storing failed transactions lowers CKB L1 utilization, which increases the network’s security by reducing the cost of maintaining the network.

Third, CKB L1 uses NC-MAX, an improved version of “Nakamoto Consensus,” the Proof-Of-Work consensus algorithm used by Bitcoin.  NC-Max targets higher performance and robustness by improving block propagation, block throughput, and resistance to selfish mining. One way NC-Max achieves these improvements is to include an orphan rate difficulty adjustment to automatically optimize block time based on current network conditions. This gives the lowest possible block times without sacrificing security.

Lastly, CKB L1 has been designed for long-term security. As described in the Bitcoin whitepaper, block rewards for miners will eventually go to zero. This is because the number of new coins that can be mined is cut in half every four years. CKB L1 also has the exact same 4-year halving event and the same situation with primary CKB issuance going to zero. 

When no more block rewards are available, will transaction fees be enough to secure the network?  The answer is up for debate regarding Bitcoin, and this could be a genuine concern in 100 years as we get closer to the final halving event. With CKB L1, this future problem has been addressed with a unique secondary issuance paid to miners indefinitely for securing the data stored on the network. 

Nervos’ secondary issuance is a fixed 1.344 billion CKBytes per year. This is paid to miners through state rent using a form of targeted inflation that remains deflationary to long-term holders. More on all of this in the next blog article!


#2 – Godwoken

This puts Godwoken in second place as Godwoken is an Optimistic Rollup that uses PoA. While there is debate around the tradeoffs between PoW and PoS, PoW offers the best security for a Layer 1 blockchain, but PoS is still a great choice for Layer 2!

With PoS, consensus is achieved by choosing validators with the most capital “staked” in that blockchain. This means control of the network consolidates in the top staking entities. The theory, of course, is that this shouldn’t be a problem, as these stakers also have the most to lose. 

Part of security has to do with how decentralized a blockchain is, and the more consolidation of power, the more centralized, and thus the less secure that blockchain becomes. This is because trust is placed in a smaller number of network participants to secure the network.  

However, this does not mean that Godwoken is not secure. Far from it. Godwoken inherits its security benefits of CKB L1 and will become more secure over time as CKB L1 grows.

#3 – Axon

Axon is a “blockchain-in-a-box” configurable by the developer. This means Axon could achieve close to the same level of security as Godwoken, depending on the consensus model chosen and the parameters selected. Future Axon projects can select from PoS, DPoS, or PoA and have configurable characteristics such as block time and minimum transaction fees, which affect security.

Also, since Axon is managed directly, security measures can be implemented to shut down would-be hackers. Think about how centralized exchanges can halt trading on their platform whenever they want to, for example. This is a highly controversial action, with both benefits and drawbacks, but it’s still worth noting since it could benefit certain situations. Sidechains like Axon can intervene when set up in a minimally decentralized manner when all the participants in consensus are in agreement to halt the chain.

However, one of the potential vulnerabilities that can exist with sidechains like Axon is when too few validators are securing the network. This can happen when PoS rewards are too low compared to the value secured within the network, causing a “top-heavy” scenario with misaligned incentives. A knowledgeable developer should understand these considerations and manage this risk.

Give me Scalability: I want the user experience to be frictionless and have fast (and cheap) transactions.

Photo by Indira Tjokorda on Unsplash

Imagine it… It’s your friend’s birthday today, and you’d like to purchase her a gift card online for $50. You go to the checkout page and notice the total says $75! You look more closely and find that the fee for sending it online is $25! Below in fine print, it says, “Delivery not guaranteed.”  

This would not be acceptable in web 2.0.

For example, we saw this exact kind of scenario play out with Ethereum during the bull run of 2021, where users were paying $25 (or more) in gas fees for a single transaction, having to wait hours for the transaction to be finalized. Sometimes the transaction would fail, resulting in a loss of the gas fee entirely! 

But as you likely are already aware, these undesirable effects are commonplace in web 3.0–Ethereum being the best example–making the network only usable by the rich.  For the rest of us, Ethereum becomes both unusable and unreliable.

The whole blockchain industry is currently trying to solve these problems, as witnessed by the number of scaling solutions, most notably Polygon, currently being used to lower fees on Ethereum. There is no perfect solution, but different projects may benefit from different tradeoffs.

Speed is essential for some applications and non-essential for others. This has to do with how you access the data on the blockchain. Reading data from the blockchain is always fast and has no additional costs. Writing or changing data on the blockchain is slower and increases costs.

An example of a dApp that requires high TPS would be a high-frequency trading bot, a DeFi exchange, or a staking platform. Something like an NFT storefront would not require nearly as high of TPS.

A Note on TPS:

Measuring TPS and stating performance at any given time is complicated for several reasons. For example, the state of a blockchain influences speed at any given moment, the simulations/nodes used to test, and (in the case of Axon, for instance) the configuration of a blockchain and other factors. Find more on how to think about scalability, speed, and TPS.

Security vs speed for layer 2 solutions

Photo by Binance Research

We have the following rank for scalability:

#1 – Axon

Axon, like most sidechains, is characterized by excellent performance characteristics. Axon uses a new Byzantine Fault Tolerance (BFT) based consensus algorithm called Overlord Consensus.

Overlord Consensus supports over 3000 TPS across potentially hundreds of nodes, with transactions confirming in seconds. Axon will initially support PoS, DPoS, and PoA protocols, with others to be added in the future. Axon would be a great layer to choose for gaming or social networking.

One other feature of Axon is that if you have a dApp that requires lots of on-chain space, you could configure Axon to be PoA which would lower the cost of your data storage.  Why is this? Because with PoA, you only need a few trusted validators. Fewer validators mean less hardware is required to run validation nodes, which lowers the costs to your network operators.

#2 – CKB L1

CKB L1 is built for security and has been designed to shift scalability concerns to Layer 2. However, due to the NC-MAX (Improved Nakamoto Consensus Protocol) design, CKB L1 has achieved a higher TPS than other PoW chains like Ethereum 1.0 (before Eth 2.0 moved to PoS). CKB L1 operates at 200 TPS and is currently 10x Ethereum 1.0 (20 TPS). As mentioned, CKB L1 can achieve this due to computation being done off-chain and only submitting transactions for on-chain validation. 

In addition, parallel computation is possible due to the Nervos UTXO-based Cell Model.  This gives CKB L1 a leg up scalability-wise compared to other non-Nervos blockchains using an account-based model.

#3 – Godwoken

Godwoken is a modular gaming, full-stack blockchain using an Optimistic Rollup and Nervos CKB L1 for security. Godwoken has a relatively high TPS of up to 20 TPS. In addition, Godwoken offers an optional infrastructure that allows for gasless transaction fees and prepaid gas. Godwoken can also be used for low throughput, high-volume, and high-value projects, such as DeFi, where security is essential, but you still need some speed.

Give me decentralization: I want my users to know their content won’t be censored. 

Photo by Fabio on Unsplash

For some applications, being as decentralized, permissionless, and censorship-resistant as possible is the goal. For others, these are much less of a target. Nervos, having designed its layers with this in mind, gives rise to the possibility of realizing any goal based on your use case. 

Here, the measurement of decentralization is brilliantly discussed (including DTPS, Decentralized Transactions-Per-Second), along with 17 key variables that affect this.

#1 – CKB L1

CKB L1 is a PoW network, just like Bitcoin. Bitcoin has proven itself both decentralized and permissionless over time.  CKB L1 improves on Bitcoin’s Nakamoto Consensus with NC-MAX, creating even more potential for decentralization than Bitcoin.  

In contrast, PoS consensus mechanisms have centralization concerns when used on Layer 1. As validation is done by those with the most stake in the PoS blockchain, power consolidates among the wealthiest.  Ethereum has already had decentralization concerns for this very issue. 

#2 – Godwoken

At the time of this writing, Godwoken is using PoA but will eventually be moving to PoS. PoA and PoS networks are less decentralized than PoW networks. Depending on the implementation, different attacks can be mounted through the use of between 1/3 and 2/3 of stake. From a long-term perspective, this creates concerns that PoW blockchains do not have.

Also, Optimistic Rollups are considered more secure–and thus, more decentralized than sidechains–because they inherit their security and decentralization aspects from Layer 1

#3 – Axon

Axon is a sidechain. Sidechains generally rely on a smaller number of validators than their parent chains to be more scalable (higher TPS with cheaper gas fees) but do so at the cost of decentralization. Increasing the number of validators also increases decentralization in the blockchain, but maintaining it requires higher transaction fees. Higher transaction fees might not be appropriate in every scenario, which is why Axon makes this configurable.

Are you starting to see why it’s impossible to “have it all” with just one layer?

Stay tuned as I dive deeper into this topic in part 3 of this 4-part blog series, where I compare and contrast CKB L1, Godwoken, and Axon regarding their relative strengths and weaknesses concerning the following blockchain attributes of:

      • Ownership

      • Longevity

      • Flexibility

      • Time-To-Launch

      • Support 

      • Community

    Did you Miss Part 1 of this 4-part series? No Worries, you can find it here.

    We’ve Got Your Back!

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

    We have grant programs available 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 quiz 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

        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.