Proof Of Stake In Ethereum

What is Proof of Stake?
Rewards and Penalties
Attack and Defense
Imagine an awards organization that votes on which movie was the best or which actor was the best. To be able to be one of the decision makers in such an organization, you need to put some money down and if you act dishonestly- your money will be destroyed if you betray the ethics of the organization. Now, this is kinda same for how Ethereum’s Proof Of Stake mechanism works except instead of being a decision maker in an awards organization, you are a validator in Ethereum’s ecosystem and your job as the validator is not voting on the best movie but verifying transactions and creating new blocks.
Proof of Stake(POS) is a consensus mechanism used in Ethereum whereby validators deposit a minimum amount of 32 ETH as a collateral for them to participate in verifying transactions and new blocks being created.
How does a transaction making use of the Proof of Stake Consensus Mechanism work?
A user creates and signs a transactions using a private key, this transaction is submitted to an Ethereum execution client which verifies its validity. If valid, the execution client adds it to its local mempool and also broadcasts it to other nodes over the execution layer gossip network. After this is done, a validator node is randomly chosen to be responsible for updating the blockchain’s state. After a process that involves the execution, consensus and validator client, the transaction is considered finalized if it has become part of a chain with a "supermajority link" between two checkpoints.
What do validators receive for the work they do in validating transactions?
Validators receive rewards for their work. They only receive rewards when they make votes that are consistent with the majority of other validators, when they propose blocks, and when they participate in sync committees. The value of the rewards in each epoch are calculated from a base_reward
. There are complex mathematical equations, weighted components made up of the source vote, the target vote and the head vote(NOTE:- These votes must be made timely and not slowly) and additional rewards that make up the final reward awarded to validators. Block proposers can also increase their reward by including evidence of misbehavior by other validators in their proposed block. Yes, snitching others can bring more rewards in blockchain shhh! Now, once the validator being snitched on is found to be guilty. They will face a consequence known as slashing. A concept we will dive into as we go on!
What happens to validators that do not make timely votes or do so slowly?
They are penalized!
The penalties for missing the target and source votes are equal to the rewards the attestor would have received had they submitted them. There is no penalty for missing the head vote. However, there is also no penalty for failing to propose a block.
Can a validator be removed from a block?
Yes! and this is known as slashing as earlier mentioned.
What is Slashing?:- Slashing is a more severe action that results in the forceful removal of a validator from the network and an associated loss of their staked ether. There are three ways a validator can be slashed. Nonetheless, all these three ways boil down to the dishonest proposal or attestation of blocks. Once this is detected, 0.0078125 is immediately burned for a 32 ETH validator, then a 32-day removal period where the validator’s stake gradually bleeds begins. There is also an additional penalty added at the midpoint of the slashing period. This penalty burns the validator’s stake based on the number of slashed validators at the beginning of the removal period.
What if a transaction cannot be finalized?
If the consensus layer has gone more than four epochs without finalizing, an emergency protocol called the "inactivity leak" is activated. This inactivity leak lets the stake belonging to the inactive validators bleed away until they control less than 1/3 of the total leak, as 2/3 majority of the total staked ether is required for the chain to recover finality.
ATTACKS AND DEFENCES!!!
Like every system in the world, there’ll always be people trying to sabotage. Ethereum is no different. There are three classes of outcome that an attacker might realistically target: reorgs, double finality or finality delay.
REORG:- Imagine a pack of cards that must remain ordered in a certain way. No card must be removed from the order otherwise the game is null/invalid. In Ethereum’s case, attackers reshuffle the blocks in a new order either by subtracting or adding blocks into the chain. Re-orgs could also be used to prevent certain transactions from being included in the canonical chain. Lastly, finality revision which removes or replaces blocks that have previously been finalized is also possible.
DOUBLE FINALITY AND FINALITY DELAY.
HOW DO THESE ATTACKERS ATTACK
There are different ways attackers attack and they include Layer 0 attacks, attacking the protocol, attacking using small amounts of ETH, attacking using >= 33% of the total stake, attacking using approximately 50% of the total stake and attacking using >= 60% of the total stake.
UP NEXT:- HOW DOES ETHEREUM DEFEND ITSELF?
The Ethereum system has a range of defensive strategies it can employ to defend itself against these attacks. There could be a minimal response which is forcibly exiting the attackers’ validators from the network without any additional penalty or a harsher response which is revoking past rewards or burning some portion (up to 100%) of their staked capital. The community decides in either case. It is important to note however that these penalties meant for the dishonest validators can also affect the honest validators as some transactions already validated could be rolled back.
Lastly, for layer 0 attacks(attacks against the foundation of Ethereum). It’ll certainly be a challenge but nothing Ethereum cannot solve as it has solved it twice before!
Subscribe to my newsletter
Read articles from Susannah Adebola directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
