Skip to main content

Resources

This notebook demonstrates basic functionality offered by the Coin Metrics Python API Client and Network Data Pro. Coin Metrics offers a vast assortment of data for hundreds of cryptoassets. The Python API Client allows for easy access to this data using Python without needing to create your own wrappers using requests and other such libraries. To understand the data that Coin Metrics offers, feel free to peruse the resources below.

File Download

Download the entire notebook as either a jupyter notebook to run yourself or as a pdf from the two links below NDP - ETH Staking Metrics.ipynb NDP - ETH Staking Metrics.ipynb

Notebook Setup

Calculate Estimated Validator Yield

Using ETH_CL validator metrics it is possible to estimate the yield from the protocol. In combination with historical data on priority tips, we can estimate what a validator should expect to earn. Note that maximal extractable value (MEV) is another source of revenue for validators but is currently not considered as part of this analysis. A validator’s expected annual percentage return (APR) from staking rewards accumulated on the Consensus Layer, assuming perfect performance and uptime, can be estimated with the formula below (where ValidatorActOngCnt = number of active validators):
2940.21 ÷ sqrt(ValidatorActOngCnt) = Staking Yield

Retrieve Consensus Layer Metrics

365 rows × 3 columns Rewards from staking are only one part of a validator’s yield. Post-Merge, validators now also receive user transaction priority fees, or tips, that used to go to miners on the Execution Layer. Considering the historical record of fees, we can estimate the magnitude of this additional source of yield. For our analysis, we show how to estimate both staking revenues and priority tips as yields on staked ETH. To do this, we use the results we found above and divide gross annual emission by the total number of validators to produce average validator revenue, which for this purpose only consider revenues that originate from the protocol and not from fees.
940.87 × sqrt(ValidatorActOngCnt) ÷ ValidatorActOngCnt = Avg. Validator Revenue
The expected annual number of blocks proposed in turn allows us to estimate the priority tip that is earned by each block proposal. Using a 14-day moving average to smooth priority tips, we then estimate what a proposer should expect to earn in tips.
1 ÷ ValidatorActOngCnt × 2,629,800 = Annual Num. of
Proposals per Validator
sma(FeePrioTotNtv ÷ BlkCnt, 14) × Ann. Num. of Proposals per Validator = Average Priority Tip per Block

Retrieve Execution Layer Metrics

365 rows × 4 columns

Calculate theoretical validator yield based on Active Validator count

365 rows × 5 columns

Calculate estimated blocks proposals per year based on Active Validator count

Estimate tips per block

365 rows × 7 columns

Calculate priority tip yield

Calculate ETH Supply: Staked vs. Unstaked

One of the many advantages of a blockchain-based ledger is auditability, but increasingly complex consensus architectures and supply mechanics can make it difficult to understand the full picture of asset supply. Ethereum’s shift to proof-of-stake introduced a number of novel considerations in obtaining network-wide supply figures. In the following example, we combine various Supply metrics from ETH’s Consensus and Execution Layers to ascertain the total amount of staked vs. unstaked supply.

Consensus Layer Metrics

Execution Layer Metrics

Calculate the total ‘adjusted’ ETH supply

365 rows × 7 columns

Plot staked vs. unstaked supply