-
Notifications
You must be signed in to change notification settings - Fork 79
Validator Economy
In this wiki, we may use event
and event block
interchangeably. Do not confuse event block
and block
- those are different terms.
A validator's reward is weighted by 2 independent numbers: transactions reward weight
and base reward weight
.
-
transactions reward weight
: share of transaction fees that the validator will receive at the end of epoch. -
base reward weight
: share of base reward (newly minted coins) that validator will receive at the end of epoch.
Reward weights are calculated at the end of each epoch using the formulas below:
-
transactions reward weight
= (originated fee
+0.45
*sent fee
) *uptime
-
base reward weight
=stake
* (uptime
^ 2)
where:
-
stake
is the sum of validator’s stake and delegations to validator -
uptime
is the total number of nanoseconds the validator was online in the epoch (i.e. was creating events). It's also calledvalidation score
. -
originated fee
is the total fees of transactions that the validator originated in the epoch ("originated" means "included into event"). It's also calledorigination score
. -
sent fee
is the total fee of transactions that the validator and his delegators have created (their impact is weighted by their stake amount/delegation amount) within the last 30 days. It's also calledProof Of Importance (PoI)
A list of properties which may be concluded from formulas:
-
originated fee
may be roughly estimated asstake share
*uptime
*network fee per nanosecond
. If we substitute estimation intotransactions reward weight
formula, then we'll get (stake share
*uptime
*network fee per nanosecond
+0.45
*sent fee
) *uptime
. If we also assume thatsent fee
is 0, then we'll get a formula proportional tobase reward weight
. - Uptime influences reward non-linearly. If a validator has 50% uptime in epoch, then he'll receive ~4 times less rewards in that epoch.
-
stake
influences base reward linearly, and influencestransactions reward weight
not linearly because ofsent fee
influence. -
sent fee
influencestransactions reward weight
for 30 days, which also may be seen as a discount for sent transactions.
Rewards distribution is fully controlled by an SFC contract. It's worth to mention that the SFC contract can be upgraded by governance at any time without hardfork.
30% of transaction fees is held by SFC contract (those funds aren't used). Remaining 70% of transaction fees are
distributed between validators proportional to their transactions reward weight
.
Base rewards
= epoch duration in second
* base reward per second
.
At the launch, base reward per second is 16.483988584467592592 FTM per second.
Hard limit which SFC contract cannot exceed is 32.967977168935185184 FTM per second.
Base rewards
are distributed between validators proportional to their base reward weight
.
Reward between validator and his delegators is distributed proportional to their stake, with exception that delegator pays 15% of his rewards to validator (as a validator commission).
Downtime is calculated as a difference time of last block
-time of last block where validator had at least 1 event
.
Downtime has 2 numbers: number of missed blocks
and time of missed blocks
. If was missed only <= 4 blocks, then
downtime should be interpreted as 0, because it may be possible that validator does emit events,
but they are located higher in DAG than last Atropos.
Uptime in an epoch is calculated differently. It's reset to 0 every epoch,
and during processing of i'th block, uptime is incremented by
block[i].time
-block[i - min(number of missed blocks, 4)].time
.
According to the formulas above, missing of no more than 4 blocks in a raw doesn't affect uptime.
Block isn't confirmed by events of this frame, but by events from future frames (it's aBFT, not sync BFT). Every event participates in virtual elections from 2+ previous frames (typically 2 or 3, but it's not limited above). It's justifies why number 4 was chosen - typically virtual election doesn't take more than 4 frames.
If validator has downtime >= 72 hours (but not less than 1000 blocks), then he's permanently pruned from validators list. In this case, validator and delegators have to withdraw their stake via SFC contract using the withdrawal procedure.