change reference trait to config (#9224)

This commit is contained in:
Shinsaku Ashizawa
2021-06-29 16:26:27 +09:00
committed by GitHub
parent c8969e1762
commit 8ebe99c8f5
22 changed files with 28 additions and 28 deletions
+4 -4
View File
@@ -2,7 +2,7 @@
The Staking module is used to manage funds at stake by network maintainers.
- [`staking::Trait`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html)
- [`staking::Config`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Config.html)
- [`Call`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html)
- [`Module`](https://docs.rs/pallet-staking/latest/pallet_staking/struct.Module.html)
@@ -157,7 +157,7 @@ decl_module! {
### Era payout
The era payout is computed using yearly inflation curve defined at
[`T::RewardCurve`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html#associatedtype.RewardCurve) as such:
[`T::RewardCurve`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Config.html#associatedtype.RewardCurve) as such:
```nocompile
staker_payout = yearly_inflation(npos_token_staked / total_tokens) * total_tokens / era_per_year
@@ -168,7 +168,7 @@ This payout is used to reward stakers as defined in next section
remaining_payout = max_yearly_inflation * total_tokens / era_per_year - staker_payout
```
The remaining reward is send to the configurable end-point
[`T::RewardRemainder`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html#associatedtype.RewardRemainder).
[`T::RewardRemainder`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Config.html#associatedtype.RewardRemainder).
### Reward Calculation
@@ -214,7 +214,7 @@ Any funds already placed into stash can be the target of the following operation
The controller account can free a portion (or all) of the funds using the
[`unbond`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.unbond) call. Note that the funds are not immediately
accessible. Instead, a duration denoted by [`BondingDuration`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Trait.html#associatedtype.BondingDuration)
accessible. Instead, a duration denoted by [`BondingDuration`](https://docs.rs/pallet-staking/latest/pallet_staking/trait.Config.html#associatedtype.BondingDuration)
(in number of eras) must pass until the funds can actually be removed. Once the
`BondingDuration` is over, the [`withdraw_unbonded`](https://docs.rs/pallet-staking/latest/pallet_staking/enum.Call.html#variant.withdraw_unbonded)
call can be used to actually withdraw the funds.