DeFi Vision

Powered by Covalent API

Introduction

The DeFi Vision app is built using Python, Flask and VueJS
Only Python 3.6+ is supported

TODO

Request to join the ClickUp: https://app.clickup.com/4744668/v/b/f/27776490

Backend installation

  1. Clone repository
$ git clone https://github.com/AlchemistsLab/DeFi-vision
$ cd DeFi-vision
  1. Install Python dependencies
$ cd server
$ pip3 install -r requirements.txt
  1. Run server
$ python3 app.py
  1. Get listings
$ curl localhost:5000/listings
  1. Get holdings
$ curl -d '{"wallet_address":"0x00000"}' -H "Content-Type: application/json" -X POST localhost:5000/holdings

Expect json responses from the backend:

[
    {
        "ticker": [
            "WETH",
            "USDC"
        ],
        "quote_rate": 162016928.0,
        "total_liquidity_quote": 414333216.0,
        "total_supply": "2557345006142774542",
        "volume_24h_quote": 92265264.0,
        "fee_24h_quote": 276795.78,
        "exchange": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
        "apy": 24.38386684885047
    },
    {
        "ticker": [
            "WETH",
            "UNI"
        ],
        "quote_rate": 1366.7461,
        "total_liquidity_quote": 275315712.0,
        "total_supply": "201438818276793195052989",
        "volume_24h_quote": 17022532.0,
        "fee_24h_quote": 51067.598,
        "exchange": "0xd3d2e2692501a5c9ca623199d38826e513033a17",
        "apy": 6.770290418441501
    }
]

Frontend installation

  1. Install Javascript dependencies
$ cd client
$ npm install
  1. Run server
$ npm run dev
  1. Your application is running here: http://localhost:8080

Docker compose deployment

  1. Clone repository
$ git clone https://github.com/AlchemistsLab/DeFi-vision
$ cd DeFi-vision
  1. Edit client/.env

  2. Trigger the deployment

$ docker-compose up --build

3 different containers are created and running:

  • nginx proxy
  • vuejs frontend
  • python flask backend
Last Updated: 5/24/2021, 6:44:17 AM