Climate change should be treated as a waste management problem. If you produce waste [emissions], you pay somebody to remove it [offset these emissions]. Today, there is no easy way to offset carbon emissions in the crypto space (even though the carbon footprint of blockchain transactions is not negligible). We wanted to change that!

What it does

We have built the necessary primitives to use carbon offsets within the Ethereum ecosystem. These primitives allow:

  • crypto nerds like us to offset their emissions (e.g. flights) through our website
  • all dApps to offer their users the possibility to offset their carbon emissions (e.g. from crypto transactions)
  • all 3rd party smart contracts to add our offset() modifier into their methods, automatically offsetting all transactions going through that contract—essentially creating green smart contracts

How we built it

  • a CO2ken.sol contract which holds tokenized carbon offsets called CO2kens representing a negative tonne of CO2. This contract has an offsetCarbon() method which accepts DAI and burns a respective amount of CO2kens
  • These CO2kens are minted by a DAO set up on Aragon. A DAO member purchases offsets from traditional offset certificate retailers, uploads proof to IPFS and creates a proposal in Aragon to mint a respective amount of CO2kens. Other DAO members verify the uploaded certificate and vote in favor of minting new CO2kens if the certificate is valid. The DAO also manages the parameters need for computations stored in CO2kenData.sol (token price & carbon footprint of 1 unit of gas)
  • All web3 applications can now interact with our CO2ken.sol contract through a eth-co2.js npm package. This opens the door to a multitude of use cases:
    • Integrations into wallets to offset all crypto transactions
    • Allows dApps to offer their users an offset functionality
  • We also deployed a Green.sol contract which is a solidity modifier called offset(). This modifier can be added to all 3rd party smart contract methods to automatically offset all transactions which go through the respective smart contract. In this case, the contract owner pays for the offset essentially making it a green contract
  • We've built a frontend which allows users to offset their emissions and pay for it with DAI: We've used dapphero, webflow and our eth-co2.js library to offer that functionality

Challenges we ran into

  • Setting up a DAO. We've tried both DAOStack and Aragon and couldn't make it happen. Aaron from Aragon finally pointed us toward the "winning solution". After that it was easy
  • Setting up eth-co2.js in the correct way
  • Webflow's limited "hackability"
  • Minimize the carbon footprint of our own contract executions. Solved it through batching
  • Debugging solidity

Accomplishments that we're proud of

  • No screaming, no crying, no spitting at each other
  • Iterative approach—adding building block after building block
  • A simple design which has a powerful impact
  • No risk for the users due to full transparency and risk absorbed by the DAO "preloading" the CO2ken.sol contract with CO2kens

What we learned

  • How to set up a DAO!
  • How to hack dAppHero and webflow as best as possible
  • Lots of solidity dev skills, especially around multi-contract architectures
  • Lots of Javascript / Typescript / npm tricks and pitfalls
  • The importance of useful error messages
  • git skills
  • How awesomely helpful the Ethereum community can be
  • Experience of working as a tight-knit team under time pressure

What's next for CO2ken

  • We have got lots of positive feedback for the project and will definitely pursue it.
  • There is a clear business case behind the project, so if you're an investor, throw your DAI at us <3
  • We have to fine-tune the DAO's incentive structure. Potentially integrating a bonding curve to incentivize members to maintain a "safe" supply of CO2kens
  • We're thinking about integrating dispute resolution through Aragon Court or Kleros. This would add additional security to the users
  • We bought the domain name
  • And of course: double and triple-check our code before deploying to mainnet
  • Save the planet, one CO2ken at a time :P

Built With

+ 1 more
Share this project: