Skip to content
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

Burned coins vs. circulating supply #18

Open
deadthings opened this issue Sep 29, 2022 · 2 comments
Open

Burned coins vs. circulating supply #18

deadthings opened this issue Sep 29, 2022 · 2 comments

Comments

@deadthings
Copy link

Bug report (of sorts???): When adding a burn address to settings.json, it does in fact create the "Burned Coins" category in the Wealth Distribution table as expected. It does not, however, remove the coins in that address from the quantity reported in the coin_supply_panel. I imagine this is by design, but would like to open a discussion at least to suggest that burned coins should be subtracted from circulating supply so long as they continue to be categorized as burned (i.e., COINBASE [in our case] minus "Burned Coins").

If somehow they get spent through hack or crack, they will wind up in some other address. And since the explorer depends on address to determine burn status, they will re-enter circulating supply automatically once a richlist-reindex is done, no? I just feel like while they are burnt, they should not count towards circulating supply. Thoughts?

@joeuhren
Copy link
Contributor

As you may have already deduced, the burned coins option under the wealth_distribution option only affects the totals on the top 100/richlist page, it was never designed to remove coins from the coin supply and would require another layer of complexity to achieve.

For my own coin project, I figured it would be confusing to see a different supply value in the wallet vs the explorer so I chose to subtract the burned coins from the total supply in the blockchain itself. I'm not sure the best way to remedy that confusion if you were to subtract the burned coins from the supply in the explorer only, maybe by displaying 2 supply values? Real supply and Burned supply? I personally don't like it, but maybe there will be some better ideas.

As far as getting the explorer to display the burned supply, I can think of a couple different ways to accomplish that:

  1. Create a new function that will lookup all burned coin addresses in the mongo addresses database and return the sum of all burned address balances. This function would need to be called after every block sync to subtract that value from the running supply value.

  2. An alternate option might be to add a new if statement somewhere in the sync code that will check if the current tx being synced includes a burned address on the sending or receiving end and save the amount going in or out from that address to a running total. At the end of the sync, add that total to a new burned coin total in the stats database. Then, every time the current supply is to be shown, it will return the real supply minus burned coins. This option would either require a resync or probably better to create a new function that can be run on demand to get the sum of all burned coin balances and save it to the database.

Also, as far as burned coins being spent through some kind of hack, that would be quite the feat given that burn addresses should be provably unspendable using a special wallet address like the generic-unspendable script generates where the private key for the burn address is impossible to generate and therefore can never be spent.

@joeuhren
Copy link
Contributor

Please note that this request has been added to Exor's public task list and development will begin as soon as the funding goal has been met.

View more details here: https://exor.io/task?id=4&tid=716efb051f527992b5994ed4a3801b35b35825f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants