In this document we describe and define the basics of the NOCUST smart contract operation mode. It includes time-progression, state of the commit-chain and protocol-constants. It follows the semantic of the NOCUST paper demonstration the security properties of the protocol.


Reference for implementers of client and operator applications.



P\mathbb{P} Set of all commit-chain users or accounts

Pi\mathbb{P}_i Single user or account PiP\mathbb{P}_i\in\mathbb{P}

ee: The current eon number

Ai(e)A_i(e): Initial allotted balance

Ri(e)R_i(e): The total received on the commit-chain by Pi\mathbb{P}_i (from swaps and transfers)

RipR_i^p: The total received by transfers on the commit-chain by Pi\mathbb{P}_i

RiaR_i^a: The total received by swaps on the commit-chain by Pi\mathbb{P}_i

Si(e)S_i(e): The total sent on the commit-chain by Pi\mathbb{P}_i

Di(e)\mathbb{D}_i(e): The total deposited by Pi\mathbb{P}_i during eon ee

Wi(e)\mathbb{W}_i(e) The total requested for withdrawal by Pi\mathbb{P}_i

addr(Pi)addr(\mathbb{P}_i): Account address of Pi\mathbb{P}_i

Symbols can be parametrized to refer to a specific asset token and/or during a specific eon. For example AiX(e)A^X_i(e) would denote the initially allotted balance for account Pi\mathbb{P}_i of asset token XX during eon ee.

Desired Properties


Technical Specification

Common data type

We define some basic types needed across the NOCUST documentation


A commit-chain account PiX\mathbb{P}_i^X is the account of user ii for asset token xx. An account has a unique address or public key addr(PiX)addr(\mathbb{P}_i^X) . The owner of the account is the person knowing the private key.

We have the property:

addr(PiX)=addr(PiY) addr(\mathbb{P}_i^X) = addr(\mathbb{P}_i^Y)

And therefore the same private key can back 2 accounts for different asset tokens.

The address MUST match the Blockchain address of the parent-chain. Addresses are 40 bytes long:

type address: Bytes40

Protocol constants

Name Description Location Value
BLOCKS_PER_EON Define the length of an Eon Smart-contract Constructor parameter
BLOCKS_PER_EPOCH Define the length Smart-contract BLOCKS_PER_EON/4
EONS_KEPT Number of recent eons kept on the contract state Smart-contract 3
DEPOSITS_KEPT Number of deposits kept in the contract state for each user (FIFO) Smart-contract 5
MIN_CHALLENGE_GAS_COST Minimum reimbursement gas price for withdrawals and challenges Smart-contract 510*9
GENESIS Genesis block of the commit-chain Smart-contract Set in constructor
OPERATOR Operator address Smart-contract Set in constructor
RESPONSE_GAS Quantity of gas (upper bound) required to respond to withdrawals. Used to calculate the fee to be paid when initiating a withdrawal request. Smart-contract 100100
BLOCK_CONFIRMATION Number of block-confirmations to credit deposits. Operator Depends on the security of the parent-chain (25-30 on Ethereum)

Time progression

The NOCUST protocol works by eon (or round). The length of an eon is defined by BLOCKS_PER_EON which is set in the constructor of the NOCUST contract. The eon length is fixed for the lifetime of the NOCUST instance. Across the system an important variable to consider is the current eon number. It is equal to the rounded down value of (current_block - GENESIS) / BLOCK_PER_EON + 1. the variable current_block is the current block number of the parent chain.


  • Initial document - 15.09.2019
  • Added time progression - 30.09.2019

All content herein is licensed under GPL License.

results matching ""

    No results matching ""