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:
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:
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.
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.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
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.
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:
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 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
.
data/nifty-gateway-contracts.json