Nervos CKB in a Nutshell

Matt Quinn
Apr 17, 2019 · 5 min read

The Nervos Common Knowledge Base (CKB) is a preservation focused, “Store of Assets” public permissionless blockchain and the base layer of the Nervos network.

In a blockchain context, “common knowledge” refers to states verified by global consensus and CKB is designed to be a state verification system. This post aims to help readers understand how it is different from existing public permissionless blockchains such as Bitcoin and Ethereum.

Nervos CKB generalizes Bitcoin’s UTXO model to support user-defined tokens and smart contracts. It is designed to be adaptable, sustainable, and flexible.

CKB adapts to network conditions with a PoW algorithm that adjusts based on the bandwidth of participating nodes.

It achieves sustainability through its novel token economics model, focused on providing a long-term store-of-value. An adaptable PoW algorithm also improves the sustainability of CKB, automatically scaling up with bandwidth improvements.

The combination of CKB’s generalized cell model and RISC-V instruction set introduces maximum flexibility: cells can store executable code and reference other cells as dependencies, allowing new algorithms to be easily deployed and integrated into CKB without hard forks.

CKB cells store primitives that have previously been built into custom VMs. By keeping the VM as simple as possible and offloading program storage to cells, updating key algorithms (e.g., Secp256k1) is as simple as loading the algorithm into a new cell and updating references.

Programming Model: Generalized UTXO + RISC-V based VM
Nervos is a smart contract platform like Ethereum, however, Nervos CKB has been designed to be a state verification and storage system instead of a computation platform. The Layer 1 blockchain verifies and stores states, while the computation-intensive state generation happens on Layer 2.

Nervos programming is based on the Cell model, inspired by Bitcoin’s UTXO model. Cells contain arbitrary data, which could be state, (such as user-defined token ownership) or business logic (such as code that verifies the integrity of a token transfer). Cells are also immutable: once they have been created, they cannot be changed.

In CKB, Cells are first class citizens. Cells serve as both the inputs and outputs of transactions and are the elements that comprise the global state of CKB.

Since cells can both reference data in other cells and store data of their own, the state and business logic of an asset are separated. For example, the creator of a new token would deploy the business logic of the token (e.g., how many tokens exist, whether new ones can be created, etc.) within one cell, and then users would control cells containing ownership and amount data. The users’ cells would reference the business logic cell, which would contain a script that verifies new cell validity.

The owners of user defined tokens (UDT) are truly owners: only they can utilize the cells that store their token data. In CKB, stateful programs do not aggregate state in a central place (such as seen in Ethereum smart contracts). Users own their cells, allowing straightforward state rent and mitigating the tragedy of the commons.

Clear dependencies allow nodes to process transactions in parallel.

Blockchain Evolution: The Common Knowledge Base
Looking at previous public blockchains, we have observed one fundamental challenge: once they are built, they are more or less fixed.

While they will be upgraded over time, their structure will generally remain the same. To see the challenge this brings, we can look at how difficult it has been to bring Segwit to Bitcoin or Wasm to Ethereum.

CKB takes a step back. Scripts are far more primitive than smart contracts in Ethereum, but carry a significant benefit: flexibility. Almost all algorithms and data structures are implemented in CKB scripts stored within cells.

On CKB, if you are not satisfied with fundamental functionality, such as a signature algorithm or hash function, just roll up your sleeves and build what you need.

‘Nervos’ is derived from the word ‘nerve’, and ‘cells’ are specialized units that work together. Just as we see in the biological world, CKB cells can be specialized to process information, convey messages or simply store knowledge.

Nervos CKB is an organic construction, rather than a work of traditional engineering. It allows the network to evolve at its lowest level, taking advantage of properties Charles Darwin observed over a century ago:

“the species that survives is the one that is able to adapt to and to adjust best to the changing environment”

Virtual Machine
CKB VM is a RISC-V based virtual machine for executing smart contracts on Nervos CKB, written in Rust. Utilizing the RISC-V instruction set allows for scripts to be written in a wide variety of programming languages. Check out the CKB VM paper for more details.

Nervos uses a proof of work-based, adaptive Nakamoto Consensus. Check out the post on Nervos Consensus for more details.

The native token CKB is designed to represent rights to occupy state storage over time. The protocol constrains state storage growth through monetary policy and collects state rent through a “targeted inflation” scheme from state users. Check out the token-economic paper for more details.

The co-founders of Nervos are Jan Xie, Terry Tai, Kevin Wang, Daniel Lv and Cipher Wang with a team of core developers and researchers. Past projects by the team include Ethereum clients (ruby-ethereum and pyethereum), Spark Pool (2nd largest Ethereum mining pool), imToken (an Ethereum wallet with 7 million users) and CITA (a permissioned blockchain used by a number of high profile financial institutions in China).

The team began engineering Nervos in January 2018 and raised 28 million USD in pre-sale from investors including Sequoia and Polychain. Currently the team is preparing a testnet launch in Q2 2019 and mainnet launch in Q4 2019.


Keeping up with Nervos:

👏Thanks to , , and for suggestions and review of the article. 👏

Nervos Network

The Nervos Network is a public blockchain ecosystem and…

Nervos Network

The Nervos Network is a public blockchain ecosystem and collection of protocols aiming to solve the current challenges facing blockchains like Bitcoin and Ethereum today.

Matt Quinn

Written by

Financial software consultant and full-time human, Community relations, Nervos Foundation; Co-founder, Starfish Mission

Nervos Network

The Nervos Network is a public blockchain ecosystem and collection of protocols aiming to solve the current challenges facing blockchains like Bitcoin and Ethereum today.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store