Skip to content

maede97/MinusMinusEnergy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MinusMinusEnergy

A BETH2019 project for the SwissEnergy Challenge

MinusMinusEnergy is a blockchain project which was created in February 2019 during the BETH Hackathon at ETH Zurich.
A list of features added after the challange is provided in After BETH2019

Full Demo

Web interface that allows the user to select the amount of tokens he wants to pay and how much should go to the fund

Demo

Run these commands

$ git clone https://github.com/maede97/MinusMinusEnergy.git
$ cd MinusMinusEnergy
$ npm install
$ npm test
$ npm start

Or watch the GIF above (shortened, hence the black flicker in the middle)

Further Information is available here:

Table of Contents

The Team

Matthias Busenhart (ETHZ Bsc RW/CSE)
Webserver (JS), Blockchain (Solidity) - maede97

Philip Wiese (ETHZ Bsc ETIT)
Webserver (JS), Blockchain (Solidity) - Xeratec

Marie-Louise Achart (ETHZ Bsc RW/CSE)
Broker (Python), Documentation (LaTeX) - MarieLouiseAchart

Yannick Niedermayr (ETHZ Bsc RW/CSE)
Broker (C++, Python), Misc. - yniederm

Manuel Winkler (ETHZ Bsc RW/CSE)
Broker (C++) - manuel5975p

Usage

Dependencies

The project has the following dependencies, make sure you have them all installed:

  • Make
  • Cmake 3.1
  • A C++ compiler such as gcc or clang
  • libsqlite3-dev
  • sqlite3
  • Python 3
  • nodeJS Link
  • npm Link
  • Ganache Link

Arch Linux

arch$ sudo pacman -S sqlite3 make cmake python gcc

Ubuntu

ubuntu$ sudo apt install sqlite3 libsqlite3-dev make cmake python3 gcc

Demo

Description
The demo deploys the MMEToken, Bill and Fund contract on a local Ganache instance and adds an energy provider to the bill contract. The energy provider can issue new bills to a specific address.

The demo script also generates a signed transaction with the trusted private key of the sensor to claim MMETokens on the MMEToken contract for reduced energy consumption.

On the webinterface the client can analyze his energy consumption and pay his bills. He can decide to use some of his MMEToken to pay for his bill or invest them into a fund. The money in the fund could be used to finance local clima-pro projects, optionally with a integrated voting system (not implemented).

Information

  • Ganache
    Port: 7545
    Network ID: 5777
    Hostname: 127.0.0.1 - lo
    Number of Accounts: >=3
    Account 1: Contract Owner (subsidize eg. government)
    Account 2: Energy Provider (eg. EWZ)
    Account 3: Client
  • Webserver
    URL: http://localhost:3000
  • Metamask
    Selected Account: Account 3

Installation

On a Raspberry Pi, run the following commands:

$ git clone https://github.com/maede97/MinusMinusEnergy.git
$ cd MinusMinusEnergy
$ ./install.sh

Presentation & Report

Presentation

Compile the presentation with:

$ cd /doc/presentation
$ pdflatex presentationMinusMinusEnergy.tex

Report

Compile the final report with:

$ cd /doc/report
$ pdflatex reportMinusMinusEnergy.tex

Future Development

ToDo

  • Security improvement
  • Voting system for Fund
  • Angular Fronted

After BETH2019

The "BETH Friday" Version of the code can be found under the tag alpha-1.0.0

  • Bugfix for Bill SmartContracts
  • Minor Improvement in the fronted

Links for developers

Ethereum

Javascript