Giter Site home page Giter Site logo

kin-rewards-engine's Introduction

KRE

Kin Rewards Engine

This repository contains code which powers the Kin Rewards Engine (KRE). Note that this repository is a work in progress and additional code will be added periodically.

Information flow

The KRE has 4 primary steps:

  1. Data is collected from the blockchain and pushed to a PostgreSQL database via the History Collector.
  2. PostgreSQL data is extracted and pushed to BigQuery*.
  3. This raw data is processed daily to calculate payouts (and also serves as a basis for dashboards).
  4. Every week this processed data it used to create the XDR (and other) payout files used to execute payments.

*Note that at this time, this step is beyond the scope of this repository.

The core components of the KRE run as pipelines (DAGs) on Airflow. You can read more about Airflow here. These DAGs are directed acyclic graphs of tasks. The work for steps 3) and 4) of the Kin Reward Engine are done in kre_2.py and payout_report.py respectively. These DAGs are run with daily and weekly schedules respectively. While the code detailing 2) is absent, we have included the schemas of relevant BigQuery tables.

Contributing

Review the HowToContribute guide before contributing.

kin-rewards-engine's People

Contributors

kikengineering avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

emartin59

kin-rewards-engine's Issues

How are the payouts of off chain apps calculated?

Some apps that are being paid from the KRE are not on the Kin blockchain and instead I have read that they are being relayed on to the Kin blockchain through a service of some kind however I am not seeing any logic for this.

Where are you pulling their data from?
How are their payouts calculated?

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.