What is Slashing?
Slashing is a severe penalty imposed on proof-of-stake (PoS) blockchains designed to disincentive dishonest and malicious validator activity. Slashing results in the loss of a validator’s staked cryptocurrencies and their forceful removal from the network.
Slashing Explained: Protecting PoS Blockchains
Slashing is a key mechanism coded into certain PoS blockchains like Ethereum that is designed to prevent attacks on the network. To fully grasp the definition of slashing, we need to understand the role that validators play in PoS blockchains.?
Validators are critical members of PoS blockchains. They are responsible for processing and verifying transactions and adding new blocks to the chain – both of which are fundamental functions of a blockchain.
Now imagine that your local bank goes rogue and begins creating false transactions and defrauding its customers. This is what slashing looks to prevent.?
Because validators perform such critical functions, they are obligated to stake a certain amount of cryptocurrency (32 ETH on Ethereum, equivalent to over $57,000 at the time of writing) as collateral in order to get the chance to become a validator.
If a validator is caught performing activities that are harmful to the network, their staked collateral is slashed. Slashed validators are removed from the network.
How Can Validators Get Slashed?
According to Ethereum, there are three ways why a validator could get slashed. They are:
- Proposing and signing two different blocks for the same slot.
- Attesting to a block that “surrounds” another one, effectively changing history.
- By “double voting” by attesting to two candidates for the same block.
How Does Slashing Work?
Here is an example of slashing implemented on the Ethereum blockchain.
- If the aforementioned activity is detected, 1/32 of the accused validator’s staked ETH is immediately burned. The burn is limited to a maximum of 1 ETH.
- After this, a 36-day removal period begins. During this period, the validator’s stake gradually bleeds away.?
- On the 18th day, an additional penalty is imposed whose magnitude scales according to the total staked ETH of all slashed validators in the 36 days prior to the slashing event. If more validators have been slashed recently, then the 18-day penalty will be higher. This midpoint penalty is called the correlation penalty.
- Slashed validators will see a gradual loss of their staked ETH over the 36-day period, after which they will be able to exit the network and withdraw any remaining stake balance.??
Slashing and Inactivity Leak
Like slashing, an inactivity leak is designed to protect PoS blockchains. On Ethereum, if the consensus layer fails to achieve finality within four epochs, an emergency protocol called “inactivity leak” is activated.
Before we proceed any further, let’s briefly understand what ‘finality’ and ‘epoch’ means.
Finality refers to the guarantee that a block (and the transactions in it) cannot be altered or removed from the blockchain.
Epoch refers to the time taken for a certain number of blocks to be completed on a blockchain (the time taken to complete 30,000 blocks makes one epoch on Ethereum).
Inactivity leak is activated to create conditions so that the blockchain can achieve finality. Finality can only occur when a supermajority of validators – representing ? of the total staked ETH – agree on the state of the blockchain. Now if ? of total validators are offline or are not submitting correct attestations, then achieving finality becomes difficult.?
In such an event, an inactivity leak will cause the stake of offline validators to bleed away until less than ? of staked ETH is controlled by inactive validators. This will allow the active validators to finalize the blockchain.
“The loss of stake is a strong incentive for inactive validators to reactivate as soon as possible,” said Ethereum in a blog post.
Slashed validators, awaiting their exit from the network, will be subjected to inactivity leak bleeding penalties.
Do All PoS Blockchains Impose Slashing?
No, not all PoS blockchains implement slashing. Some popular PoS chains that do not implement slashing include Avalanche and Cardano.
Slashing has been a divisive topic within the PoS blockchain sector. Critics have cited the risk of innocent validators seeing their stake slashed for “honest mistake” such as running outdated software. Validators may also be penalized for not partaking in validating activity due to unforeseen events like loss of keys.
The Bottom Line
Slashing remains a topic of debate and controversy among blockchain experts. The slashing mechanism on PoS chains is not perfect.
There are adverse slashing side effects that PoS chain participants are suffering from. However, one can choose to look at it in a positive light as a cost to keep PoS chains secure.
Without such stringent action, it is difficult to keep a network of thousands of unknown and decentralized entities in check.?