Concepts overview

Account Model


An account designates a pair of public key PubKey and private key PrivKey. The PubKey can be derived to generate various Addresses, which are used to identify users (among other parties) in the application


Every account must have some balance of db3 used to pay transaction gas fee


the Namespace belongs to account and they have a relationship of 1:N.


the Table which has schema and is used to store structure data belongs to Namespace


Account has the ownership of Namespace

Access Permission

Account has read or write permission of table in Namespace


Delegate can be granted Access Permission and delegate is also a Account


DB3 is a modular database network including three modules:

KV Storage Shard Chains

Every shard chain works as a kv storage engine and records the bills for each account

DVM Compute Layer

Every node in compute layer has two main functions
  1. 1.
    provide dvm execution service to client
  2. 2.
    validate the result of dvm execution in mempool

Lazy Settlement Chain

The Settlement Chain will settle all bills from storage shard chains every 10 minutes
According to the network role and tokenization process,
Kv Storage Shard Chains” and “Lazy Settlement Chain” will be released in testnet at first in 2022.

DVM ( Data virtual machine)

Data virtual machine is the smart contract execution module in DB3 network.

Transaction and Billing model


Mutation is the transaction of db3 and the insert and update operations will be packed into mutation. The features of Mutation are
  • batch insert kv pairs InsertKv
  • batch update kv pairs
  • batch delete kv pairs DeleteKv
  • support namespace
The problems that Mutation will solve are how to distribute mutation to the right network and how to avoid relay attack.
Mutation’s gas fee is charged by your credit based on the bytes of the operation.


Reading data from the storagement chain is defined as query. You can use query to read all data that you own.


Both the mutations and query session would be paid in the token DB3. But different from the ethereum‘ account/balance billing model, the gas fees are paid first by your account's credit line when a smart contract triggers a transaction. In other words, the transaction was not settled immediately after it occurred.
Every mutation and every query session would generate a bill. A bill would carry the information about the mutation or query sessions, like the mutation data values and the gas fee spent. Your credit balance charges the gas fee at first, and later the generated bill should be paid like the credit card payment. The difference from your credit card bill is that your bill in the DB3 network would not decrease to 0, even if you pay the bill, the bill details are maintained on the chain.