Financial reference rates such as LIBOR or Euribor have been around for decades. Most reference rates represent or relate to an average interest rate at which banks are willing to lend to each other. They are then used by those banks, for example, to calculate variable interest rates in loans or other agreements. As benchmark interest rates for contracts with hundreds of trillions of dollars outstanding, they serve an important role in the financial markets.

As decentralized, blockchain-based financial markets are forming rapidly, it was only a matter of time until a reference rate would be developed for Ethereum, arguably the most important blockchain for the decentralized financial industry. This has now happened—the Ethereum network now has ETH.STORE. Short for Ethereum Staking Offered Rate, ETH.STORE is a reference rate that represents the average financial return validators on the Ethereum network have achieved in a 24-hour period. Since it represents the baseline rate of return one could reasonably expect to achieve by staking Ether—rather than, for example, lending Ether to third parties—it can be used to determine how beneficial conditions of a financial product denominated in Ether actually are. Basing a financial instrument's conditions on the ETH.STORE allows market participants to factor in (and clearly identify) risk premiums, allowing for a potentially more transparent market overall.

ETH.STORE was introduced by the bitfly group, which offers state-of-the-art blockchain explorers Etherchain and Beaconcha.in. STADLER VÖLKEL advised on the introduction of this potentially game-changing innovation.

ETH.STORE is calculated on a daily basis. The results, as calculated by bitfly gmbh, are published on its website. The source code used to calculate ETH.STORE has been made open source and is available on Github. Anyone wishing to calculate ETH.STORE on their own, or even use ETH.STORE as reference rate in their own financial products, can and is encouraged to do so. Unlike reference rates used in the traditional financial market such as Libor or Euribor, ETH.STORE is not dependent on a central authority such as a central bank. Rather, it is fully market-driven and objectively verifiable by anyone.

The formula to calculate ETH.STORE is simple:

In this article we explain this equation and also provide a step-by-step description of how ETH.STORE is calculated. We also take a close look at the source code used to calculate ETH.STORE and go through an example calculation that anyone can replicate themselves. Understanding how ETH.STORE works requires some basic knowledge about Ethereum and the upcoming upgrade known as Ethereum "2.0". A general overview on these topics can be found here.

**Step 1: Identify which epochs were processed on a calculation day**

The ETH.STORE is calculated on a daily basis. The first step in calculating ETH.STORE is therefore identifying which epochs to include in the calculation day. An epoch is a unit of measure on Ethereum that consists of 32 slots. A calculation day is a 24-hour period that starts at 12:00:23 UTC and ends the next day at 12:00:22 UTC. Because an epoch lasts 6.4 minutes, each calculation day consists of 225 epochs. Calculation days start 23 seconds after noon UTC because that's when the genesis epoch of Ethereum's beacon chain was first processed.

The first epoch of a calculation day is the first finalized epoch that begins on or after the start of the calculation day. The last epoch of a calculation day is the finalized epoch that is processed 224 epochs (approximately 24 hours) later. No epochs are skipped or disregarded in the calculation.

Expressed in Go programming language as made public on Github, the code used to identify which epochs to process for a given calculation day is:

For our example calculation, we will calculate ETH.STORE for the calculation day starting on 1 August 2022 at 12:00:23 UTC. The source code tells us that the start epoch is epoch 136800. By looking at the beaconcha.in explorer we can confirm that the first finalized epoch on or after 12:00:23 on 1 August 2022 was indeed epoch 136800. The last epoch of the calculation day, i.e., 224 epochs after the start epoch, was epoch 137024. The epochs processed in this range therefore comprise the calculation day in question.

**Step 2: Identify which validators were active during an entire calculation day**

Next, the validators that were active during an entire calculation day are identified. Validators that are activated after the first epoch of a calculation day and validators that are exited before the last epoch of a calculation day are not included in the calculation. The reason for this is to ensure that ETH.STORE accurately reflects the average return earned by validators in the course of an entire calculation day. This is set out in the code here:

In human-speak, the source code performs the following tasks:

- The code gets the unique index number of all validators that were active at the first epoch
- The code then asks the node if any of those validators exited before the last epoch

Turning back to our example, on the calculation day starting on 1 August 2022, the source code has identified 411,524 validators that were active during the entire calculation day.

**Step 3: Calculate the consensus rewards, transactions fees and effective balance of the validators**

Validators receive consensus rewards and transaction fees for their service to the network. The consensus rewards and transaction fees make up the total staking rewards, which is the numerator in the ETH.STORE calculation (see Step 4 below). Consensus rewards are rewards received by validators for proposing and attesting in accordance with the consensus rules of the Ethereum network. Transaction fees are fees received by validators for processing transactions. The total staking rewards are calculated by taking the sum of the consensus rewards and transaction fees earned by each active validator during a calculation day.

The effective balance is the ETH balance of a validator used to determine the size of a reward or penalty on the Ethereum network. This is different from a validator's current balance, which is the total amount of ETH held by the validator. A validator's effective balance can never be higher than 32 ETH and is always a multiple of 1 ETH, rounded down. For example, if a validator's current balance is 28.7 ETH, its effective balance would be 28 ETH. A validator's effective balance might be less than 32 ETH if, for example, penalties have been assessed against the validator based on the proof-of-stake consensus mechanism. The total effective balance is the sum of effective balance of active validators as at the start of a calculation day. This can be determined simply by asking the node for the effective balance of each validator and then taking the sum.

The source code for calculating the consensus rewards, transactions fees and effective balance of the validators is:

In our example, the source code calculated that the validators identified in Step 2 above earned on 1 August 2022 a total of 1,621,687,783,721 GWEI (i.e., 1,621.687783721 ETH) in consensus rewards and transaction fees. This figure therefore represents the total staking rewards for the calculation day.

The source code also calculates the total effective balance as 13,168,656,000,000,000 GWEI (i.e., 13,168,656 ETH).

**Step 4: Put it all together**

In steps 1 through 3, we calculated the components of ETH.STORE and got the following results:

Start Epoch: 136,800

Last Epoch: 13,7024

Active Validators: 411,524

Total Staking Rewards: 1,621,687,783,721

Total Effective Balance: 13,168,656,000,000,000

The ETH.STORE can now be calculated by dividing the total staking rewards by the total effective balance. This returns the ETH.STORE for 1 August 2022. It is therefore a reference rate expressed per diem. In order to express it in the more familiar type per annum, one only needs to multiply the result by 365 (disregarding leap years):

The ETH.STORE for the calculation day beginning on 1 August 2022 is therefore 4.49 %.

**The law firm behind the project**

STADLER VÖLKEL, a law firm based in Vienna, Austria, advised the bitfly group on the development of the ETH.STORE. STADLER VÖLKEL is a commercial law firm in Vienna, Austria that specializes in finance and capital market law. The firm provides comprehensive legal advice to crypto pioneers and established players on financing, capital markets and regulatory matters.

The advisory team consisted of Dr. **Oliver Völkel**, LL.M. (Columbia), founding partner whose focus includes banking, finance, and capital markets law as well as digital assets law, and **Bryan Hollmann**, LL.M. (LSE), U.S. counsel who provided support in the areas of capital market law and U.S. securities law.