BY Jim McDonald ON Jan 08, 2020

When the Ethereum 2 beacon chain launches later this year it will require validators to secure the network. Running a validator brings with it the potential for rewards and penalties; a common question that is being asked is “how much will I make by validating?”. The answer to this question requires two pieces of information: how much a validator earns, and how much a validator costs. This post looks at the second of these questions.

To recap: the Ethereum 2 beacon chain node software (hereafter “node”) requires:

a computer on which to run the node (and associated validator software);

access to the internet to talk to other nodes, so the node has an up-to-date view of the state of the beacon chain; and

a high % of uptime for both computer and network, so the validator can attest when requested and be rewarded.

A node can run without validators (for example, for the purpose of monitoring the state of the network), but validators require a node so they know what to attest. Although it is possible to use someone else’s node when attesting, it makes validators reliant upon their good behavior and as such all serious validators will want to run their own node.

There are three main sources of costs when running a validator: setup, infrastructure, and operations. Infrastructure costs are paid monthly and remain roughly static, setup costs are paid up-front and are not repeated, and operations costs are paid monthly but can be highly variable from one month to the next.

Figure 1: A fictional validator’s costs over time

Costs are commonly thought of purely as money spent, but there are also opportunity costs involved when managing long-term infrastructure. Opportunity costs are the costs you incur from doing one thing rather than another: if you could be paid \$100 for two hours of work but instead watch a movie for those two hours your opportunity cost to watch that movie is \$100. Another way to look at opportunity costs is to ask how much you value your time: what would you pay to not spend three hours replacing a hard drive, or half a day selecting a server from the hundreds that are available? When this post mentions cost of time it refers to opportunity cost; individuals and companies will need to make their own judgements as to the value of that time.

A breakdown of the components of each of the above cost sources is provided below.

Setup

Setup costs are the value of the time taken to select, build, configure, and test the hardware, operating system and software required to run the validators on the node.

Selecting the hardware

There is a very large range of hardware available on which a node could be run. The prime requirements are for it to be powerful enough to run the software, and to be reliable enough that it does not need constant maintenance. Beyond that there are many decisions that may need to be made that can influence your selection, from the physical size of the server and how much noise it makes when running (important if the server is in a home) to the amount of power it requires (more on this below).

A decision may be made to use services from a hosting provider, but many of the same questions remain. How many CPUs, and how fast should they be? How much memory, and what size of storage should be selected? Should additional money be spent on a dedicated server rather than a virtual private server? Individual disks, software RAID, hardware RAID? Bandwidth of the network? Although using a hosting provider means you are renting a server from the provider rather than purchasing it from a vendor, most of the decisions above still need to be made.

Selecting the operating system

There are two broad choices of operating systems: Windows-based and Linux-based. Each have a number of products and/or distributions that provide different features, require different levels of expertise to operate, etc. Security and uptime are critical, with maintainability following close behind. There is no obvious “best” choice for operating system so selection will commonly come down to a combination of familiarity and features.

Selecting the software

There are, at time of writing, 6 different implementations of the Ethereum 2 beacon chain node software in various states of readiness. Apart from being written in different languages they are often focused on different markets: some are dedicated to provide a great experience on low-end hardware, others provide features required for running tens or hundreds of validators, and so on.

Selection of software should be guided by the prior selection of hardware and operating system, aided by knowledge of the number of validators that will be run. However, each implementation will need to be evaluated to decide which is most suitable.

Configuring the hardware, operating system and software

Once they have been selected the hardware, operating system and software will need to be configured. This will entail a combination of setup (installation and enabling software) and lockdown (removing unnecessary software, closing open ports, etc.). Configuring automated operating system updates, adding monitoring and similar can help reduce future maintenance costs.

Infrastructure

Infrastructure costs are costs that are relatively regular in size and paid out on a monthly basis.

Depreciation

Depreciation is a significant cost when running a validator service. It is the cost of the computers that run the validating process, spread over a time period considered the useful life of the hardware. For computer equipment the time period is commonly 36 months, resulting in a monthly cost calculated as follows:

\(Depreciation = \frac{hardware\ cost}{36}\)

For example, a typical desktop computer may cost $600 so the monthly depreciation would be:

