Digital Currency News >CKB > In-depth understanding of CKB token and Cell model

Related Articles

ViewCKBAll Articles
0
CKB
0
Step 1: Enter the CKB/USDT spot trading page
0
Step 2: Enter the order unit and quantity, then click Buy/Sell

In-depth understanding of CKB token and Cell model

2024-09-20 15:55:57

In the world of blockchain, CKB (Common Knowledge Base), as the native token of the Nervos network, plays a crucial role. In order to better understand CKB, we need to delve into its core concept - the Cell model. This article will use the "box model" to simplify this complex concept and help readers understand the operating mechanism of CKB more clearly.


What is the Cell model?

The Cell model can be regarded as a data structure, which visualizes the storage and transfer process of CKB as "boxes". Each box not only stores CKB, but can also store contracts, tokens and other data. We can understand a Cell as a drawer containing our assets and information.

Construction of the box: Assume you have 1000 CKB in your CKB wallet. To store these CKBs, you need to use 61 CKBs to build a box, into which the remaining 939 CKBs are placed. It is important to note that there will never be less than 61 CKB in any address, as this will not allow a full box to be built.

Transfer Process: When making a transfer on CKB, you are actually taking apart and building the box. The incoming CKB represents taking apart a box, while the outgoing CKB represents building a new box.

In this way, we can understand the scarcity of CKB, because the construction of each box requires a certain amount of base.


components of the box

To further understand the Cell model, we need to understand the four main components of each box:

Capacity: The number of CKB indicating the box itself and all its contents.

Lock Script: Define the owner of the box to ensure that only those with the private key can access the box.

Type Script: Marks the box type and describes its purpose.

Data: stores specific information related to the box.

The minimum composition of the box: Taking the smallest CKB box as an example, its capacity requires 8 bytes. The locking script uses the common secp256k1 encryption algorithm and occupies 53 bytes. Therefore, a minimal Cell requires 61 CKB.


For the Nervos DAO box, the minimum composition requires 102 CKB. Its composition is as follows:

Capacity: 8 bytes

Lock script: 53 bytes

Type script: 33 bytes

Data: 8 bytes

This means that the Nervos DAO box not only stores CKB, but also requires additional space to identify its type.

In-depth analysis of the composition of the box: Capacity is the basis for storing CKB in the box and identifies the total amount of the box.


lock script

The locking script determines who can unlock the box. The encryption algorithm currently used is secp256k1, which is the same as Bitcoin and Ethereum. However, CKB allows the encryption algorithm to be changed without a hard fork, which provides future flexibility.

Type script: Type script is used to mark the purpose of the box. For example, a box that stores CKB is labeled CKB, while a box that stores Nervos DAO is labeled Nervos DAO. In the future, CKB will also support more types of boxes, such as trading boxes for decentralized exchanges.


data

The data section can store all information related to the box, including details of encryption algorithms, locking scripts, and type scripts. This provides flexibility to users, allowing them to customize the contents of the box according to their needs.

Application scenarios of CKB: By understanding the Cell model, we can see the broad application potential of CKB. In addition to storing and transferring CKB, users can also create and manage various types of assets on CKB. For example, users can issue custom tokens or trade them on decentralized exchanges.

Implementation of decentralized exchange: Through type scripts, users can mark a box as a sale box and fill in the sale information, such as box volume, unit price and expiration date. This mechanism makes decentralized transactions on CKB possible, and users can conduct transactions without relying on a centralized platform.


in conclusion

Through the "box model" and the four components of Cell, we can have a deeper understanding of the operating mechanism of the CKB token. CKB is not only a tool for storing and transferring value, but also a flexible ecosystem that supports various types of assets and applications. As their understanding of the Cell model deepens, users will be able to better leverage the potential of CKB and participate in this decentralized future.

Disclaimer:

1. The information does not constitute investment advice, and investors should make independent decisions and bear the risks themselves

2. The copyright of this article belongs to the original author, and it only represents the author's own views, not the views or positions of HiBT