Coder Social home page Coder Social logo

yuukidach / defi-assessment Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 17.8 MB

A prototype project to perform risk assessment on different DeFi lending platforms.

License: GNU General Public License v3.0

Python 7.12% Jupyter Notebook 91.85% HTML 1.02%
defi risk-assessment blockchain

defi-assessment's Introduction

DeFi Assessement (dass)

A prototype project to perform risk assessment on different DeFi lending platforms.

Overview

Web Page

Command-line Tool

Installation

From local repository:

pip3 install .[cpu]  # for tensorflow with cpu only
pip3 install .[gpu]  # for tensorflow-gpu

From PyPI:

pip3 install DeFi-Assessment[cpu]
pip3 install DeFi-Assessment[gpu]

Usage

This project is packed into a command-line tool with 4 subcommand:

Usage: dass [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help  Show this message and exit.

Commands:
  data     Collect raw data.
  process  Process the data related to smart contracts.
  train    Train models.
  web      Create a simple local website to view the result.

The workflow of the 4 commands should be:

data -> process -> train -> web

Data collection

data command is used to collect data for training and assessment (prediction). All of the other three commands are dependent on it. Make sure to run this command at beginning.

To collect data for smart contracts, docs/platforms.csv shoud be used. This file provides the github repository link for different smart contracts. And it also provide intermediary status for corresponding platforms.

This command will NOT overwrite any existing data. Users can use --inc option to collect data in incremental mode, which means new records and new attributes will be collected. And old data still exists.

Data process

process command is aimed to process raw data. Currently, only sart contract data need to be processed after collection.

Model Training

train command is simple. It trains 2 models. A Random Forest model for smart contracts and a LSTM mdoel for financial risks.

Web Application

web command builds a local web interface for users to directly view the result of assessement.

Contributors

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.