基于区块链的毕业设计ETH2 Staking rewards calculator – ETH2赌注奖励计算器

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计ETH2 Staking rewards calculator – ETH2赌注奖励计算器 是一篇很好的国外资料

ETH2 Staking rewards calculator

Allows you to calculate the rewards on a day-by-day basis (useful for tax purposes).

The output is a CSV file containing the following data:

Date End-of-day balance [ETH] Income for date [ETH] Price for date [EUR/ETH] Income for date [EUR]
2020-12-01 32.007299849 0.007299848999998915 512.861535490493 3.743811766988183
2020-12-31 32.421139665 0.010904340999999818 612.095211614956 6.67449491191653
Total: 0.42113966499999833 212.81565225637513

The currency can be changed in the config file .

Requirements

  • Python 3.6+
  • installed Python dependencies (pip install -r requirements.txt)

Usage

python3 main.py

The script:

  • retrieves balance data from an ETH2 beacon node, using the parameters specified in config.yml . If you’re running a Prysm beacon node, make sure to set the PRYSM_API config option to True. If you’re running a Nimbus beacon node, make sure to set the NIMBUS_API config option to True.
  • pulls corresponding price data from CoinGecko
  • combines and writes these into a CSV file called rewards_{VALIDATOR_INDEX}_{ETH2_ADDRESS}.csv

Tested with

  • Lighthouse v1.1.0
  • Prysm v1.1.0 (set PRYSM_API to True in the config file)
  • Teku v21.1.1
    • Teku prunes chain data by default – if you’re getting 404 errors, make sure you are running Teku in archive mode to be able to retrieve balances for finalized epochs (--data-storage-mode=archive)
  • Nimbus v1.0.7 (set NIMBUS_API to True in the config file)

Donation

If this saved you some time, buy me a 🍺!

ETH2 Staking rewards calculator - ETH2赌注奖励计算器


ETH2 Staking rewards calculator

Allows you to calculate the rewards on a day-by-day basis (useful for tax purposes).

The output is a CSV file containing the following data:

Date End-of-day balance [ETH] Income for date [ETH] Price for date [EUR/ETH] Income for date [EUR]
2020-12-01 32.007299849 0.007299848999998915 512.861535490493 3.743811766988183
2020-12-31 32.421139665 0.010904340999999818 612.095211614956 6.67449491191653
Total: 0.42113966499999833 212.81565225637513

The currency can be changed in the config file .

Requirements

  • Python 3.6+
  • installed Python dependencies (pip install -r requirements.txt)

Usage

python3 main.py

The script:

  • retrieves balance data from an ETH2 beacon node, using the parameters specified in config.yml . If you’re running a Prysm beacon node, make sure to set the PRYSM_API config option to True. If you’re running a Nimbus beacon node, make sure to set the NIMBUS_API config option to True.
  • pulls corresponding price data from CoinGecko
  • combines and writes these into a CSV file called rewards_{VALIDATOR_INDEX}_{ETH2_ADDRESS}.csv

Tested with

  • Lighthouse v1.1.0
  • Prysm v1.1.0 (set PRYSM_API to True in the config file)
  • Teku v21.1.1
    • Teku prunes chain data by default – if you’re getting 404 errors, make sure you are running Teku in archive mode to be able to retrieve balances for finalized epochs (--data-storage-mode=archive)
  • Nimbus v1.0.7 (set NIMBUS_API to True in the config file)

Donation

If this saved you some time, buy me a 🍺!

ETH2 Staking rewards calculator - ETH2赌注奖励计算器

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20237.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计ETH2 Staking rewards calculator – ETH2赌注奖励计算器

提供最优质的资源集合

立即查看 了解详情