BY Jim McDonald ON Feb 02, 2020

Much has been written about measuring the performance of individual Ethereum 2 validators, but less about the health of the overall network. There are a number of important metrics that can provide useful information to network operators and those wishing to participate in the network, either either by running a node or as a validator. Here we will be defining some of these metrics: what they mean, how they are measured, and what can be considered “good” or “bad” for each one.

Network liveness

What is it, and why does it matter?

Network liveness is a measure of how quickly new blocks in the Ethereum 2 blockchain are considered final. It matters because transactions in blocks that have not been finalized could still be altered. If the chain is not finalizing blocks continually it is failing in its basic purpose to provide immutability of transactions and state.

Network liveness can be given a score from 100%, where blocks are being finalized as quickly as the protocol allows, to 0%, where blocks are repeatedly failing to be finalized. If network liveness is at 0% all validators will start to lose funds, regardless of how well they perform their individual work, due to the inability of the network to finalize blocks.

Network liveness will commonly be at 100%, falling to as low as 50% in times of network congestion. A network liveness value below 50% would suggest serious network issues.

Figure 1: Network liveness range

How to calculate it?

Network liveness can be calculated as:

\[ network\ liveness = max(1 - 4 \frac{current\ epoch - 2 - finalized\ epoch}{100}, 0) \]

current epoch can be calculated from the current timestamp plus a number of network constants:

\[ current\ epoch = \frac{current\ timestamp - genesis\ timestamp}{seconds\ per\ epoch \times slots\ per\ second} \]

finalized epoch is obtained from an active Ethereum 2 node.

Participation rate

What is it, and why does it matter?

The participation rate is a measure of how many of the validators expected to attest to blocks are actually doing so. It matters because the lower the participation rate the lower the rewards that each participating validator receives, and if the participation rate falls too low it can cause network liveness failures.

A good participation rate would be somewhere between 80% and 95%. If the participation rate falls below 67%, blocks can no longer be finalized and network liveness will start to fall.

Figure 2: Participation rate range

How to calculate it?

Participation rate can be calculated as:

\[ Participation\ rate = \frac{number\ of\ attestations\ in\ last\ epoch}{number\ of\ attesting\ validators} \]

It is worth pointing out that the number of attestations in last epoch value can be satisfied in a number of different ways. It could be the number of attestations included in blocks in the last epoch, the number of attestations seen by the node for the last epoch, the number of attestations seen whose source block is in the last epoch, or other variants. It could also be a trailing indicator, using the last epoch but 1. The specific method used to calculate this value is up to the user and the data they have available to them.

attesting validators are simply those that are either active, exiting or slashing as per the validator lifecycle.

Estimated validator return

What is it, and why does it matter?

Most validators are running in anticipation of rewards. The estimated validator return is the approximate amount of Ether a validator would expect to obtain if it carried out its duties over the period of a year, measured as a percentage of the staked Ether.

Figure 3: Maximum validator return Vs. total number of attesting validators (approximate)

It is important to understand that even if a validator carries out its own duties perfectly, its rewards can be reduced by a low participation rate or network liveness falling to 0. As such it is prudent to consider the estimated validator return to be a fraction of the maximum validator return. For example, it is possible to provide a more representative network-wide estimated validator return by multiplying the basic estimated validator reward as described above with the participation rate, as a lower participation rate reduces the estimated validator return for all validators. However, this calculation would be vulnerable to temporary peaks and troughs in the network participation rate; a more accurate representation could be provided by using an average participation rate over time. Even here, however, it will only ever be possible to provide an estimate as this is a forward-looking metric.

Whether or not a level of reward can be considered good very much depends on the costs incurred when attesting. These costs are many and varied and should be understood so that rewards can be considered in this context. It should also be noted that costs for running validators are commonly measured in fiat, whereas rewards are measured in Ether, so an exchange rate needs to be used. However, for a typical validating setup with costs in the range of \$25 per validator per month and an Ether price of \$200 the a spread of “good” returns to “poor” returns could look something like:

Figure 4: Estimated returns after costs

How to calculate it?

Calculation of estimated validator return can be read directly from the above graph for a given number of validators; the number of attesting validators can be obtained from an Ethereum 2 node.

Stake effectiveness

What is it, and why does it matter?

Stake effectiveness is a measure of the proportion of staked Ether that is being used to validate. Ethereum 2 uses a measure called effective balance to judge the weight of attestations, and the majority of validators will have a level of inefficiency where their balance is higher than their effective balance. For example, if a validator has a balance of 31.7Ξ its effective balance will be 31Ξ, resulting in 0.7Ξ being unused for the validator’s attestations. The amount of Ether unused changes over time as the validator’s balance alters, but it is rarely 0.

Staking effectiveness matters because the more Ether used to secure the network the better. Ether that is locked in a validator but not available for attesting is wasted in terms of network security. It also matters to the individual staker as a low stake effectiveness lowers their expected percentage returns from ther validators, as rewards are based on effective balance.

It is expected that soon after Ethereum 2 launches staking effectiveness will be in the 90% range, remaining roughly stable as some validators lose funds and others gain funds. Over time, as node operators learn to run their validators more effectively, stake effectiveness will drop, due to balance being uncapped but effective balance being capped at 32Ξ.

Figure 5: Stake effectiveness range

How to calculate it?

Stake effectiveness for an individual validator can be calculated as

\[ Validator\ stake\ effectiveness = \frac{effective\ balance}{balance} \]

To achieve a network-level version of this metric the effective balance is the sum of the effective balances for all attesting validators, and the balance is the sum of the balances of all attesting validators

\[ Network\ stake\ effectiveness = \frac{\sum_{v=0}^{n}{effective\ balance_v}}{\sum_{v=0}^{n}{balance_v}} \]

Slashing risk

What is it, and why does it matter?

Slashing is the ultimate sanction of the Ethereum 2 network: a removal of some of the validator’s funds and its immediate ejection from the validator pool. However, the “some” in the last sentence depends on the actions of other validators both before and after a given validator is slashed. The more validators that are slashed around the same time, the higher the penalty for all slashed validators (see this article for details).

Figure 6: Slashing penalty as a percentage of stake

It is expected that slashing will be a very rare occurrence, due to the fact that the mechanisms to spot and punish it are well-understood. This makes it all the more interesting to track, as if it ever rises to any significant level it suggests that a network attack has been attempted and caught. A slashing risk above 15% signifies a significant number of nodes being slashed, and should be investigated to understand the cause.

Figure 7: Slashing risk range

How to calculate it?

Slashing risk is calculated as

\[ Slashing\ risk = \frac{1}{32} + \frac{total\ stake\ slashed * 3}{total\ attesting\ balance} \]

Note that this is an estimation for two reasons. First, the slashing risk assumes that all validators have a balance of 32Ξ, which may not be the case. Second, the actual cost of being slashed depends not only on the current slashing risk but the risk over the next 18 days after the slashing occurs, as older slashed validators are forgotten about and new ones enter the scene.

Wrapping up

These metrics provide high-level information about the Ethereum 2 network as a whole. They can help an Ether holder decide if they wish to participate in staking, as well as manage their risk when doing so. They can support node operators in the smooth operation of their nodes. And they can assure users that the Ethereum 2 network is working as expected.