Giter Club home page Giter Club logo

open-credit-score-chain's Introduction

Open-Credit-Score-Chain

The Open-Credit-Score-Chain (OCSC) is a proof of concept for an open and decentralized credit scoring system. Users can see each entry of their credit score records and can choose what they want to share with whom. The data to calculate the score from is stored encrypted on a blockchain, thus only the user can read the content. If a company wants to know the credit score of a person, the person can provide a zero-knowledge proof (zk-SNARK) of their score. This way no unnecessary information is leaked, the user has full transparancy of their records and companies can nevertheless trust the scoring system.

โš ๏ธ This software is just a proof-of-concept It was developed during a 24h hackathon. Especially the cryptographic modules should not be used in any real-world application!

Concept

Alt text

Why Ethereum?

We don't want to use more energy than necessary for storing the records and calculating the credit score of a person. Although Ethereum currently uses the proof-of-work algorithm that wastes a lot of energy, it will soon switch to a more resource-friendly proof-of-stake algorithm. On top of that the Ethereum ecosystem is very mature which makes it a perfect candidate for this task.

Future

At the moment we are using a dedicated backend to talk to the Ethereum smart contracts and to create the zk-SNARKs. This is not optimal because users should never have to trust an other entity other than themselves. In the future the whole interaction with the blockchain should eventually move to the browser where the user has full control over the environment. However, zk-SNARKs can be computationally very expensive. For this reason there could be a client-side verifiable homomorphic re-encryption of the data, so the server can create a zk-SNARK without ever seeing the un-encrypted data.

Requirements

When you are running on NixOS or you have Nix installed you can just run:

$ nix develop # In case you have nix flakes enabled
$ nix-shell # Otherwise

Otherwise you will need the following software installed:

  • ganache (Local ethereum network)
  • go 1.16
  • solc
  • go-ethereum

Getting started

Starting the local Ethereum blockchain

$ ganache-cli -d

Starting the backend and deploying the authority smart contract

$ make gen-go-bindings
$ cd backend && go run .

Helpful resources

TODOs

  • Create the basic smart contracts (see contracts/)
  • Deploy the contracts to the blockchain (see backend/main.go)
  • Encrypt and decrypt records for an Ethereum user (see backend/records/)
  • Create zk-SNARKs of the credit score (see backend/zkproof/)
  • Verify zk-SNARKs with the public hashes available (see backend/zkproof/)
  • Implement the REST API in the backend
  • Create frontend to interact with the backend
  • Access right checking in the smart contracts
  • Authentication to the backend
  • Secure multiparty implementation of the zk-SNARK to be able to create zk-Proofs without having the server knowing about the plain-text records
  • Modular zk-SNARKs for alternative algorithms (at the moment we just create a sum of all inputs)

License

The Open-Credit-Score-Chain project is licensed under the Apache License, Version 2.0. See LICENSE for details.

open-credit-score-chain's People

Contributors

mstrangfeld avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.