What is Slashing?

icon FOR
Photo - What is Slashing?
While it's common knowledge that Proof-of-Stake (PoS) blockchains incentivize their validators, the penalty mechanisms in place for their misconduct are less understood. This article delves into the concept of slashing, exploring its purpose and effectiveness.
Slashing serves as a punitive mechanism targeting validators whose actions contravene the operational rules of a blockchain. It's an integral part of the consensus mechanism, designed to deter rather than reward.

Proof-of-Stake Consensus Algorithm

Proof-of-Stake enables validator nodes to agree on the blockchain's state, fostering decentralization and enhancing security. Slashing is a mechanism specific to PoS blockchains. 

Developers aim to make fraudulent behavior by validators either impossible or economically unfeasible. The approach depends on the consensus model:

  • In Proof-of-Work, deterrence is achieved through the requirement of significant computational power;
  • In Proof-of-Stake, deterrence comes in the form of slashing.

Validators are responsible for storing transaction history, validating and adding transactions to blocks, and performing other actions to maintain network functionality. In exchange for their contributions, computational power, and time, they receive rewards in new coins.

The blockchain operates continuously, and any consensus disruption can lead to halts or other negative consequences. Thus, validators are motivated by both rewards and penalties, the latter deterring them from engaging in illicit activities.

Staking

Staking involves locking a specified amount of tokens within the network to participate in the consensus process, signifying a validator's commitment to lawful activities. Should a validator act improperly, their staked tokens are subject to slashing.
The role of staking and PoS operation principles. Source: shiksha.com

The role of staking and PoS operation principles. Source: shiksha.com


Networks independently determine the minimum token amount required for validator eligibility, such as:

  • BNB Smart Chain: 0,000 BNB;
  • Solana: 0.01 SOL;
  • Ethereum: 32 ETH.

Not everyone can meet these requirements or technically deploy their validator node. Hence, PoS introduces another role – the delegator. This is a user who delegates their tokens to a validator for consensus participation.

This approach lowers the staking entry barrier and promotes network decentralization. While delegators can't participate directly in the consensus, they are eligible to vote.

Delegators need to wisely choose a trustworthy validator, as they will also be penalized in the event of slashing.

Reasons and Consequences of Slashing

While the reasons for slashing vary across different blockchains, there are common causes that frequently recur:

  1. Validator Downtime: If a validator node fails to participate in the consensus process for a specified duration, the network perceives it as a reliability issue. Consequently, slashing is applied to such validators.
  2. Double Signing: To prevent slashing due to downtime, validators may operate an identical backup setup that can partake in consensus if the primary node fails. However, this raises the risk of double signing, where the same validator key signs a block twice.

The consequences of slashing include not only the loss of the validator status but also the forfeiture of staked tokens. The severity of the penalty depends on the cause of the slashing and varies across different networks.

Validator downtime typically results in a deduction of a certain number of tokens, whereas double signing could lead to a substantial loss of staked assets or even complete disqualification from participating in consensus.

Slashing on Ethereum

In September 2022, Ethereum transitioned entirely to a Proof-of-Stake consensus algorithm. It defined three specific behaviors that trigger slashing:

  • Proposing and signing two blocks for the same slot (a 12-second period allotted for block proposal);
  • Voting for both the source (the last block of the previous epoch) and target (the first block of the current epoch) checkpoints, where one attestation's checkpoints are inside or encompass the other's;
  • Voting for two different target checkpoints within the same epoch.

If any of these actions are detected, slashing is applied to the validator. As a result, 1/32 of their stake is burned (up to a maximum of 1 ETH), followed by a 36-day withdrawal period from consensus participation.
The lifecycle of an Ethereum validator. Source: attestant.io

The lifecycle of an Ethereum validator. Source: attestant.io

During this period, the validator's staked tokens gradually decrease. Not only do they forfeit rewards, but they are also fined approximately 8000 Gwei (0.000008 ETH) for each missed epoch (about 6.4 minutes), leading to a loss of around 0.07 ETH.

On the 18th day post-slashing, the validator pays a penalty. The amount depends on the total staked ETH by all validators subjected to slashing in the last 36 days. Naturally, as the number of such validators increases, so does the penalty amount.

This penalty, known as the correlation penalty, is calculated as follows:

  1. Sum the effective balances (the balance at the time of slashing) of all validators subjected to slashing over a 36-day period.
  2. Multiply this sum by PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX (which equals 3) and cap it by the total staking balance of all Ethereum validators.
  3. Multiply the slashed validator's effective balance by the result from Step 2.
  4. Divide the result from Step 3 by the total staking balance of all Ethereum validators.

Consider a scenario where a validator with a staking amount of 32 ETH signed two blocks for the same slot on February 1, 2024. 

In this case, slashing is applied, and they lose 1 ETH. Eighteen days later, it was found that during the 36-day period (18 days before and after the slashing was applied), there were 10 other dishonest validators detected in the ETH network. In this situation, the penalty amount would be higher compared to a scenario with only 5 such validators.

Inactivity Leak

If consensus is not achieved within four epochs, the inactivity leak protocol activates. 

To reach a consensus on the blockchain state, ⅔ of all validators must agree on the source (the last block of the previous epoch) and target (the first block of the current epoch) checkpoints. If more than ⅓ of validators are inactive, the remainder cannot "reach an agreement."

The inactivity leak gradually reduces the stake of inactive validators until the total number of such validators is less than ⅓ of the total stake of all consensus participants. 
The share of stake loss during the inactivity leak. Source: github.com

The share of stake loss during the inactivity leak. Source: github.com

Therefore, no matter the size of the inactive validator pool, eventually, they will control less than ⅓ of the total stake, enabling the rest of the validators to proceed with consensus.

Final Words

Slashing is an effective deterrent against violations by validators, safeguarding the network against both deliberate and unintentional actions. Its efficacy is evidenced by statistics.

From the launch of the Beacon Chain (Ethereum's Proof-of-Stake component) on December 1, 2020, to February 15, 2024, slashing has been applied 414 times. Given that the number of active validators in the network is 940,398, only 0.04% have experienced slashing.

avatar
Vlad Vovk
Author
Writes about DeFi and cryptocurrencies from a technological perspective.