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.
SCOPES
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 ofkilocalories
burned (C || kC
).distance
: Number ofmeters
distance (D
). (* some formula express this in different unit of measure)elevation
: Number ofmeters
elevation gain (E || A
). This field uses an adjusted value in case it is empty.elapsedTime
: Number ofseconds
spent during activity (T
).kilojoules
: Number ofkilojoules
produced during activity (Rides only) (J
).The following formulas are currently applied to compute amounts:
(((D + J) / (T/60)) x (A + J + kC) / dE) x 1.2 x 100
(((D + J) / (T/60)) x (A + J + kC) / dE) x 1.5 x 100
(((D * 10 + J) / (T/60)) x (A + J + kC) / dE) x 1.3 x 100
(((D * 100 + J) / (T/60)) x ((D/25) + J + kC) / dE) x 1.7 x 100
((T/60) x (A + J + kC) / dE) x 1.6 x 100
withdE
which contains the ELEVATE factor of1'000'000
.Modules
This scoped module currently features the following submodules:
payouts
/payouts
Events
This scoped module currently features the following events:
OnPayoutCreated
payout.created
Notes
Note also that in Schedulers, we map the following schedulers to this module:
v0.4.0