Creditcoin Docs
Creditcoin Docs
  • What is Creditcoin
    • CTC Token 101
    • Acquiring Creditcoin Assets
  • SwapCTC Quick Guide
  • Wallets
    • How to Connect Your Wallet to Creditcoin
      • Polkadot-JS Extension
      • Metamask
      • Command-line Interface
        • Subkey
        • Creditcoin CLI
    • Advanced
      • Substrate & EVM accounts
      • Proxy Accounts
        • Setting up a Staking Proxy Account
        • Setting up a Validator
    • Using Testnet Faucet
  • Staking
    • Bonded Tokens
    • Validator Elections
      • Elections Example
    • Eras and Sessions
    • Staking Rewards
    • Slashing
  • Nominator Guides
    • Nominating with Staking Pools
      • Choosing a Pool
      • Joining a Pool
      • Creating a Pool
      • Exiting a Pool
      • Managing a Pool
    • Nominating without Staking Pools
    • Claiming Rewards
  • Validator Guides
    • Minimum requirements
    • Using a Docker container
    • Stake using Creditcoin CLI
  • EVM-compatibility
  • Smart Contract Guides
    • Creditcoin Endpoints
    • Deploying contracts with Remix
    • Hardhat Smart Contract Development
    • Creating Dapps with ethers.js
  • Environments
    • Mainnet
    • Testnet
  • Releases
  • LEGAL
    • Terms of Use
    • Privacy Policy
Powered by GitBook
On this page
  • Nomination
  • Winner selection
  • Stake Distribution
  • Block Production Slot Distribution
  1. Staking

Validator Elections

The validator election process that Creditcoin implements involves three distinct steps: nomination, winner selection, and stake distribution.

Nomination

In the first step, validators mark themselves as candidates, after which nominators can decide to support them with their stake.

Winner selection

Winning validators are selected by aggregating the total staked CTC that is supporting them (a nominator voting for 2 validators with 10 CTC gives 10 votes to each). The top 100 validators with the highest number of CTC backing them are elected and become part of the active set for the upcoming era.

Stake Distribution

While the staked CTC is counted multiple times to decide winners, it is then distributed between elected validators once the era begins. While there is no “right” way to distribute these tokens, Creditcoin uses a process called Phragmén to optimize for three things:

  • Maximize total amount at stake

  • Maximize stake behind the minimally staked validator

  • Minimize the variance of stake among validators

By optimizing for these three things, Creditcoin’s NPoS system aims to ensure that validator rewards are as fairly distributed, based on staked CTC, as possible, given the non-linear stake to reward ratio.

Block Production Slot Distribution

Once the network decides on the active validator set, it decides who can produce blocks and when. Two different mechanisms are used to distribute block production slots: BABE and Aura.

BABE

BABE (Blind Assignment for Blockchain Extension) is the block production mechanism that runs between the validator nodes and determines the authors of new blocks. BABE assigns block production slots to validators according to stake and using a Verifiable Random Function. Slots are discrete units of time, approximately 15 seconds in length in Creditcoin. Validators participate in a lottery for every slot, which will inform whether or not they are the block producer candidate for that slot. Due to the specifics of the lottery, multiple or no validators can be selected for a slot, resulting in either a race condition or an empty slot (inconsistent block time).

Aura

Aura is a deterministic and much simpler process to distribute slots. Aura’s election mechanism is not private so it is not secure against an adaptive adversary. It can be targeted by DDOS attacks because validators for specific slots are known. Creditcoin uses Aura to fill empty slots generated by BABE.

PreviousBonded TokensNextElections Example

Last updated 11 months ago