Prometheus exporter which parses loans data from Maker protocol and calculate risks distribution based on collateral to loan ratio, see zones definition below.
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
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 |
{}_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
Pre-built grafana dashboards available in the ./grafana
directory. To run locally use docker-compose file as a
reference.
To create new release:
- Merge all changes to the
master
branch - Navigate to Repo => Actions
- Run action "Prepare release" action against
master
branch - When action execution is finished, navigate to Repo => Pull requests
- Find pull request named "chore(release): X.X.X" review and merge it with "Rebase and merge" (or "Squash and merge")
- After merge release action will be triggered automatically
- Navigate to Repo => Actions and see last actions logs for further details