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.
Set of all commit-chain users or accounts
Single user or account
: The current eon number
: Initial allotted balance
: The total received on the commit-chain by (from swaps and transfers)
: The total received by transfers on the commit-chain by
: The total received by swaps on the commit-chain by
: The total sent on the commit-chain by
: The total deposited by during eon
The total requested for withdrawal by
: Account address of
Symbols can be parametrized to refer to a specific asset token and/or during a specific eon. For example would denote the initially allotted balance for account of asset token during eon .
Common data type
We define some basic types needed across the NOCUST documentation
A commit-chain account is the account of user for asset token . An account has a unique address or public key . The owner of the account is the person knowing the private key.
We have the property:
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
|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)|
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.