You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: designdocs/capacity_staking_rewards_implementation.md
+56-43Lines changed: 56 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -20,16 +20,17 @@ This document outlines how to implement the Staking for Rewards feature describe
20
20
1.**Capacity**: the non-transferrable utility token which can be used only to pay for certain Frequency transactions.
21
21
1.**Account**: a Frequency System Account controlled by a private key and addressed by a public key, having at least a minimum balance (currently 0.01 FRQCY).
22
22
1.**Stake** (verb): to lock some amount of a token against transfer for a period of time in exchange for some reward.
23
-
1.**RewardEra**: the time period (TBD in blocks or Capacity Epochs) that Staking Rewards are based upon.
23
+
1.**RewardEra**: the time period (TBD in blocks or Capacity Epochs) that Staking Rewards are based upon. RewardEra is to distinguish it easily from Substrate's staking pallet Era.
24
24
1.**Staking Reward**: a per-RewardEra share of a staking reward pool of FRQCY tokens for a given staking account.
25
25
1.**Reward Pool**: a fixed amount of FRQCY that can be minted for rewards each RewardEra and distributed to stakers.
26
26
27
27
## Staking Token Rewards
28
28
29
29
### StakingAccountDetails updates
30
-
We add a new field,`last_rewarded_at`, to keep track of the last time rewards were claimed for this Staking Account.
30
+
New fields are added. The field `last_rewarded_at` is to keep track of the last time rewards were claimed for this Staking Account.
31
31
MaximumCapacity staking accounts MUST always have the value `None` for `last_rewarded_at`. This should be the default value also.
32
32
`MaximumCapacity` is also the default value for `staking_type` and should map to 0.
33
+
Finally, `stake_change_unlocking`, a BoundedVec is added which tracks the chunks of when a staking account has changed targets for some amount of funds.
The number of blocks for which Rewards from a RewardPool applies is called a `RewardEra`; this is to distinguish it from `Era` in the Substrate staking pallet; this way automatic imports don't accidentally pull in the wrong thing.
129
-
130
-
### NEW: storage items, Config, Errors and related types
129
+
### NEW: StakingType enum
131
130
```rust
132
131
pubenumStakingType {
133
132
/// Staking account targets Providers for capacity only, no token reward
0 commit comments