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
+19-12Lines changed: 19 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ pub fn stake(
59
59
) ->DispatchResult {
60
60
/// NEW BEHAVIOR:
61
61
// if the account is new, save the new staking type
62
-
// if not new and staking type is different, Error::
62
+
// if not new and staking type is different, Error::CannotChangeStakingType
63
63
}
64
64
65
65
pubfnunstake(
@@ -82,6 +82,8 @@ pub fn unstake(
82
82
}
83
83
```
84
84
### NEW: StakingRewardsProvider - Economic Model trait
85
+
This one is most likely to change, however there are certain functions that will definitely be needed.
86
+
The struct and method for claiming rewards is probably going to change, but the rewards system will still need to know the `reward_pool_size` and the `staking_reward_total` for a given staker.
2.**change_staking_target(origin, from, to, amount)**
242
237
```rust
243
238
/// Change a staking account detail's target MSA Id to a new one.
244
-
/// If Some(amount) is specified, that amount up to the total staking amount is retargeted. Rules for this are similar to unstaking; if `amount` would leave less than the minimum staking amount for the `from` target, the entire amount is retargeted.
239
+
/// If Some(amount) is specified, that amount up to the total staking amount is retargeted.
240
+
/// Rules for this are similar to unstaking; if `amount` would leave less than the minimum staking
241
+
/// amount for the `from` target, the entire amount is retargeted.
245
242
/// If amount is None, ALL of the total staking amount for 'from' is changed to the new target MSA Id.
246
243
/// No more than T::MaxUnlockingChunks staking amounts may be retargeted within this Thawing Period.
0 commit comments