yearn / yearn-exporter

Realtime and historical Yearn metrics
https://yearn.vision
MIT License
95 stars 146 forks source link
defi grafana grafana-dashboard yearn

Yearn Exporter

Collects real-time on-chain numeric data about all Yearn products and exposes it in multiple formats. Currently, it's able to export data from the following networks: Ethereum, Fantom, Arbitrum, Gnosis, and Optimism.

The hosted version is available at https://yearn.vision.

Installation

You will need:

Usage

Run make up to start all of the exporters.

Grafana Dashboard & Exporters

Export the environment variables required in .env.example into .env to run the dashboards and exporters:

# Make sure all .env variables loaded (`source .env`), check with `echo $variable_name_here`
make build && make dashboards

After a successful startup, you can go directly to Grafana at http://localhost:3000. If you want to change your dashboards you can sign in at the lower left with admin:admin.

Historical TVL

# Make sure all .env variables loaded (`source .env`), check with `echo $variable_name_here`
make build && make tvl

After a successful start up you can access the tvl rest endpoint at http://localhost:4000.

Run All

# Make sure all .env variables loaded (`source .env`), check with `echo $variable_name_here`
make build && make up
# Optionally you can filter `make up` by `make up network=eth` or network=ftm ect for networks supported in the make file

Setting up GitHub Actions

Create Access Keys for apy-exporter-service-user user.

Create a new environment named production and add the newly created AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

Docker setup

The dockerized exporter is controlled via make up command which is invoked via multiple Makefile recipes. It is possible to specify multiple Makefile args that control which exporters are started on which network. The available args to control the startup sequence of containers are the following:

This is a flexible approach to start multiple containers on multiple networks which can be used for a given network or given exporters of a certain type and a combination of both.

Usage examples: