The Cell Model — A Generalized UTXO Model

Nervos Network
Nervos Network
Published in
3 min readApr 7, 2023

--

This article will explain in detail Nervos’ generalized UTXO model- the Cell model

The Cell model combines the best of 2 worlds-the programmability of the Account model with the scalability & flexibility of UTXOs

It’s abstract nature provides devs & users new possibilities

An interesting caveat of the Cell model is that it’s focused on state (on-chain data)

Cells contain arbitrary data, which could be simple, such as a token amount and an owner, or more complex, such as code specifying verification conditions for a token transfer.

CKB’s virtual machine (CKB VM) executes scripts associated with cells to ensure the integrity of transactions.

In addition to storing data of their own, cells can reference data in other cells, allowing for assets and the logic governing them to be separated

This is in contrast to Account-based blockchains, where on-chain data is an internal property of a smart contract & is accessed through smart contract interfaces.

On CKB, cells are independent state objects that are owned by users & can be referenced and passed around directly

Consequently, Account Abstraction comes by default on CKB, providing a superior experience for users & flexibility for developers

The Cell model is abstract, where cells are simple storage without any internal structure. Their layout is completely left to developers to customize

Moreover, the Cell model perfectly complements Nervos’ modular design, allowing the capabilities of CKB to evolve without disruptive hard forks

Almost all algorithms, cryptographic primitives, and data structures can be implemented on CKB as scripts stored within cells.

This means that cryptographic primitives aren’t hardcoded or baked into the virtual machine like in all other blockchains, making CKB the most flexible and future-proof Layer 1 in the blockchain industry.

In other words, dApp developers on CKB can use all crypto primitives, including Schnorr signatures, BLS signatures, zkSNARKs, and zkSTARKs, to build their dApps without affecting anything else running on-chain.

To see this in practice we can take the case of the threat of quantum computers breaking commonly used cryptography.

CKB is the only chain that can allow users to move their assets to be secured by quantum-resistant cryptography without requiring a hard fork, permissionlessly.

This is due to how the Cell model works. All assets, including user-defined tokens & NFTs, are first-class citizens on-chain

Assets aren’t subject to overriding control by smart contracts. They’re secured by conditions specified by their owners.

Token contracts only store a token’s operating logic, such as “issuance cap=1,000,000” or “inflation rate=50 tokens per block”

A user’s asset balance “Alice owns 100 tokens” is contained in a cell controlled by Alice

This significantly increases security of assets held on CKB

In contrast, if a hacker manages to break a smart contract controlling an ERC-20 token (code is law), they can steal/alter token owners’ balances

On CKB, this isn’t possible. Assets are not controlled by smart contracts but owned by users directly.

In summary:

→ On CKB, a cell is a “first-class citizen,” meaning user assets are solely the property of a user, not subject to loss via a smart contract

→ A cell is simply storage without any internal structure, with its layout completely left to developers.

--

--