Zedxion Smart Chain(Zed20) Documentation
Choose Language
Zedxion Smart Chain(Zed20) Documentation
  • Summary
  • DOCUMENTATION
    • Learn about the ZEDXION Platform
      • ZEDXION Overview: vision, strategy and platform components
      • The ZEDXION Blockchain
        • Discovering the Network
        • ZEDXION Consensus
        • Delegation through Staking with Validators
        • Ethereum (EVM) Compatibility and Smart Contracts
        • Boosting ZEDXION’s Scalability
      • ZEDX Сoin
        • ZEDX Coin Economics
        • ZEDX Coin Wrappers
        • ZEDX on Other Chains
      • Interoperability
      • ZEDXION Governance and Development
        • ZEDXION Assembly
      • Wallets supporting ZEDXION
    • ZEDXION for Business
    • Things you can do on ZEDXION
      • Interacting with the ZEDXION Blockchain
      • ZEDXION Ecosystem
      • Community
      • Grants and Bounties
    • ZEDXION Mobile Infrastructure Use Cases
  • Developers
    • Network Details
      • ZEDXION Mainnet
      • ZEDXION Testnet
      • ZEDXION Faucet
      • Network Upgrades
        • Upgrade Guide
        • Upgrade Guide (explorer nodes)
        • Block 13,800,000 Fork
        • FIP's
    • Consensus
      • Stake, Delegate and Withdraw
      • Vote
      • End-of-Cycle Flow
      • Contract Addresses
    • Resources & Tools
      • TheGraph
      • WalletConnect on Zedx
    • Important smart contracts
      • Zedx Token
      • Zedx Dollar
      • Major Deployed Contracts
      • Bridges
        • Ethereum ↔ Zedx GoodDollar Token
        • Ethereum ↔ Zedx ZED20 Tokens
        • BSC ↔ Zedx BNB
        • BSC ↔ Zedx Native
        • BSC ↔ Zedx ZED20
        • Ethereum ↔ Zedx Native
    • How to become a validator
      • Getting started as a validator
    • Zeddex Contracts v2-v3 Zedx
    • Zeddex Contract v2-v3 BSC
    • API of ZedDex
  • Links
    • Discord
    • Facebook
    • GitHub
    • LinkedIn
    • Medium
    • Telegram
    • Twitter
    • YouTube
    • instagram
    • Slack
    • Zedxion Coin
    • Zedxion Exchange
    • Zedcex Exchange
Powered by GitBook
On this page
  • Consensus
  • Block Reward
  • Voting
  • Proxy Storage
  1. Developers

Consensus

PreviousFIP'sNextStake, Delegate and Withdraw

Last updated 6 months ago

Consensus is a fault-tolerant mechanism that is used in blockchain systems to achieve the necessary agreement on the single state of the network. Zedx network is using a (DPoS) consensus model. DPoS is a variation of consensus. In PoS there are a set of validators that are responsible for keeping the network updated and validating the network's state. They do this in turns, every validator has their turn in line. On their turn the validator updates the network's state, and the rest of the validators check that the update is valid.

Consensus contract is used to manage the list of the network validators and delegators

BlockReward contract is calculates the reward amount that validators and delegators will receive on each block validation. The reward size is proportional to validator's stake.

With Voting contract validators are vote on various changes on these 3 base level contracts. All those contracts are proxied with implementation that handles the logic. The implementations can be changed only by the Voting process.

The bridge is used to transfer the Zedx native token between Zedx and Ethereum networks.

Consensus

This contract is responsible for handling the network DPos consensus. The contract stores the current validator set and chooses 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 are taken 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.

Stake amount for a validator is the sum of staked and delegated amount to it's address.

minimum stake amount = 10,000 Zedx token

cycle duration blocks = 57600 (approximately 2 days)

Block Reward

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

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

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, everyone can vote on them, but only validators votes count when the ballot is closed.

Ballots are opened/closed on cycle end.

max number of open ballots = 100

max number of open ballots per validator = 100 / number of validators

minimum ballot duration (cycles) = 2

maximum ballot duration (cycles) = 14

Proxy Storage

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

This contract is based on non-reporting ValidatorSet .

This contract is based on BlockReward .

0xf39f8f3223aDB78F87836eeD365ca858D876873a
described in Parity Wiki
0xd483605703A18Ce5CDac692B60E41c922a8A3b8E
described in Parity Wiki
0x1c5ECaB05db92524118e7d95C45b3c121571834E
0x9b66D237552d25Bc7942eF67832663dc264c926B
Delegated Proof of Stake
Proof of Stake