frequency
frequency copied to clipboard
Provider Boosting implementation
Goal
Implement a Provider Boost feature, whereby token holders may support the network and a specific Provider by means of a custom staking model. Token holders lock up a certain amount of token, and receive a return in Frequency token for this support. The token holder chooses a Provider to receive some Capacity, which the Provider may use to pay for chain transactions.
Token holders may still stake for MaximizedCapacity
and receive no token return. As before, the entire benefit for staking would go to the targeted Provider for this type.
Discussion
Support the new staking type, Provider Boost
- The
stake
transaction now specifies the Staking Type ofMaximizedCapacity
which is stored withStakingTargetDetails
. - There are 3 new extrinsics:
-
provider_boost
which specifies ProviderBoost staking type. -
claim_staking_rewards
which mints and transfers all eligible rewards in token to the staker. -
change_staking_target
which basically swaps your Provider Boost staking target from one Provider to another.
-
- The
StakingType
determines how much Capacity is generated for the targeted provider. ForProviderBoost
type, 50% of the Capacity forMaximizedCapacity
is generated when usingprovider_boost
. - The
StakingType
also determines if there is a periodic return in token to the staker. ForProviderBoost
type, there is a periodic return. ForMaximizedCapacity
type, there isn't.
Issue rewards to Provider Boost accounts
- Rewards are a fixed amount based on the proportion of staked amount to total staked amount, and capped at 10% per year, or to ~0.0385% per Reward Era.
- Individual Rewards are calculated based on the number of complete
RewardEras
that the token holder has staked. - A
RewardEra
is approximately two weeks of blocks. - Reward Pool size is a constant.
- Rewards are are not compounded.
- Rewards are minted when they are claimed. All available Rewards are paid out when the
claim_staking_rewards
extrinsic succeeds. - Rewards expire after 30 Reward Eras. This is the limit of the Reward Pool History storage and the limit of the individual Provider Boost History storage, so rewards cannot be claimed for earlier eras. With that said, if for example you ProviderBoost 10,000 FRQCY, and did nothing else for say 50 Reward Eras ("set and forget"), you would not lose everything. You would simply would not be paid out except for the last 30 Eras. Only the potential earnings for the 20 eras before that would be lost.
Allow a staking 'retarget'
A staker may change some or all of their staked token to target a different provider up to 16 times in a RewardEra
without penalty. Otherwise, they must wait until the next RewardEra
.
For more details, please see the Capacity Staking Rewards Implementation design doc, which links to the economic model for this feature.
Checklist
- [ ] Chain spec updated
- [x] 6 SECOND BLOCK TIMES: length of constants adjusted as necessary
- [x] Custom RPC OR Runtime API added/changed? Updated js/api-augment.
- [x] Design doc(s) updated
- [x] Tests added
- [x] Benchmarks added
- [x] Weights updated