User:RiskAficionado/sandbox

Nervos Network is a decentralized open-source, public, permissionless blockchain platform. It consists of multiple blockchain layers that are designed to be optimized for different functions. The foundational layer is known as the Common Knowledge Base, whilst the native cryptocurrency of this layer is called CKB. This layer operates based on the proof-of-work consensus model, and represents a trust-anchor through which all linked blockchains leverage additional security and decentralization. Blockchains built on top of this foundation are able to favor higher throughput and can operate other consensus mechanisms such as proof-of-stake, but will still submit transaction data to the base layer for verification. Smart contracts and decentralized applications can be deployed on any layer, depending on the needs of the specific application.

Other key areas of focus for Nervos Network are interoperability and abstraction. This is achieved by utilizing a RISC-V-based virtual machine which has no hard-coded cryptographic primitives. This gives the network greater flexibility in interacting with other blockchains, and removes traditional challenges to user experience by eliminating the need for multiple wallets.

Nervos Network was founded in 2018 by Kevin Wang, Daniel Lv, Terry Tai, Jan Xie, and Cipher Wang.

Architecture
Nervos Network's design philosophy is based upon utilizing multiple blockchain layers to achieve different functions. The base layer prioritizes security and decentralization, and is optimized to verify transactions. It can settle transactions submitted from upper layers and can arbitrate in cases of dispute. In doing so, it provides additional security to upper layers by acting as a trust-anchor. Layer 2 and above benefit from this and are able to favor greater throughput demands of high-performance applications.

Layer 1
The foundational layer of Nervos Network is known as the Common Knowledge Base. The native cryptocurrency to this layer is referred to as CKB (or CKByte). This currency serves as a store of digital asset and executes smart contracts. 1 CKB represents 1 byte of storage on the blockchain. The key components of Nervos Network's layer 1 design are NC-Max, the Cell Model, and CKB-VM.

NC MAX
Layer 1 achieves cryptographic consensus through proof of work, using an enhanced version of Bitcoin's Nakamoto consensus algorithm: NC-MAX. NC-MAX targets three main areas of improvement over the original: a two-step transaction process (propose, commit) which improves block propagation; dynamic adjustment to block interval based on network performance to keep orphan blocks low and improve transaction throughput; and accounting for all blocks (including orphans) during the difficulty adjustment calculation to resist "selfish mining attacks," whereby one group of miners can increase their own profits at the expense of other miners on the network. NC-MAX has been subject to peer-review and was presented at the Network and Distributed System Security (NDSS) Symposium in 2022. The consensus process uses a novel hash function called "Eaglesong."

Cell Model
The accounting method on layer 1 is an expansion of Bitcoin's UTXO model, and is dubbed the "Cell model," where a cell is the most basic structure for representing a single piece of data on the blockchain. Like its predecessor, the Cell model utilizes outputs from previous transactions as inputs for future ones. The Cell model differs from the original UTXO model by being programmable, thereby supporting smart contracts. Additionally, a cell is able to store any form of arbitrary data on-chain, such as non-fungible tokens (NFTs), digital assets, compiled code, or serialized data like JSON strings. All such data is the exclusive property of the cell owner.

The Cell model functions as a method of value capture of the data that is stored on the blockchain: each cell is a data container that requires CKB in order to be formed. Because 1 byte of data storage is equivalent to 1 CKB, the number of CKB required to support a cell increases with the size of data stored. Another feature of this design is known as state rent: CKB that is deployed in cells and occupying storage on the blockchain is not protected from inflation. CKB that is not used in cells can be locked in a smart contract called the Nervos DAO, whereby users receive additional CKB that is proportional to the rate of new CKB (secondary) issuance. As a result, new issuance that would have been given to owners of CKB deployed in cells, is instead awarded to miners for maintaining network security. This creates an opportunity cost for storing unnecessary data on the blockchain and is designed to encourage efficient use of limited space.

CKB-VM
The CKB virtual machine (CKB-VM) is a software-based emulated computer that executes smart contracts on Nervos Network's base layer. Like the Ethereum virtual machine, CKB is a Turing-complete development environment, but also integrates the RISC-V instruction set. RISC-V is a computer instruction set similar to the one that powers a computer or a smartphone device, and provides raw instructions directly to the CPU. As it emulates hardware, CKB-VM is akin to a general purpose computer with no hard-coded cryptography. Any required cryptographic primitives can be installed by being deployed on the blockchain. Many upgrades can therefore be implemented without the need for hard forks. Furthermore, it enables greater interoperability with other blockchains as it can recognize different cryptographic keys and address schemes. The user experience is also streamlined by allowing users to use their existing preferred wallets instead of needing to install new ones.

Layer 2
Two layer 2 blockchains currently exist on Nervos Network: Godwoken and Axon. Godwoken is a blockchain protocol that uses a scaling solution known as optimistic rollup, and can be configured to run any virtual machine or consensus model. With this framework, larger numbers of transactions are processed and are then submitted in batches to layer 1 for subsequent verificatioon.. The current iteration of Godwoken runs the Ethereum virtual machine (EVM), allowing developers to use of tools and software developed for Ethereum while directly interfacing with Nervos and utilizing CKB. Axon is an EVM-compatible sidechain protocol optimized for higher transaction throughput.