All Projects → kylemcdonald → ethereum-nft-activity

kylemcdonald / ethereum-nft-activity

Licence: MIT license
Estimate the total emissions for popular CryptoArt platforms.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ethereum-nft-activity

open-earth-compiler
development repository for the open earth compiler
Stars: ✭ 50 (-72.53%)
Mutual labels:  climate
cloud-carbon-footprint
Cloud Carbon Footprint is a tool to estimate energy use (kilowatt-hours) and carbon emissions (metric tons CO2e) from public cloud usage
Stars: ✭ 510 (+180.22%)
Mutual labels:  climate
pi-eco-indicator
Display at-a-glance data of carbon intensity or Octopus Agile prices on a Pimoroni Blinkt! display or a Pimoroni Inky pHAT display.
Stars: ✭ 15 (-91.76%)
Mutual labels:  climate
ClimateLaboratoryBook
JupyterBook source for The Climate Laboratory
Stars: ✭ 74 (-59.34%)
Mutual labels:  climate
openclimate-demo
Open Climate Repo
Stars: ✭ 54 (-70.33%)
Mutual labels:  climate
mptrac
Massive-Parallel Trajectory Calculations (MPTRAC) is a Lagrangian particle dispersion model for the analysis of atmospheric transport processes in the troposphere and stratosphere.
Stars: ✭ 19 (-89.56%)
Mutual labels:  climate
climate
Mirror of Apache Open Climate Workbench
Stars: ✭ 135 (-25.82%)
Mutual labels:  climate
aospy
Python package for automated analysis and management of gridded climate data
Stars: ✭ 80 (-56.04%)
Mutual labels:  climate
tuya-local
Local support for Tuya devices in Home Assistant
Stars: ✭ 150 (-17.58%)
Mutual labels:  climate
gribr
GRIB interface for R using ECMWF ecCodes
Stars: ✭ 18 (-90.11%)
Mutual labels:  climate
pygac
A python package to read and calibrate NOAA and Metop AVHRR GAC and LAC data
Stars: ✭ 14 (-92.31%)
Mutual labels:  climate
climate-watch
Climate Watch: Data for Climate Action
Stars: ✭ 25 (-86.26%)
Mutual labels:  climate
hacktoberfest-2020
Let's tackle the Climate-Change together with Open-Source 🌍 + 👩‍💻
Stars: ✭ 23 (-87.36%)
Mutual labels:  climate
openair-cyan
DIY small-scale open hardware direct air carbon capture device called Cyan. Our documentation is on https://openair-collective.github.io/openair-cyan
Stars: ✭ 54 (-70.33%)
Mutual labels:  climate
cate-desktop
Desktop GUI for the ESA CCI Toolbox (Cate)
Stars: ✭ 15 (-91.76%)
Mutual labels:  climate
cfdm
A Python reference implementation of the CF data model
Stars: ✭ 24 (-86.81%)
Mutual labels:  climate
geomet-climate
Geospatial web services for Canadian climate data
Stars: ✭ 16 (-91.21%)
Mutual labels:  climate
climate system
Notes and practicals for my "Physics of the Climate System" lecture
Stars: ✭ 13 (-92.86%)
Mutual labels:  climate
flyingpigeon
WPS processes for climate model data, indices and extreme events
Stars: ✭ 18 (-90.11%)
Mutual labels:  climate
cft
Climate futures toolbox: easy MACA (MACAv2) climate data access 📦
Stars: ✭ 16 (-91.21%)
Mutual labels:  climate

ethereum-nft-activity

How much energy does it take to power popular Ethereum-backed CryptoArt platforms? And what emissions are associated with this energy use?

These questions do not have clear answers for two reasons:

  1. The overall energy usage and emissions of Ethereum are hard to estimate. I am working on this in a separate repo: kylemcdonald/ethereum-energy
  2. The portion for which a specific user, platform, or transaction might be considered "responsible" is more of a philosophical question than a technical one. Like many complex systems, there is an indirect relationship between the service and the emissions. I am working on different approaches in this notebook: Per-Transaction Models

This table represents one method for computing emissions, as of March 5, 2022. The methodology is described below.

