# CratD2C SmartChain Core Staking Description:

[How to become a Validator 1](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.sat1wh80qtg3)

[Choosing Validators for blocks producing 1](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.iqpmfw1gcrnz)

[Validator rewards 2](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.nib8szpk355s)

[Validator penalties 2](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.lzjozed3ql05)

[Validator & Stop-list 3](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.97olt2ahlrmc)

[Validator deposit and rewards management 3](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.3h4toip3ii9n)

[How to become a Delegator 4](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.ny8ppgkp80mt)

[Delegator rewards 4](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.n5gmakt4uttn)

[Delegator penalties 5](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.jrbjiihtmyxl)

[Delegator deposit and rewards management 5](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.goeunm5j70ww)

[Delegator & Stop-list 5](https://docs.google.com/document/d/1UKfZRH_-7qjQu1arjyTci847_Zw_qBFDsadIcfHKSeE/edit?tab=t.0#heading=h.j4cll5txx0se)

##

## How to become a Validator

To become a Validator you need to:

1. Run a CratD2C node: A separate machine running a node open to all nodes on the CratD2C DPoS network.
2. Make a deposit: Set the reward commission and stake at least 100,000 CRAT coins into the staking contract.&#x20;

As soon as your deposit is confirmed, you will become an active (HEALTHY) validator. Any user will be able to delegate CRAT to your validator.

Rewards & Commissions:

Validator commission is the reward percentage (set by the validator, from 5% to 30%) which is deducted from the total rewards for validating transactions and generating blocks. This deducted amount is the validator’s reward share.

Delegator’s rewards share is the remaining total rewards distributed proportionally among the delegators based on their stake.



## Choosing Validators for blocks producing

Block producers are a committee selected from the validator pool on the basis of their stake, which happens at regular intervals. Here’s the breakdown of how the block producers are selected:

1. **Initiating:** The elections are initiated by the node that creates a block which includes the next election.\

2. **Pre-selecting:** All nodes that want to become validators take part in the election. To choose the candidates, the total deposit amount of each validator is calculated as a cumulative value: validator deposit and delegators deposits of this validator. Up to top-100 candidates with the biggest cumulative deposits take part in the elections.\

3. **Sorting:** pre-selected candidates are ranked in ascending order of their cumulative deposits.\

4.  **Range Assignment:** Each candidate is assigned a number range from 1 to 1000 proportional to their stake. The range cannot be less than 1.\
    For example:\


    1. The network currently has 4 validators with corresponding cumulative deposits:
    2.
       1. A: 15M CRAT,
       2. B: 7M CRAT,&#x20;
       3. C: 3M CRAT,&#x20;
       4. D: 1M CRAT.
    3. Now we need to sort these validators, the result is: \[D, C, B, A]&#x20;
    4. Calculating the number range for each validator:\
       Range length:\
       length = roundUp( cumulative depositii=1ncumulative deposits\*1000 , 0)\
       Now, when we know the range length of each validator, we consistently calculate the number range:

    &#x20;\[D: {1-38}, C:{39-153}, B:{154-422}, A:{423-1000}]\
    \


    &#x20;5\.  **Random Selection:** A random number within the total range is generated. The candidate whose range includes this number becomes a validator.\
    \
    6\. **Iterations:** The process is repeated until the required number of validators is selected. The maximum is 18, so, for each epoch, there can be not more than 18 block producers.\


    7\. **New Epoch:** Elected validators participate in block production in the next epoch.\
    \


    **Validator rewards**

    Validators of the CRAT Blockchain receive 2 types of rewards:

    * Fixed APR reward (the reward based on the APR which is accrued until the validator gets into the stop-list. 15% APR for validator fixed reward.);
    * Variable reward (percentage of transaction fees and block generating rewards).

    All the rewards are CRAT native coins, and Variable reward is paid out each 3 days (recommended) based on the transaction fee amount.\
    \
    **Validator penalties**

    The validators are slashed each epoch for malicious activities, such as double-signing or downtime. The elected validators who missed at least 25% of block validations are penalized. \
    When the validator is slashed, the trial period of 3 months starts for this validator. If the validator is not slashed again during this trial period, a fixed amount of 100 CRAT coins is withdrawn from his deposit upon the next slashing. And if the validator gets slashed during the trial period, all of his fixed APR reward accumulated from the last slashing (trial period start date) and a fixed amount of 100 CRAT coins are also withdrawn from the deposit amount as a penalty.

    Each time a validator gets slashed, all of his delegators also lose 5% of their deposit as a penalty within this validator. All slashing penalties are collected at the network slashing receiver address.

    \
    \
    **Validator & Stop-list**

    Validator can be sent to the stop-list in 2 cases:

    1. The protocol detects any malicious activity or misbehavior, gets slashed, and his deposit gets below the minimum deposit limit;
    2. The validator requests withdrawal from the network by himself.



    In any case, the following takes place:

    1. The rewards are not accrued from the stop-list moment (both fixed and variable);
    2. The Withdrawal Cooldown period countdown starts (7 days for validators). Withdrawal Cooldown is the period of time from the stop-list event after which the validator is able to withdraw his deposit and leave the network;
    3. All delegators of this validator are automatically sent to the stop-list (the withdrawal is requested and the cooldown period starts).

    \


    There are 2 ways for validator to leave the stop-list:

    1. Revival: a validator cancels the withdrawal request.
    2.
       1. If a validator’s deposit is lower than minimum (100,000 CRAT), he should add more CRAT coins to his deposit to make it bigger or equal to the minimum.
       2. If the active validators limit is reached (101 validators), this validator can’t revive.
       3. As soon as a validator is successfully revived, he continues receiving the fixed APR rewards.
    3. Exit: withdraw the deposit and exit the network.
    4.
       1. To fully exit the network, a validator should wait for both Withdrawal Cooldown (7days)  and Claim Cooldown (14 days) to finish.
       2. When a validator exits the stop-list, all of his delegators exit automatically (the withdrawal is requested and the cooldown period starts).

    A validator can claim his accumulated rewards while being in the stop-list, but can’t restake it.\
    \
    \
    **Validator deposit and rewards management**

    First of all, when you are managing you validator deposit, you should remember the cooldown periods:

    * Withdrawal Cooldown - the period of time from the stop-list event after which the validator is able to withdraw his deposit and leave the network, which is 7 days for validators.
    * Claim Cooldown - the period of time from the last reward claim after which the validator is able to claim his freshly accumulated rewards, which is 14 days for validators.

    \


    Any validator can increase his deposit anytime while NOT being in the stop-list. When a validator is in the stop-list, he can increase his deposit during the revival (when canceling the withdrawal request).

    Any validator is able to restake his rewards, which means the fixed and variable accumulated reward (not claimed previously) is claimed and added to the current deposit within a single transaction. For that to happen, 3 conditions must be met:

    * a validator is not in the stop-list;
    * the accumulated reward is above zero;
    * the Claim Cooldown period is finished.

    \


    If a validator is in the stop-list, and both cooldown periods are finished, any user can execute the unstake for him, this way the validator will exit the network.

    \


    When Validator unstakes, all his delegators get unstaked too. Validators and delegators receive their deposits and rewards to their wallet.\
    \
    \


    ## How to become a Delegator

    To become a delegator you need to:

    1. Choose a validator (or validators) you want to deposit to. Take a look at the commission of the validator. The lower commission is set, the bigger your reward share is;
    2. Make a deposit (or stake) of at least 1,000 CRAT tokens to the validator (or to each validator if you choose multiple).

    Once you’ve made a deposit, you will start receiving the delegator rewards.

    \


    ## Delegator rewards

    Delegators of the CRAT Blockchain receive 2 types of rewards:

    * Fixed APR reward (the reward based on the APR which is  accrued until the delegator gets into the stop-list. 13% APR for delegator fixed reward.);
    * Variable reward (the commission: percentage of validators variable reward).

    \


    All the rewards are CRAT native coins, and Variable reward is paid out each 3 days (recommended) based on the transaction fee amount.

    \


    ## Delegator penalties

    Each time a validator gets slashed, all of his delegators also lose 5% of their deposit as a penalty within this validator. All slashing penalties are collected at the network slashing receiver address.

    ## Delegator deposit and rewards management

    First of all, when you are managing you delegator deposit, you should remember the cooldown periods:

    * Withdrawal Cooldown - the period of time from the stop-list event after which the delegator is able to withdraw his deposit and leave the network, which is 5 days for delegators.
    * Claim Cooldown - the period of time from the last reward claim after which the delegator is able to claim his freshly accumulated rewards, which is 30 days for delegators.

    \


    Any delegator can increase his deposit anytime while NOT being in the stop-list. When a delegator is in the stop-list, he can increase his deposit during the revival (when canceling the withdrawal request).

    Any delegator is able to restake his rewards, which means the fixed and variable accumulated reward  is claimed and added to the current deposit within a single transaction. For that to happen, 3 conditions must be met:

    * a delegator is not in the stop-list;
    * the accumulated reward is above zero;
    * the Claim Cooldown period is finished.

    \


    In case a validator or delegator requests withdrawal, the cooldown period start is defined as:

    1. if only a validator has requested withdrawal, the delegator cooldown starts the same time;
    2. if only a delegator has requested withdrawal, the delegator cooldown starts the same time;
    3. if both delegator and validator have requested withdrawal, the earliest of the two times is the delegator cooldown start.

    \


    If a delegator is in the stop-list, and both cooldown periods are finished, any user can execute the unstake for him, this way the delegator will exit the network.

    \


    When Validator unstakes, all his delegators get unstaked too. Validators and delegators receive their deposits and rewards to their wallet.

    ## Delegator & Stop-list

    Any delegator can be sent to the stop-list in the following cases:

    1. Validator was sent to the stop-list.
    2.
       1. Wait for the cooldown finish and withdraw;
       2. Wait for the validator to revive;&#x20;
       3. Wait for somebody to call the unstake for him.
    3. Delegator’s deposit has decreased below the minimum deposit amount (1000 CRAT).
    4. Manually call request withdrawal.&#x20;

    \


    In case 2 and 3, a delegator can exit the stop-list in 2 ways:

    1. Revival: a delegator cancels the withdrawal request.
    2.
       1. If a delegator’s deposit is lower than minimum, he should add more CRAT coins to his deposit to make it bigger or equal to the minimum.
       2. As soon as a delegator is successfully revived, he continues receiving the fixed APR rewards.
    3. Exit: withdraw the deposit and exit the network.
    4.
       1. To fully exit the network, a delegator should wait for both Withdrawal Cooldown and Claim Cooldown to finish.

    A delegator can claim his accumulated rewards while being in the stop-list, but can’t restake it.

    If a delegator is already in the stop-list, he still may get penalized if his validator gets slashed.\
    \
    \
    \


    \


    \


    \


    \
