Slashing: The punishment to a staker with misbehavior or lack of availability by reducing its funds.
Slash defer duration: The period of time starts from the timepoint of slashing. Within this time, the council can cancel slashing.
Isolated unresponsiveness: A type of unresponsiveness that is caused by an individual.
Concurrent unresponsiveness: A type of offense that is caused by a group of validators on purpose within a period of time.
Once a validator gets slashed, it goes into the state as an "unapplied slash". After each era, put on the list and the slash value is calculated for each validator. If a validator is reported for any one of the offenses, they will be removed from the validator set (chilled) and they will not be paid while they are out. They will be considered inactive immediately and will lose their nominators. They need to re-issue intent to validate and again gather support from nominators.
Slash Defer Duration: 12 Era. To protect their nominators, the validators can persuade the council to cancel the slashing. If there are more than (50% + 1) of the votes, the validators are removed from slashing at the end of era.
In case of having no deferring or having less than (50% +1) of votes for deferring, the slashes are applied and a value is deducted from the balance of the validator and all the nominators who voted for this validator. Values are deducted from the stash account of the slashed entity. Reserved balance can be slashed, but only after all the free balance has been slashed.
Security threat levels
The following levels of offense are defined:
- Level 1: isolated unresponsiveness, i.e. being offline for an entire epoch.
- Level 2: concurrent unresponsiveness or isolated equivocation.
When a validator is found guilty of misconduct:
- Generally no slashing, only chilling. When we use chilling as part of a punishment, it will disable the validator for the remainder of the current era and removes the offending validator from the next election:
- As a punishment to the validator, the validator won’t be able to perform payable actions, and won’t get paid while he is inactive.
- As a safeguard to protect the system and the validator themselves, we assume that the validator nodes remain unreliable until the validators give confirmation that the necessary checks are in place and they are ready to continue operating. Then they can bond again and re-confirm their candidacy in one era, to make sure they are online.
- As a safeguard for nominators. If a validator is heavily slashed, we should ensure that his backing nominators are aware of this. We should wait for them to give consent that they want to re-issue the nominated call and back him in the future, and not assume it.
- Note that even in case of isolated unresponsive, if the number of offline validators is larger than
threshold to force era, it still forces era.
Force era (force an era to end soon)
Threshold to force era= 17% * total of council members. Note that the result is rounded up when the decimal part > 0.5. An era is forced to end sooner when the number of offline validators reaches a level greater than
threshold to force era. For example, there are 4 validators in total →
Threshold= 17% * 4= 0,6 and it is rounded up to 1 → 2 validators offline in one epoch will force this era.
Timepoint of getting slashed and its consequence
Note that if validators are reported at a certain time point in one epoch, they are put on the slashing list at the end of this epoch.
- From 1st epoch to 4th epoch in one era:
- The validators are reported and removed from the validator election happening in the 5th epoch. It means that they are removed from the validators list in the next era.
- For cases of number of the offline validators which is greater than
threshold to force era: This case happens from the 1st epoch to the 4th epoch in the era N, the era N+1 will be forced to end soon.
- From the 5th epoch to the 6th epoch in one era:
- If the validators are reported at a certain time point in the 5th epoch, they are put on the slashing list at the end of this epoch in era N. So these validators are still counted in the validators' election happening in the 5th epoch. It means that they are still in the validator list of era N+1 and are slashed once again. Then they will be removed in the era N+2.
- For cases of a number of the offline validators which is greater than
threshold to force era: This case happens from the 5th epoch to the 6th epoch in the era N, the offline validator is slashed twice and the era N+1; era N+2 are forced to end soon.
Details on how we slash validators and nominators
When a validator is found guilty of misconduct, we slash the corresponding validator slot (validator plus nominators) a certain percentage of their stake (It is calculated in section
Slashing calculating). This means that validator slots with more stake will be slashed more GLCH. We do this to encourage nominators to gradually shift their support to less popular validators.
Reporters and their rewards
In general, we give a reward to the actor(s) who run the protocols necessary to detect the culprits. We usually limit rewards to 10% of the total amount slashed, with the remainder going to the treasury.
For every session, validators will send an "I'm Online" heartbeat to indicate they are online. If a validator produces no blocks during an epoch and fails to send the heartbeat, it will be reported as unresponsive. Depending on the repeated offenses and how many other validators were unresponsive or offline during the epoch, slashing may occur. Note that if less than 10% of all validators are offline, no penalty is enacted.
min((3 * (x - (n / 10 + 1))) / n, 1) * 0.07
For example: Total validators = 21 (n=21), reported validators= 4 (x=4)
Assume that Validator A with total staked amount = 100 GLCH :
Validator A - stake itself (50%): 50 GLCH
Nominator 1 (25%): 25 GLCH
Nominator 2 (10%): 10 GLCH
Nominator 3 (10%): 10 GLCH
Nominator 4 (5%): 5 GLCH
Slashing penalty= min((3 * (4 - (21/ 10 + 1))) / 21, 1) * 0.07 = 0.01= 1%. Note that 21/10=2,1. We just keep it equal to 2.
Slash value of validator pool A = 1% * 100 GLCH = 1 GLCH
+ Slash value of validator A = 1 * 50% = 0,5 GLCH
+ Slash value of nominator 1 = 1 * 25% = 0,25 GLCH
+ Slash value of nominator 2 = 1 * 10%= 0,1 GLCH
+ Slash value of nominator 3= 1 * 10%= 0,1GLCH
+ Slash value of nominator 4= 1 * 5%= 0,05 GLCH
A validator produces two or more blocks in the same time slot.
Slash for validator pool:
slashing penalty = min[(3 * x / n )^2;1]
x = offenders.
Offendermeans the validator is punished for misbehavior
n = total number of validators. Current setting on total validator = 21.
Unit: % (per total bond of all validators)
For example: Assume that there are 21 validators in total, including 29 awaiting validators. Total staked amount of A = 100 GLCH; the Total staked amount of B = 300 GLCH
1st turn: 2 validators (A, B) in the active set get slashed (x=2), then 2 validators are removed from the validators list.
slashing penalty= min [(3*2/ 21)^2),1]= min (0.0816,1) =0.0816= 8,16%.
Slash for validator pool A (including slashed validator and its nominator)= 8,16% * 100= 8.16 GLCH.
Slash for validator pool B (including slashed validator and its nominator)= 8,16% * 300= 24,48 GLCH.
2nd turn in the next epoch: 3 validators (A, B, C) in the active set get slashed (x=3), then 3 validators are removed from the validators list.
slashing penalty= min[(3*3/ 21)^2,1]= min (0.1836, 1)= 0.1836= 18,36%. Slash for validator pool= 18,36%* 300= 55,08 GLCH.
Slashing proportion for nominators and validators
The slash proportion is based on the proportion to the amount staked to the specific validator.
slash amount = Staked proportion * Slash amount of validator
Example: Validator A in 1st turn with total staked amount = 100 GLCH, slashing for validator pool A= 8,16 GLCH (calculated above).
Validator A - stake itself (50%): 50 GLCH
Nominator 1 (30%): 30 GLCH
Nominator 2 (20%): 20 GLCH
Then slash value is calculated as below:
- Validator A: 0,5 * 8,16 = 4.08 GLCH
- Nominator 1: 0,3 * 8,16= 2.448 GLCH
- Nominator 2: 0,2 * 8,16= 1.632 GLCH