Name Fees Transactions kgCO2
Art Blocks 12,006 244,594 21,531,626
Async 224 27,403 332,657
Foundation 8,602 661,074 14,568,164
KnownOrigin 507 64,326 904,455
Makersplace 1,840 144,163 3,010,383
Nifty Gateway 1,621 151,950 2,385,675
OpenSea 314,515 20,012,086 551,268,013
Rarible 20,930 1,802,971 27,706,539
SuperRare 2,215 320,697 3,172,169
Zora 532 21,660 721,254

Updates:

  • March 5, 2022: Missing contracts were added to Art Blocks and OpenSea, massively incresaing their totals. Duplicate contracts were removed remove Nifty Gateway, halving the totals. The contracts were duplicated because they were found both when scraping Nifty Gateway, and also when pulling labeled contracts from Etherscan.

Preparation

First, sign up for an API key at Etherscan. Create env.json and add the API key. It should look like:

{
    "etherscan-api-key": "<etherscan-api-key>"
}

Install dependencies:

pip install -r requirements.txt

Note: this project requires Python 3.

contracts_footprint.py

This will pull all the transactions from Etherscan, sum the gas and transaction counts, and do a basic emissions estimate. Results are saved in the /output directory as JSON or TSV. Run the script with, for example: python contracts_footprint.py --verbose --tsv data/contracts.json data/nifty-gateway-contracts.json.

This may take longer the first time, while your local cache is updated. When updating after a week, it can take 5 minutes or more to download all new transactions. The entire cache can be multiple gigabytes.

This script has a few unique additional flags:

  • --summary to summarize the results in a format similar to the above table, combining multiple contracts into a single row of output.
  • --startdate and --enddate can be used to only analyze a specific date range, using the format YYYY-MM-DD.
  • --tsv will save the results of analysis as a TSV file instead of JSON.

contracts_history.py

This will pull all the transactions from Etherscan, sum the transaction fees and gas used, and group by day and platform. Results are saved in the /output directory as CSV files. Run the script with, for example: python contracts_history.py --verbose data/contracts.json data/nifty-gateway-contracts.json

The most recent results are cached in the gh_pages branch.

Additional flags

Both scripts have these shared additional flags:

  • --noupdate runs from cached results. This will not make any requests to Nifty Gateway or Etherscan. When using the Etherscan class in code without an API key, this is the default behavior.
  • --verbose prints progress when scraping Nifty Gateway or pulling transactions from Etherscan.

Helper scripts

  • python ethereum_stats.py will pull stats from Etherscan like daily fees and block rewards and save them to data/ethereum-stats.json
  • python nifty_gateway.py will scrape all the contracts from Nifty Gateway and save them to data/nifty-gateway-contracts.json

Methodology

The footprint of a platform is the sum of the footprints for all artwork on the platform. Most platforms use a few Ethereum contracts and addresses to handle all artworks. For each contract, we download all the transactions associated with that address from Etherscan. Then for each day, we take the sum of all fees paid on all those transactions divided by the total fees paid across the whole network for that day. This ratio is multiplied by the daily Ethereum emissions estimate to get the total emissions for that address. Finally, the total emissions for a platform are equal to the emissions for all addresses across all days.

Sources

Contracts are sourced from a combination of personal research, DappRadar, and Etherscan tags.

When possible, we have confirmed contract coverage directly with the marketplaces. Confirmed contracts include:

  • SuperRare: all confirmed
  • Foundation: all confirmed
  • OpenSea: some contracts on DappRadar have not been confirmed
  • Nifty Gateway: all confirmed

How to add more platforms

To modify this code so that it works with more platforms, add every possible contract and wallet for each platform to the data/contracts.json file, using the format:

'<Platform Name>/<Contract Name>': '<0xAddress>'

Then submit a pull request back to this repository. Thanks in advance!

Contracts and Addresses

Contracts and addresses used by each platform can be found in data/contracts.json and are also listed here using python print_contracts.py to generate Markdown. Nifty Gateway contracts are listed separately in data/nifty-gateway-contracts.json.

Art Blocks

Async

  • ASYNC 2020-02-25 to 2021-12-21
  • ASYNC-V2 2020-07-21 to 2022-01-09

Foundation

KnownOrigin

Makersplace

Nifty Gateway

OpenSea

Rarible

SuperRare

Zora

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].