Other attributes
If a validator shows harmful behavior, they will lose a percentage of their bonded or staked tokens. This is referred to as "slashing." If a user is actively nominating the misbehaving validator when a slash occurs, they will also lose a percentage of their tokens. This blockchain feature has been implemented to incentivize good behavior among users and simultaneously requires that they take appropriate measures in vetting the validators that their stake is delegated to.
Double signing refers to the submission of two signed messages for the same block by a validating entity (private key). This can occur if a node operator or infrastructure provider optimizes their node configuration to prevent downtime by having a backup entity operating simultaneously with a primary entity.
The particular rules of slashing vary by protocol and are individually defined. In many cases, a set percentage or fixed amount of a validator’s stake is lost if it fails to behave as expected. Some protocols apply a complete slashing of the stake or permanently remove the misbehaving validator from the group. As part of a security and decentralization incentive, some networks (such as Polkadot and ETH2) use "correlated" slashing, meaning the penalty corresponds to the percentage of total validators engaging in undesirable behavior at the same time.
Slashing will occur if a validator goes offline, attacks the network, runs modified software, or misbehaves in any other way. Isolated events of a validator going offline do not incur slashing. As per Polkadot's rules, if a validator stays offline for a prolonged period of time (the period varies depending on the network) they will get "chilled"—meaning they will stop acting as a validator and lose their nominators. Slashing for unavailability is triggered only if at least 10 percent of active validators go offline simultaneously, which could signify a coordinated attack on the network.
The percentage of the total stake lost depends on the level of the offense. In the Polkadot network, slashed tokens are added to a treasury, and from there they are distributed to community members' projects. Because validator pools with the larger total stake backing them will get slashed more severely than less popular ones, nominators are advised to relocate their nominators to less popular validators to reduce their potential losses.
On the Polkadot blockchain, offenses are categorized into four levels. However, these categories are not implemented in the code or system and are only meant as guidelines for different levels of offence severity.
- Level 1: Isolated unresponsiveness, i.e., being offline for the duration of one epoch (one loop of the whole training dataset). Level 1 cases are mostly treated with chilling, although slashing of 0.1 percent of the stake in the validator slot may occur.
- Level 2: Concurrent unresponsiveness or isolated equivocation. Level 2 cases of misconduct incite slashes of a small amount of the stake (up to 1 percent of the total stake), and chilling is also applied.
- Level 3: Misconduct of the third level are unlikely to be accidental but do not jeopardize the network's security in a significant way. Examples include concurrent equivocation or isolated cases of unjustified voting in GRANDPA. Misconducts in this category cause a moderately small amount of the stake to be slashed (up to 10%) and apply chilling.
- Level 4: Misconduct that poses a serious security or monetary risk to the system and shows mass collusion among validators. All or most of the validator's stake can be slashed (up to 100%). Chilling is also applied.
During every session, a validator indicates it is live by sending an "I'm online" signal to the system. If a validator fails to produce any blocks during an epoch and fails to send the signal, it is marked and reported as unresponsive. From that point, slashing may occur depending on the repeated offenses and how many other validators were unresponsive or offline during the epoch.
Validators are advised to have a well-architectured network infrastructure to ensure the node runs to reduce the risk of slashing or chilling. A high availability setup is desirable, preferably with backup nodes that kick in only once the original node is verifiably offline (to avoid double-signing and being slashed for equivocation). Slashing due to unresponsiveness is calculated using the mathematical formula min((3 * (x - (n / 10 + 1))) / n, 1) * 0.07, where x = offenders, n = total no. validators in the active set.
Blockdaemon, a company that helps businesses implement blockchain applications, was one of the first on the market to offer slashing insurance as a service. As part of the offering, Blockdaemon has designed a claims process that involves cooperation with the insurance carrier to determine the cause and amount of loss. This insurance policy can compensate Blockdaemon customers in the event that Blockdaemon experiences a system or security failure, causing a slashing or double signing event.