Ethereum Staking & Slashing
Posted: Fri | Mar 5, 2021
TheoryETH 2.0 Staking and Slashing Penalties
There is a lot of buzz around the gradual upgrade of the Ethereum network to proof of stake. Proof of stake provides new benefits over proof of work blockchains in terms of efficiency and speed. Transactions (and smart contracts in Ethereums case) run faster in networks that implement proof of stake, or master nodes.
These kinds of networks generate competition between nodes based on the amount of coins staked, rather than the increasingly costly computations that proof of work requires. Some of my favorite projects that incorporate proof of stake are PIVX, ETH, and DASH. If you send a transaction on the PIVX network, you will quickly see the efficiency boost that makes it worthwhile.
On proof of stake networks, there also exists a potential penalty that has no counterpart on networks that utilize mining. Implementations vary drastically between projects, and understandably there is a lot of confusion on what the actual “slashing penalties” are for Ethereum.
Purpose of slashing penalties
Slashing penalties on proof of stake networks exist to deter malicious attacks. If a staking node is caught by other nodes in an attempt to defraud the network, the guilty node is penalized by destruction or seizure of the tokens that they stake.
Penalties for attempting to double-spend (proposer slashing)
In Ethereum 2.0, a block is produced every 32 slots, or every 1 epoch. If an Ethereum node votes on two separate blocks during the same epoch, they will incur a slashing fee.
Penalties for switching the blockchain version to which one attests (attester slashing)
Another slashable action is if an Ethereum node changes the version of the blockchain to which they attest.
Penalties from going offline
The two cases above are clear attempts to attack the Ethereum network, and are addressed by slashing. But there is another action which incurs penalties that are not considered slashes.
If an Ethereum node goes offline, and blocks on the network are finalizing, you will lose x% of your deposit over a year, where x is equal to the current interest rate. Essentially, you will lose the amount that you would have gained had your node remained online.
If blocks are not finalizing while your node is offline, meaning that more than 33% of all nodes are offline, the rate of the penalty is increased, so that you will lose 60% of your deposit after only 18 days.
Going offline is not an “attack” on the Ethereum network, but it is a behavior which is punished, to incentivize nodes to stay online, and keep the network strong. This is why the penalties for going offline are not considered “slashing penalties”.
Effects of slashing penalties
If one was so nefarious as to attack the Ethereum network, here is the fate they will meet:
Once caught, the node will be forced to exit the Beacon Chain 8,192 epochs into the future from when it was caught. During this time the node will slowly lose ETH as if it were offline for all 8,192 of those epochs. There will also be a penalty halfway through the exit process, on epoch 4,096, that is proportional to how many other validators were slashed during this period. The total slashing penalty here can range from 1 ETH, to the entire 32 ETH deposit.
Snitches get… riches?
If you are the lucky one to blow the whistle on an attacker in the Ethereum network, you will actually be rewarded! We can see precisely how much that reward is here. The calculated reward is the slashed validators effective balance, divided by the WHISTLEBLOWER_REWARD_QUOTIENT. This is much rarer than receiving a reward for attesting to a block, but it’s good to know nonetheless. Though, I personally would rather get a hat in the mail that says “I defended the Ethereum network”.
Slashing Fast Facts
There are many other interesting details about slashing noted in the eth2.0-specs GitHub repository, and I’ll note a few of them here. The others you can check out for yourself.
- MAX_PROPOSER_SLASHINGS (per block) = 16
- MAX_ATTESTER_SLASHINGS (per block) = 2
- MIN_SLASHING_PENALTY_QUOTIENT = 128
Next: Personal Pivx Node
Previous: Our Litecoin Faucet!
>> Home