Merge PR #4599: Supply module spec

* supply spec

* update spec

* update other modules

* update distr

* update spec according to latest refactors

* Apply suggestions from code review

Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* updated spec

* Apply suggestions from code review

Co-Authored-By: Marko <marbar3778@yahoo.com>

* final updates

* Apply suggestions from code review

Co-Authored-By: Alessio Treglia <quadrispro@ubuntu.com>

* word wrap in supply concepts

* edits to concepts
This commit is contained in:
Federico Kunze
2019-07-01 18:47:55 +02:00
committed by frog power 4000
co-authored by Alexander Bezobchuk Marko Alessio Treglia
parent ce0c0946b6
commit 5d5f0149a4
16 changed files with 356 additions and 303 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ The minter is a space for holding current inflation information.
- Minter: `0x00 -> amino(minter)`
```golang
```go
type Minter struct {
Inflation sdk.Dec // current annual inflation rate
AnnualProvisions sdk.Dec // current annual exptected provisions
@@ -19,7 +19,7 @@ Minting params are held in the global params store.
- Params: `mint/params -> amino(params)`
```golang
```go
type Params struct {
MintDenom string // type of coin to mint
InflationRateChange sdk.Dec // maximum annual change in inflation rate
+2 -2
View File
@@ -26,6 +26,7 @@ NextInflationRate(params Params, bondedRatio sdk.Dec) (inflation sdk.Dec) {
}
return inflation
}
```
## NextAnnualProvisions
@@ -40,8 +41,7 @@ NextAnnualProvisions(params Params, totalSupply sdk.Dec) (provisions sdk.Dec) {
## BlockProvision
Calculate the provisions generated for each block based on current
annual provisions
Calculate the provisions generated for each block based on current annual provisions. The provisions are then minted by the `mint` module's `ModuleMinterAccount` and then transferred to the `auth`'s `FeeCollector` `ModuleAccount`.
```
BlockProvision(params Params) sdk.Coin {