GithubHelp home page GithubHelp logo

maker-risks-bot's Introduction

Maker collaterals monitoring bot

Prometheus exporter which parses loans data from Maker protocol and calculate risks distribution based on collateral to loan ratio, see zones definition below.

Run

docker compose

  • Create a .env file from .env.example and fill in the required variables.
  • Execute command:
docker compose up -d bot

docker

  • Create a .env file from .env.example and fill in the required variables.
  • Build image:
docker build -t maker-risks-bot .
  • Run container:
docker run -d -P --env-file ./.env maker-risks-bot

dev

  • Expose environment variables presented at .env.example.
  • Install dependencies via poetry:
poetry install
  • Execute command:
python src/main.py

Zones definition

Risk zones defined as a ranges of collateral to loan ration

Zone > <
A 2.50 โˆž
B+ 1.75 2.50
B 1.50 1.75
B- 1.25 1.50
C 1.10 1.25
D 1.00 1.10
Liquidation 0 1.00

The most important exposed metrics

  • {}_collateral_percentage{ilk=<ilk>, zone=<zone>} is computed percent of collaterals in the given zone
  • {}_processing_finished_seconds{ilk=<ilk> is timestamp of the last metrics update
  • {}_bot_last_block_num is the last block parser results was updated against
  • {}_eth_latest_block_num is the latest block available for the parser

Visualisation

Pre-built grafana dashboards available in the ./grafana directory. To run locally use docker-compose file as a reference.

Release flow

To create new release:

  1. Merge all changes to the master branch
  2. Navigate to Repo => Actions
  3. Run action "Prepare release" action against master branch
  4. When action execution is finished, navigate to Repo => Pull requests
  5. Find pull request named "chore(release): X.X.X" review and merge it with "Rebase and merge" (or "Squash and merge")
  6. After merge release action will be triggered automatically
  7. Navigate to Repo => Actions and see last actions logs for further details

maker-risks-bot's People

Contributors

dependabot[bot] avatar dgusakov avatar github-actions[bot] avatar madlabman avatar skhomuti avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.