Skip to content

Latest commit

 

History

History
42 lines (23 loc) · 1.83 KB

CONTRACTS.md

File metadata and controls

42 lines (23 loc) · 1.83 KB

Fuse Network Contracts

Contracts Schema

Consensus

This contract is responsible for handling the network DPos consensus.

This contract is storing the current validator set and choosing a new validator set at the end of each cycle.

The logic for updating the validator set is to select a random snapshot from the snapshots taken during the cycle.

The snapshots taken, are of pending validators, who are those which staked more than the minimum stake needed to become a network validator. Therefore the contract is also responsible for staking, delegating and withdrawing those funds.

This contract is based on non-reporting ValidatorSet described in Parity Wiki.

Block Reward

This contract is responsible for generating and distributing block rewards to the network validators according to the network specs (5% yearly inflation).

Another role of this contract is to call the snapshot/cycle logic on the Consensus contract.

This contract is based on BlockReward described in Parity Wiki.

Voting

This contract is responsible for opening new ballots and voting to accept/reject them.

Ballots are basically offers to change other network contracts implementation.

Only network validators can open new ballots, eveyone can vote on them, but only validators votes count when the ballot is closed.

Ballots are opened/closed on cycle end.

Proxy Storage

This contract is responsible for holding network contracts implementation addresses and upgrading them if necessary (via ballot approval).