LIP-52: Verify the snapshot for yourself

LIP-52 proposes a snapshot mechanism allowing delegators to claim their historical earnings at greatly reduced gas prices.

The actual snapshot will be part of the LIP-52 poll. Delegators can verify the snapshot being taken for correctness if they wish to do so. This does not require access to your private keys, you just need your ethereum address.

A CLI tool will be available to check your earnings and verify the snapshot. The snapshot will be taken under the form of a merkle tree and the root of that tree will be stored on-chain, the full merkle tree will be part of the CLI tool repository as a JSON file.

Key Values

  • Snapshot Round: 1903
  • Snapshot Merkle Root: 0xe63426ba9d461ce57466458a84c076bb082674ab75730641e2668c83a3b30775

Verifying the Snapshot

  • Prerequisites: access to an ethereum JSON-RPC provider (local geth node, infura, alchemy, …)
  1. Clone the merkle-earnings-cli repository (at master) and follow the installation steps in the README.
  1. Update the .env file with your Ethereum JSON-RPC provider

ETH_RPC=<your provider endpoint>

  1. Fetch your earnings for the snapshot round

mearnings -e <your_ethereum_address>

You can verify that the earnings displayed by the CLI are correct using Etherscan
(see below)

  1. Verify that your address and its earnings are part of the snapshot

mearnings -ve <your_ethereum_address>

  1. Optional: You can always regenerate the merkle tree from scratch if you wish by running mearnings -g. This will take a while and do a bunch of RPC calls. You can then rerun mearnings -ve <your_ethereum_address> and check if the outputted local root is still the same as the on-chain root.

Cross checking your earnings on Etherscan

Etherscan provides an easy way to interact with the Livepeer contracts through a GUI.

  • Optional - verifying the snapshot round.

Go to the RoundsManager contract on etherscan, pick the “Read as Proxy” option.

Go the the lipUpgradeRound function and enter “52” as argument (where 52 represents the LIP number so the upgrade round for LIP-52). The returned value is the snapshot round.

  • Verifying Earnings

Go to the BondingManager contract on etherscan , pick the “Read as Proxy” option.

Scroll down to the pendingStake and pendingFees functions. Enter the required function arguments for each. This will be your ethereum address and the snapshot round.

You can compare these values against what the CLI tool returns for your address at that round height.

To summarize a high level overview of what this snapshot is, and why it matters:

For each Ethereum address which has tokens staked on Livepeer as of round 1903 (September 30, 2020), it specifies the cumulative fees and LPT rewards that the account has accumulated.

The above post, and the referenced tools give you the ability to check that the amount that your account has actually accumulated on chain, matches the amount written down in the snapshot. The correctness has been checked, but as you know, you have the power to verify for yourself, and these tools let you do so.

If you were to notice any discrepancy, you would certainly want to notify the community, so that they would vote NOT to approve the update that will use this snapshot. But assuming the snapshot is correct, then the update can let people instantly claim all their earnings and fees in one low cost transaction, rather than claiming their earnings across hundreds or thousands of rounds requiring many very expensive transactions.