Skip to content

This repository provides an API for retrieving reward data for stake pools and delegators. It utilizes Koios to fetch the data, aggregates and stores it, and serves it for the cardano explorer

License

Notifications You must be signed in to change notification settings

cardano-foundation/cf-explorer-rewards

Explorer Rewards Service

Tests Coverage Release Publish FOSSA Status conventionalcommits

This repository provides an API for retrieving reward data for stake pools and delegators. It utilizes Koios to fetch the data, aggregates and stores it, and serves it for the cardano explorer. It currently uses Koios to fetch the required data. A separate project to calculate the rewards without relying on DB Sync can be found here.

👉 Check the Explorer repository to understand how the microservices work together

🧪 Test Reports

To ensure the stability and reliability of this project, unit and mutation tests have been implemented. By clicking on the links below, you can access the detailed test reports and review the outcomes of the tests performed.

📊 Coverage Report

📊 Mutation Report

🌱 Environment Variables

  • SERVER_PORT: port running
  • POSTGRES_HOST: database host
  • POSTGRES_PORT: database port
  • POSTGRES_DB: database name
  • POSTGRES_USER: database access username
  • POSTGRES_PASSWORD:database user password
  • POSTGRES_SCHEMA: database schema
  • NETWORK: network type
  • SPRING_PROFILES_ACTIVE: active profiles
  • POOL_CORE_SIZE: the ThreadPoolExecutor's core pool size
  • POOL_MAX_SIZE: the ThreadPoolExecutor's maximum pool size
  • REWARD_LIST_SIZE_EACH_THREAD: batch size to fetch reward data each thread
  • EPOCH_STAKE_LIST_SIZE_EACH_THREAD: batch size to fetch epoch stake data each thread
  • POOL_INFO_LIST_SIZE_EACH_THREAD: batch size to fetch pool info data each thread
  • POOL_INFO_DATA_JOB_ENABLED: whether enable fetching pool info data job
  • FETCH_AND_SAVE_POOL_INFO_DATA_DELAY: the interval between each run of the job to fetch pool info data
  • FLYWAY_ENABLE: whether to enable flyway
  • FLYWAY_VALIDATE: whether to automatically call validate when performing a migration
  • KOIOS_BASE_URL_ENABLED: Set true to enable to use your Koios instance base URL, otherwise set false
  • KOIOS_BASE_URL: Koios instance base URL.
  • KOIOS_AUTH_TOKEN: JWT Bearer Auth token generated via https://koios.rest Profile page

About

This repository provides an API for retrieving reward data for stake pools and delegators. It utilizes Koios to fetch the data, aggregates and stores it, and serves it for the cardano explorer

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Languages