Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Querier for inflation parameters and block rewards #3886

Closed
zmanian opened this issue Mar 14, 2019 · 4 comments · Fixed by #4011
Closed

Querier for inflation parameters and block rewards #3886

zmanian opened this issue Mar 14, 2019 · 4 comments · Fixed by #4011
Assignees
Milestone

Comments

@zmanian
Copy link
Member

zmanian commented Mar 14, 2019

It's needed to have querier that gets the state of inflation of the staking token.

Basically these

type Minter struct {
	Inflation        sdk.Dec   // current annual inflation rate
	AnnualProvisions sdk.Dec   // current annual exptected provisions
}
@kevlubkcm
Copy link
Contributor

Would be great if we had the other params too:

type Params struct {
	MintDenom           string  `json:"mint_denom"`            // type of coin to mint
	InflationRateChange sdk.Dec `json:"inflation_rate_change"` // maximum annual change in inflation rate
	InflationMax        sdk.Dec `json:"inflation_max"`         // maximum inflation rate
	InflationMin        sdk.Dec `json:"inflation_min"`         // minimum inflation rate
	GoalBonded          sdk.Dec `json:"goal_bonded"`           // goal of percent bonded atoms
	BlocksPerYear       uint64  `json:"blocks_per_year"`       // expected blocks per year
}

@jackzampolin
Copy link
Member

It would also be nice to return some calculated numbers like effective-annual-inflation-for-bonded or similar

@fedekunze
Copy link
Collaborator

MintDenom string json:"mint_denom"

hmm that will always be the staking denomination, so not sure if it's redundant with the staking params struct. I agree with the rest tho

@zmanian
Copy link
Member Author

zmanian commented Mar 17, 2019

effective annualized yield is inflations * ((self bond/ total bond) + commission * delegator bond/total bond)

@rigelrozanski rigelrozanski self-assigned this Mar 18, 2019
@cosmos cosmos deleted a comment from zmanian Mar 18, 2019
@jackzampolin jackzampolin assigned sabau and fedekunze and unassigned rigelrozanski Mar 19, 2019
@alexanderbez alexanderbez self-assigned this Mar 29, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants