-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to query total liquid supply in the system #7774
Comments
I think this issue is very relevant and should be prioritized. We had a lot of back and forth with Coinmarketcap in 2019 due to this same issue. Take IBC for example, when you transfer a token from chain A -> B via IBC, you chain A locks the coins by sending them to the module account. Upon receiving it, chain B mints an IBC voucher and sends it to the recipient. The tokens from chain A are not liquid nor circulating, which is not recognized by the bank supply query. The supply query now only returns a set of coins instead of the general cc: @cwgoes @colin-axner |
Akash has something I believe https://github.com/ovrclk/cosmos-supply-summary |
In order for this to happen, we either need to:
|
closing in favour of #7774 |
Closing in favor of same issue? |
sorry copied the wrong issue |
Summary
Support for querying total liquid supply, i.e., the total amount in the system which is immediately transferrable.
Problem Definition
What problems may be addressed by introducing this feature?
What benefits does the SDK stand to gain by including this feature?
Are there any disadvantages of including this feature? No.
Proposal
Similar to the total supply, have hooks on bank module functions which transfers tokens from module accounts to account addresses and vice versa to keep track of total amounts stored in module accounts. In vesting module, keep track of all the vesting account addresses and add a function to calculate the total unvested amounts. Finally, when the user queries for liquid supply, calculate it by using above two values and subtracting it from total supply.
For Admin Use
The text was updated successfully, but these errors were encountered: