Ethereum: Proof of Stake

EthValidator
7 min readMay 12, 2020

--

The transition from Ethereum 1.0 to 2.0 is dubbed “Serenity”. It will take place in three stages: Phase 0, 1, and 2. In this article, we’d like to talk about the initial stage (Phase 0), which will introduce a new blockchain called “Beacon Chain”. Phases 1 and 2 will be covered in separate articles.

Beacon Chain is a brand new blockchain based on the Proof-of-Stake consensus algorithm. It is responsible for achieving consensus on the state of the system among all network nodes that are part of the protocol.

How Beacon Chain Works: The Key Principles

Beacon Chain will manage and maintain a registry of validators. A validator is a participating node that contributes to the distributed operation of the entire system primarily by proposing new blocks to Beacon Chain or by voting for an already existing block, which depends on the current state of the node. Beacons in the protocol choose validators to vote for blocks in a manner that ensures that every validator is given an equal opportunity to contribute. We’ll talk on this topic separately.

As a result, validators who follow the protocol and make sensible decisions receive a reward in the form of ETH as an incentive for positive behavior.

On the other hand, a validator that acts in an inconsistent, odd, or malicious way can potentially be penalized: this may result in such validator not receiving staking rewards or, in the worst-case scenario, may lead to a slashing of the entire stake.

It is important to understand the key concept behind rewards and penalties: validators receive rewards for taking actions that help the network’s process to reach consensus, and penalties for actions (or inactions) that do the opposite. Validators that try to maximize their rewards will bring the highest benefit to the network at large too.

Below we will explore several examples of rewards and penalties as well as some related nuances.

Rewards and Penalties Over Staking Period

As previously mentioned, if validators adhere to the protocol, they receive rewards. Or, on the contrary, if validators deviate from it, they are penalized. Over time, rewards and penalties are reflected in the balance of the validator, as demonstrated in the example below:

An example of the validator’s balance over periods of both activity and inactivity.

(Please note that, for a clearer representation, the size of rewards and penalties in the graphs provided have been exaggerated)

As shown above, the validator’s participation in staking is rewarded or penalized, which results in a change in their balance. This particular validator has had periods of performing the tasks properly and being rewarded as well as periods of inactivity that have led to penalties.

Phases of rewards and penalties

Over the entire staking period considered, the changes in the size of the rewards and penalties follow a pattern that is not obvious. For instance, the penalty received at time 5 is considerably larger than the one received at time 12, even though the balances at those times are the same. Let’s consider this situation more closely.

First, let’s take a look at the highlighted point, time 3:

Decrease in reward/penalty value

At this time the balance has dropped below 32 ETH, and the size of subsequent rewards and penalties decreases.

Now, let’s consider time 5:

At this time the balance has dropped below 31 ETH, and the size of subsequent rewards and penalties decreases again.

Next, time 9:

At this time the balance has increased back to 31 ETH, but the size of subsequent rewards and penalties remains the same as when the balance was below 31 ETH.

The fourth and final time to consider is time 18:

At this time the size of rewards and penalties begins to increase, although the balance has not appeared to pass any significant point yet.

The above-mentioned examples may leave you rather confused as to how the size of rewards and penalties is calculated. To understand the logic behind the sizes of rewards and penalties, we need to understand what “effective balance” is.

What Is Effective Balance?

Effective balance is a value for each validator that is derived from the validator’s balance and prior effective balance. It is used to calculate the size of rewards and penalties given to that validator.

Effective balance can never be more than 32 ETH. This means, for example, that if a validator’s balance is 100ETH its effective balance will be 32 ETH

Effective balance is always a multiple of 1ETH, with any additional balance being ignored. This means, for example, that if a validator’s balance is 29.9999 ETH its effective balance will be 29 ETH

Effective balance will only increase if the validator’s balance is more than 1.5 ETH higher than its current effective balance. This means, for example, that if a validator’s effective balance is 25 ETH its balance must more than 26.5 ETH before its effective balance will increase to 26 ETH.

Following the above rules allows the addition of a line showing the validator’s effective balance to the chart:

Effective balance was born from a combination of design and technical requirements. On the design side, keeping individual validators to a maximum of 32 ETH stops any single validator from having an excessively large vote in the state of the chain. On the technical side, decreasing the frequency at which effective balance can change means that Ethereum 2 can run on lower-powered hardware, as a change in effective balance necessitates a relatively expensive computation to take place.

The Impact Of Effective Balance On Validating

Because small changes in a validator’s balance can have large and long-term effects on its effective balance it is important to keep track of it.

If downtime is required on a validator it is also important to time it correctly, as not all penalties are equal. A 0.015 ETH penalty that drops a validator’s balance from 30.020 ETH to 30.005 ETH (with no change in effective balance) has very little impact on the overall rewards generated by the validator, but a 0.015 ETH penalty that drops a validator’s balance from 30.005Ξ to 29.990 ETH (with a change in effective balance from 30 ETH to 29 ETH) has a much larger impact.

Validator Effectiveness

Validator effectiveness is a metric that shows how much of your validator balance is being used for attesting, calculated as the effective balance as a fraction of the total balance. For example, if a validator has a balance of 31.9 ETH this would result in an effective balance of 31 ETH and its effectiveness would be 31/31,9, or 97%.

Effectiveness of an active validator will usually be somewhere between 95% and 100%, the higher the better as it maximizes both network security and validator rewards. A low effectiveness suggests a validator has been offline for an extended amount of time. Tracking effectiveness over time is a simple way to measure the overall performance of a validator.

Additional Factors Affecting Rewards

This article shows a simplified view of validating in Ethereum 2 to explain the concept of effective balance. The actual Ethereum 2 rewards and penalties system uses effective balance as a base but rewards vary depending on various factors. Rewards can be higher, for example, if the validator proposes a block. They can also be lower if other validators are offline, or disagree about the state of the chain.

Wrapping Up

Running your own node on the Ethereum 2.0 network requires a proper understanding of what effective balance is. On top of that, you will need to always keep your hardware online in order to avoid penalties.

Or, you can go a simpler route and use the infrastructure of Ethvalidator.io to earn rewards for staking. The platform will provide the opportunity to run your own validator nodes and will offer 24/7/365 node maintenance.

Thanks for reading! Please follow our social media channels.

Twitter | Telegram | Medium | Github

--

--