## Synopsis

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.

### Motivation

Reference for implementers of client and operator applications.

### Definitions

#### Formalism

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

$\mathbb{P}_i$ Single user or account $\mathbb{P}_i\in\mathbb{P}$

$e$: The current eon number

$A_i(e)$: Initial allotted balance

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

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

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

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

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

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

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

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

N.A

## Technical Specification

### Common data type

We define some basic types needed across the NOCUST documentation

#### Accounts

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

We have the property:

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

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

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
EXTENDED_BLOCKS_PER_EPOCH Smart-contract BLOCKS_PER_EON/3
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.

## History

• Initial document - 15.09.2019
• Added time progression - 30.09.2019