\(Depreciation = \frac{\$600}{36} = \$16.66\)

Electricity

Electricity is a recurring cost, and is highly dependent on the hardware used. Ethereum 2 validators need to be online all of the time to receive maximum rewards, so electricity costs can mount up. Electricity usage is measured in Watts, and electricity is usually billed in kilowatt-hours (KWh) i.e. one kilowatt of usage for an hour. The monthly cost is calculated as follows:

\(Electricity = usage \times hours \times KWh\ cost\)

For example, with a typical desktop computer using 150 Watts (0.15KW) and an indicative price of electricity of around $0.10, the monthly electricity cost (assuming 30 days in the month) would be:

\(Electricity = 0.15 \times 24 \times 30 \times \$0.10 = \$10.80\)

Network

Network costs for home connections are commonly a flat fee per month, which makes them easy to calculate. Furthermore, network is often a shared resource, with other systems sharing the same connection and allowing the costs to be shared likewise.

However, many server hosting providers have a pay-per-GB model where the more data that is used the higher the charge at the end of the month. For a node to have the best view of the state of the Ethereum 2 beacon chain, and hence the highest rewards, it needs to talk to as many other nodes as it can, but with the pay-per-GB model each additional node it talks to increases the charge by the hosting provider. Ultimately, the consideration of increased cost with increased reward will need to be examined to pick a suitable balance.

Operating system

It is possible to run Ethereum 2 nodes on either Windows or Linux-based operating systems. The former is more familiar to many people, however comes with a licensing cost. If this is purchased it should be depreciated using the same method as for hardware.

Operations

Operations costs are similar to infrastructure costs in that they are paid out on a monthly basis, but the size of the costs can change significantly from month to month. This is due to the fact that the work to be carried out happens irregularly, but when it does it can be significant. For example, upgrading an operating system may take several hours and it happens once every six months; it cannot be spread out to take half an hour every month.

Maintaining the hardware/operating system/software

Hardware fails, disks fill up, software becomes end-of-life: these are truths that mean, from time to time, action will need to be taken to ensure the node continues to run. Maintenance costs fall in to two categories: the time taken to carry out the maintenance, and loss of funds whilst the maintenance is being carried out. To try to minimize both it is best to carry out regular preventative maintenance; however, this requires monitoring systems that themselves require management and maintenance. It is very easy to end up spending large amounts of time carrying out maintenance activities, and as such it is important to be able to accurately account for time taken to ensure that costs are proportionate to the validator rewards received.

Software upgrades

The Ethereum 1 network has shown over the past few years that nodes need to be upgraded from time to time. Sometimes it is in response to bugs, other times to implement protocol changes, improve performance, and so on. Upgrades are similar to maintenance, except that they can be planned in advance and so carried out at the most convenient time to the operator.

Re-evaluation of implementations

Software does not stay still, and nor do the companies building them. At time of writing, for example, Parity have recently announced they will no longer support their Ethereum 1 client, used by some companies for many years. As node implementations change it will be important to re-evaluate their features and performance, with a view to switching to a different implementation if it becomes more suitable.

Costs of scaling

The above costs consider a fixed number of validators, but what happens to costs if you want to add more validators at a later date?

For phase 0 the majority of the work is carried out by the beacon node, with validators just signing the occasional piece of data. As a result, overall costs remain relatively flat regardless of the number of validators with only occasional purchases of new infrastructure required.

Figure 2: Phase 0 expected costs

Phase 1 introduces more work for each validator, which will result in additional servers as the number of validators increases. As a result, costs will increase more frequently as new servers are required to be purchased, configured and maintained.

Figure 3: Phase 1 expected costs

Phase 2 introduces a very significant amount of work for each validator, which will result in each server only being able to run a relatively small number of validators. This means that infrastructure, and hence costs, are more likely to scale roughly in line with the number of validators.

Figure 4: Phase 2 expected costs

Summing up

Running a validator in Ethereum 2 incurs a number of costs, such as setup work, hardware and software depreciation, and on-going maintenance. The largest cost can quickly become time lost to maintenance and other occasional work. Ensuring the best income requires keeping costs low without sacrificing security or uptime. Thought must be given to how costs will increase in phases 1 and 2 of the Ethereum 2 rollout.