architecture (1)
- Xythums Internal Ledger
- This ledger is what the latest state which is agreed by all Nodes
- When Xythum becomes permission less we might use RAFT for effective leader election ( Leader will be Sigag )
- Ledger has all history of To and Fro txs with zk commit
- User creates a Order (gateway address is added to utxo set and committed to chain )
- Nodes sign the Order ( utxo is commited to chain and tx is written as closed ) NO double spending
- Whole state will be recorded in Ledger
- epochs
- nodes claiming fee
- in and out txs
- validator set change
- Chain hault
- Whole state will be recorded in Ledger
Epochs are discrete time intervals in which nodes enter and exit the network, shards are initialized and destroyed, rewards are paid, and various settings can be adjusted. One of the primary purposes of the Beacon is to manage the transition from one epoch to the next. This involves (a) initializing new shards, and (b) destroying old shards.
Node Registry
THUM exists as an ERC20 on the Ethereum blockchain, and it is the only token currently used for bonding. As such, the bonding of THUM (and thus the creation of a new node) is done through an Ethereum contract known as the Node Registry. Nodes in the network observe events emitted by the Node Registry, and adjust their understanding of which nodes are entering/exiting the network, and at what time.
function enter(bytes nid)transfers the THUM- bond from the
msg.senderto the Node Registry in exchange for an NFT token that represents ownership of the node. Generally, we refer to the owner of the node as an operator. Thenidis a byte representation of the public cryptographic identity of the node (which is used by other nodes to authenticate messages). The time at which the node enters the network is recorded and emitted as an event. When seeing nodes enter the network, other nodes will begin accepting messages from the newly entered node at the beginning of the next epoch. function exit(bytes nid) onlyOperatorcan only be called by the holder of the NFT that represents ownership of the node identified bynid. The time at which the node exits the network is recorded and emitted as an event. After the minimum bond redemption period has passed, the holder of the NFT may then redeem the THUM bond. This period allows for outstanding proofs of malicious behavior to be submitted against the node. When seeing nodes exit the network, other nodes will continue accepting messages from the newly exited node until the end of the next epoch.function redeem(bytes nid, address recipient) onlyOperatorcan only be called by the holder of the NFT that represents ownership of the node identified bynid. If the minimum bond redemption period has passed since callingexit, the THUM bond will be transferred to therecipient. The NFT is destroyed, and proofs of malicious behavior can no longer be submitted against the node.
Rewards
Rewards are collected every time an asset is moved between two chains, and these rewards are kept in the reward pool. At the end of every epoch, a percentage of all funds in the reward pool is paid out to nodes and underwriters. The percentage is known as the reward payout factor and is always a percentage between 0-100%.
Settings
Epoch settings are adjusted by governance. Changes are activated at the end of the epoch in which the change is made.
- Epoch duration: ~24 hours. This value must be greater than 3 hours, and less than 12 weeks.
- Minimum bond: 100K REN. This value must be greater than 1K REN, and less than 100M REN.
- Minimum bond redemption period: ~2 weeks. This value must be greater than 3 epoch durations.
- Shard size: 34 nodes. This value must be greater than 6 nodes, and must always be 1 greater than a multiple of 3.
- Reward payout factor: ~50% per 4 weeks. This value must be greater than 0% and less than, or equal to, 100%.