Rewards

This pages discusses the cases of rewarding for all providers and the calculations of the reward

To keep track of challenge pool fraction related to a particular blobber-allocation pair integral value was introduce. It behaves exactly the same way and should be always in sync with corresponding challenge pool. It means, that the summary of integral values for every blobber for a current allocation is exactly the challenge pool balance for any moment in time.

Partition management

Blobber is added to the partition for block rewards calculation on every first challenge passed this rewards period. All the fields in BlobberRewardNode except ChallengesPassed are fixed for that moment, only ChallengesPassed will be updated next time challenge is passed.

Reward amount calculation

Reward is calculated based on time unit values. All the available for reward values are stored in blobber allocation itself in ChallengePoolIntegralValue field. It is reduced every time reward is calculated

            rdtu = (allocation.Expiration - PreviousCompletedChallenge.Created) / timeunit
            dtu  = (CurrentCompletedChallenge.Created - PreviousCompletedChallenge.Created) / timeunit
	    reward = (dtu / rdtu) * float64(d.ChallengePoolIntegralValue)
	    d.ChallengePoolIntegralValue -= reward

If intervals dtu are even, then rewards will be split evenly between the intervals for constant ChallengePoolIntegralValue (it will be spent evenly in the intervals).

Reward then is split in two part, blobberReward and validatorReward using provided in config ratio.

        validatorsReward = reward * config.validator_reward
        blobberReward = reward * (1 - config.validator_reward)

Reward value is also adjusted to the success rate of a blobber. If rewards are adjusted, difference is taken from challenge pool and burnt.

        partial = float64(challenge.SuccessfulTickets) / float64(challenge.TotalValidators / 2)
        blobberReward = blobberReward * partial

Reward distribution

Reward amount is distributed among all the blobbers evenly. Every blobber distributes its fraction of rewards according to standard algorithm among all the delegates.

  • If provider doesn't have any delegates, then all the rewards go to provider's stake pool

  • If service charge is set, then provider will be guaranteed to receive service charge

  • Then value left is split among all the delegates of a provider proportionally with their weight

		stakePool.Reward = stakePool.Reward + value
		sp.Reward = stakePool.Reward + serviceCharge
		valueLeft = value - serviceCharge
	        for id, pool := range sp.Pools {
		    ratio := pool.Balance / totalStake
		    reward := valueLeft * ratio
                    delegate.Reward = delegate.Reward, reward
                    valueLeft = valueLeft - reward
                }

Validator rewards

  • Validators get rewards when a challenge response is computed, whatever the status of the challenge is.

  • All the validators of the challenge get an equal share of the total share of the validators from the challenge rewards.

  • This reward is calculated as follows:

     validatorsReward = challenge_reward * config.validator_reward

where config.validator_reward is a constant value set in the configuration file sc.yaml. Refer to Blobber Rewards section for more details on the challenge reward.

Authorizer Rewards [TODO]

Last updated