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:
- The overall energy usage and emissions of Ethereum are hard to estimate. I am working on this in a separate repo: kylemcdonald/ethereum-energy
- 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 formatYYYY-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 theEtherscan
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 todata/ethereum-stats.json
python nifty_gateway.py
will scrape all the contracts from Nifty Gateway and save them todata/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
- Deployer 2020-11-26 to 2021-08-13
- GenArt721 2020-11-26 to 2022-01-09
- GenArt721Core 2020-12-12 to 2022-01-09
Async
Foundation
- ERC-721 2021-01-13 to 2022-01-09
- FND NFT (FNDNFT) ERC-20 2021-01-13 to 2022-01-09
KnownOrigin
- ArtistAcceptingBids 2018-10-23 to 2020-11-13
- ArtistAcceptingBidsV2 2019-02-26 to 2022-01-07
- ArtistEditionControls 2018-11-07 to 2020-07-07
- ArtistEditionControlsV2 2019-02-26 to 2022-01-09
- KnownOrigin Token 2018-09-04 to 2022-01-09
- KnownOriginDigitalAsset 2018-04-04 to 2021-12-21
- SelfServiceAccessControls 2019-04-25 to 2021-08-23
- SelfServiceEditionCuration 2019-04-08 to 2020-07-07
- SelfServiceEditionCurationV2 2019-04-25 to 2020-07-07
- SelfServiceEditionCurationV3 2019-04-30 to 2020-07-07
Makersplace
- DigitalMediaCore 2019-03-11 to 2022-01-09
- Unknown 1 2019-02-26 to 2020-07-29
- Unknown 2 2020-02-24 to 2022-01-08
Nifty Gateway
- Many individual contracts defined in
data/nifty-gateway-contracts.json
- Builder Shop 2020-03-21 to 2021-07-27
- First and Last 2021-03-13 to 2022-01-09
- GUSD cashout 2020-01-31 to 2022-01-09
- Getaway Auctions 2021-03-15 to 2021-12-06
- Hard To Explain 2021-03-14 to 2022-01-07
- Insides 2021-03-14 to 2022-01-04
- Omnibus 2020-01-31 to 2022-01-09
OpenSea
- OpenSea Shared Storefront (OPENSTORE) 2020-12-02 to 2022-01-09
- OpenSea Token (OPT) 2021-02-05 to 2021-04-29
- OpenSeaENSResolver 2019-06-27 to 2020-07-03
- SaleClockAuction 2018-01-08 to 2021-10-18
- Unknown 1 2018-02-15 to 2020-06-18
- Unknown 2 2018-04-03 to 2021-08-16
- Wallet 2018-01-02 to 2022-01-09
- Wyvern Exchange 2018-06-12 to 2022-01-09
- WyvernProxyRegistry 2018-06-12 to 2022-01-09
Rarible
- Asset Contract ERC1155 2021-06-11 to 2022-01-09
- Asset Contract ERC721 2021-06-11 to 2022-01-09
- Deployer 2018-10-08 to 2021-12-16
- ERC1155 Factory 2021-08-05 to 2021-12-09
- ERC1155 Sale 1 2020-05-27 to 2020-10-11
- ERC1155 Sale 2 2020-09-03 to 2021-06-05
- ERC721 Factory 2021-08-05 to 2021-10-22
- ERC721 Sale 2020-09-03 to 2021-01-22
- Exchange 1 2020-11-17 to 2022-01-05
- Exchange Proxy 2021-06-11 to 2022-01-09
- External Royalties 2021-06-18 to 2022-01-09
- MintableToken 1 2019-10-18 to 2021-10-17
- MintableToken 2 2019-12-23 to 2022-01-06
- MintableToken 3 2020-05-27 to 2022-01-09
- RARI Token 1 2020-07-14 to 2022-01-09
- RARI Token 2 2020-05-27 to 2022-01-09
- RaribleToken 2020-05-27 to 2022-01-09
- TokenSale 2019-10-24 to 2020-08-31
- Treasury 2021-01-07 to 2021-12-09
- Unknown 1 2020-05-27 to 2020-09-12
SuperRare
- Bids 2019-09-04 to 2021-12-31
- SupeRare (SUPR) 2018-04-01 to 2022-01-09
- SuperRareV2 (SUPR) 2019-09-04 to 2022-01-09
- Unknown 1 2020-12-05 to 2022-01-09
- Unknown 2 2020-12-05 to 2022-01-09
Zora
- Market 2020-12-31 to 2020-12-31
- Media (ZORA) 2020-12-31 to 2022-01-09