kylemcdonald / ethereum-nft-activity Goto Github PK
View Code? Open in Web Editor NEWEstimate the total emissions for popular CryptoArt platforms.
License: MIT License
Estimate the total emissions for popular CryptoArt platforms.
License: MIT License
ethereum_footprint.py
needs to be almost completely replaced:
__init__
, instead of loading the digiconomist energy consumption and etherscan gasUsed data, load the ethereum-emissions
file daily-ktco2.csv
which is regularly update on the gh-pages branch. Also, load an instance of the EthereumStats
class, which will give you access to the tx_fees
dict (mapping dates to total tx_fees).kgco2_per_gas()
from EthereumFootprint
get_etherscan_data()
from EthereumFootprint
sum_kgco2()
should run a different calculation. First, sum all transactions
fees (using tx.get_fees()
) based on the date of the transaction (using tx.get_datetime()
). Then for each day, divide the total fees from those transactions by the total fees on that day (using tx_fees
from the EthereumStats
instance). Finally, sum all values, then convert from kilotons to kilograms.Separately:
contracts_footprint.py
: add fees
to each row and remove gas
. Then re-run contracts_footprint.py
and update the table in the readme.Note: any server that regularly computes these numbers is going to need to run ethereum_stats.py
on a daily basis to update the total transaction fees. Also, any emissions estimated for the current day should be treated with suspicion, as different data sources may be out of sync with each other.
the files are big enough now to make this worth doing. not so much for speed, because etherscan is the true bottleneck, but for the purpose of maintaining a low memory footprint (and maybe low disk footprint too).
probably can switch this over quickly with sqlite3 if de-duplication is handled in python.
the script has been failing for the last month because it hit memory limits. using a db can fix this.
I think it would be great to see what percentage these NFT's are taking up of the total ethereum network -- it could help create some context.
143,595,457,124 is a very big Gas number but what does that mean? Off hand I think Open Sea is something like 0.5-2% of Ethereum's gas usage for the day depending on the day -- you should show how much of the network it's using
when the stats are computed, the current day is just starting and has few or no transactions. this makes it look like the graph is always heading downwards, which is inaccurate.
Vilusion
Etherscan has a 5 calls per second rate limit for the free tier. Instead of pausing every time we hit a rate limit, we could rate limit the fetch_transactions_in_range
function itself.
I've brought this up elsewhere but I'd love your perspective.
Since you're relying on Digiconomist energy estimation maybe you can help me get to the bottom of this:
Digiconomist says they:
If you go to you can see their source of data https://digiconomist.net/ethereum-energy-consumption
However for those four steps:
I think it's really problematic all these calculators like carbon.fyi, cryptoart.wtf and now yours are being built on top of these layers of assumptions and "energy assumed backwards from profit with no sources".
I've seen a handful of other Bitcoin studies that are more "bottom up" than "top down" like https://www.sciencedirect.com/science/article/pii/S2542435119302557 but their estimates are on the low end of Digiconomist and they say at length:
Previous academic studies, such as predictions of future carbon emissions or comparisons of cryptocurrency and metal mining, are based on simplistic estimates of power consumption and lack empirical foundations. Consequently, the estimates produced vary significantly among studies
I don't think you should use Digiconomist as a source of data if they have no sources. If you can find a more rigorous estimate of Ethereum network energy usage I think it would be really a great resource. Digiconomist lacks credibility even though its so highly pointed to
all of this should be replaced https://github.com/kylemcdonald/cryptoart-footprint/blob/main/ethereum_footprint.py#L20-L45 so we don't do the math every time we run.
not for efficiency's sake, but for simplicity.
update: working on new process for this in https://github.com/kylemcdonald/ethereum-energy/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.