hack icon indicating copy to clipboard operation
hack copied to clipboard

Build a plugin for calculating SCI of blockchains

Open ktg9 opened this issue 1 year ago • 13 comments

Type of project

Building a plug-in for Impact Framework

Overview

Background

The energy consumption of blockchain is a growing concern. Currently, according to some researches, Bitcoin alone accounts for 0.38 % of the whole global electricity consumption (https://www.jbs.cam.ac.uk/2023/bitcoin-electricity-consumption). Bitcoin mining process also consumes a lot of fresh water in their cooling process, some researchers estimate that US Bitcoin miners uses around 93 - 120 gigalitres (GL), equivalent to the average annual water consumption of around 300,000 U.S. households.

With the growing popularity of blockchain technology, more blockchains will be created in the future and more users will take part in the ecosystem. That means more nodes, more transactions and more resources like electricity or fresh water are used.

There have been some efforts by blockchain organizations to reduce the energy consumption by their nodes. For example, Ethereum switching from PoW (proof-of-work) consensus mechanism to Pos (proof-of-stake) reduces 99.99% energy consumption, a fantastic result. I think the Impact Framework can contribute to the process of raising blockchain users awareness about the impact their actions/software/systems can have over the environment.

About the plugin

Here is what I have in mind for this plugin right now. The plugin would calculate how much resources consumed for these types of users:

  • Blockchain developers: These are the people who will develop and deploy blockchains themselves, the plugin should give them an overview of how much resources their blockchains will consume given the inputs like the mechanism they use (PoW, PoS, token,..), the number of nodes, the node configuration.
  • Cryptocurrency miners / validators: To answer a question, if someone deploys a miner/validators machine with this configuration (x GB of RAM, CPU 8 cores,..) in block chain X (Bitcoin, Ethereum,...), how much resources like electricity, fresh water I need?
  • Blockchain traders: Give them an overview of how much resources these blockchains/tokens consumed annually so they may know which blockchain is "green"
  • Smart contract developers: Smart contracts are just programs running on top of blockchains, so it would be nice of the developers can calculate how much resources their smart contracts used.

Questions to be answered

These are some issues I would like to discuss with Carbon hack team:

  1. The most important thing is data and researches concerning the energy consumption of blockchains. The Crypto Carbon Rating Institute (https://carbon-ratings.com/) provides an API service where we can get some of the data like energy consumption annually of a blockchain. Are you aware of any other data sources or researches that we can use to do calculation ourselves?

  2. The calculation for energy consumed by smart contracts is the hardest question here I think, I've done some researches and haven't found any solid researches, also found no data sources.

Have you got a project team yet?

Yes and we are still open to extras members

Project team

No response

Terms of Participation

Project Submission

Summary

EcoChain is a GSF plugin that helps measure environmental impacts (carbon emission, fresh water consumption, electronic waste, land conversion).

Problems

Blockchain, especially Bitcoin, has a profound environmental impact. While numerous studies have calculated the environmental impact of blockchains, they typically provide only an aggregate number reflecting the environmental impacts of entire blockchain networks. While such figures are meaningful for raising awareness among blockchain users, they fail to illustrate the environmental impacts of individual users' actions in utilizing blockchains.

Application

This plugin attempts to show users the impact of their own actions by calculating the environmental impacts of each specific blockchain transaction. The environmental impacts of blockchain transactions will serve as the basis for calculating users' environmental impacts when interacting with blockchains. With this data, we can assess the environmental footprint of various DeFi projects such as UniSwap, USDC coin, Vault, and others. Smart contract developers will be able to estimate the environmental impacts of their smart contracts on different platforms such as Solana, Avalanche, and others

Prize Category

Beyond Carbon

Judging criteria

  1. Measure impacts beyond carbon:
  • The plugin calculates Bitcoin transactions electronic waste, fresh water consumption and land conversion (other blockchains are not supported yet.)
  1. Overall impact:
  • What potential impact will this model have on the broader sustainability movement?:

    • This plugin can help educate normal users about their actions' environmental impacts
    • Once we raise awareness within the blockchain user community, blockchain users may be persuaded to switch to using greener blockchain networks, greener DeFi projects, or greener cryptocurrencies.
    • Eventually, this plugin can contribute to transforming the blockchain industry towards a greener future.
  • What things need to happen for that impact to occur?

    • The environmental impacts output by this plugin must be utilized and understood by blockchain users whenever they are about to engage with a blockchain network, cryptocurrency, DeFi project, or create a new smart contract.
  1. Educational Value:
  • Does the project help people understand more about emissions and planetary boundaries? Imagine it as a good teacher—making complex topics easy to grasp and sparking interest in learning more:
    • The project helps blockchain users understand the impacts of their actions (transferring crypto, call smart contract, deploy smart contract,...)
    • Blockchain users can see how much carbon emissions, land conversion, freshwater consumption, and electronic waste their actions produce.
  1. Synthesizing
  • How well does the model integrate and combine information from existing research? Are any coefficients, methodologies, or techniques backed up with good citations? How can we trust the outputs of this model are correct?:
    • The plugin methodology is based on numerous widely accepted research studies. All coefficients, methodologies, and techniques are derived from reputable sources
    • The plugin also cross-checks the output with numbers from trusted sources.

Video

https://youtu.be/KhUEAdZiwpw

Artefacts

https://github.com/ktg9/EcoChain

Usage

https://github.com/ktg9/EcoChain/blob/main/examples/Basic-Usage.md

Process

The process of building this plugin:

  • Find researches/papers to develop the plugin methodology
  • Gather data sources and process them
  • Use the data to build models for calculation
  • Write the GSF plugin code
  • Compare the result with other sources
  • Write unit test, documentation

Inspiration

Two factors that inspired me to develop this plugin are my experiences working in the blockchain industry and my desire to contribute efforts towards reducing global warming.

Challenges

Challenges that I encountered building this plugin:

  • The main problem is data

    • Data comes from many sources and the process of validating/retrieving/processing these data takes a lot of time.
  • The complex structures of some blockchains:

    • Ethereum for example, has multiple L2 solutions connected to the main chain. This creates a lot of difficulties in estimating Ethereum transaction environmental impact. As I stated in the doc, I couldn't find a good enough model for Ethereum, therefore it's not supported.
  • A significant amount of research papers needed to be reviewed to develop the methodology for the plugin.

Accomplishments

  • About the output, this plugin has calculated carbon emission for 8 blockchains. For bitcoin, 3 more environmental impacts are quantified: fresh water consumption, electronic waste and land conversion.
  • The plugin also provides methodologies that could be applied for other blockchains if enough data is gathered.

Learning

  • Technical learning:
    • GSF plugin and impact framework
    • How to quantify numerous blockchain environmental impacts
  • Other learning:
    • Ecological ceiling, the current status of global warming, resources lacking (fresh water, land, ...) on Earth

What's next?

This plugin could be used as a background/reference for future development to cover many other blockchains environmental impacts.

ktg9 avatar Feb 01 '24 13:02 ktg9