Options
All
  • Public
  • Public/Protected
  • All
Menu
label

SCOPES

description

The payout scope's main module. This module is loaded by the software when "payout" is present in the enabled scopes through configuration (config/dapp.json). This module is also responsible for computing payout amounts.

The inputs to compute payout amounts are defined as follows:

  • calories: Number of kilocalories burned (C || kC).
  • distance: Number of meters distance (D). (* some formula express this in different unit of measure)
  • elevation: Number of meters elevation gain (E || A). This field uses an adjusted value in case it is empty.
  • elapsedTime: Number of seconds spent during activity (T).
  • kilojoules: Number of kilojoules produced during activity (Rides only) (J).

    The following formulas are currently applied to compute amounts:
  • Walk: (((D + J) / (T/60)) x (A + J + kC) / dE) x 1.2 x 100
  • Run: (((D + J) / (T/60)) x (A + J + kC) / dE) x 1.5 x 100
  • Ride: (((D * 10 + J) / (T/60)) x (A + J + kC) / dE) x 1.3 x 100
  • Swim: (((D * 100 + J) / (T/60)) x ((D/25) + J + kC) / dE) x 1.7 x 100
  • Others: ((T/60) x (A + J + kC) / dE) x 1.6 x 100 with dE which contains the ELEVATE factor of 1'000'000.

Modules

This scoped module currently features the following submodules:

Module Mongo collection(s) Routes Description
PayoutsModule payouts /payouts Module with schedulers, collections and routes around dApp payouts.


Events

This scoped module currently features the following events:

Class Name Link Description
OnPayoutCreated payout.created {@link OnPayoutCreated} Event that is emitted when a payout is created on the network.


Notes

Note also that in Schedulers, we map the following schedulers to this module:

since

v0.4.0

Hierarchy

Index

Constructors

Constructors

Generated using TypeDoc