bug: supply calculator does not regard transactions sent to genesis walletSee original GitHub issue
Proper calculation of the supply taking into account burned tokens.
The supply calculator calculates the supply based on the
totalAmount of the genesis block and all forging rewards. This method does not take into account transactions sent to the genesis wallet, i.e. effectively burned tokens.
Take into account transactions sent to the genesis wallet (or wallets? basically all senders of transfer transactions), of the genesis block.
- Created 4 years ago
- Comments:12 (11 by maintainers)
Top GitHub Comments
You can use not-so-random address
000000000000000000000000000000DEAD (needs to be adjusted to network). My second statement was incorrect, sorry about that.
There is an issue with whole approach of sending tokens to any kind burn address (genesis, random, not-so-random). You have to re-implement every possible balance-transferring transaction in supply calculation. And it’s unknown what kind of balance-transfer transaction bridgechain may deploy.
In your PR #3443 you forgot to include htlc-claim which in a way can also be used to burn tokens. I understand that it is ridiculous to use htlc to burn tokens. But I’m trying to show that it’s difficult to correctly re-implement balance-transfer logic even when you do know all transaction types.
I think cleaner approach is to add new kind of transaction type deliberately designed to burn tokens and include it in core. It has legit use-cases as stand-alone transaction type. If @faustbrian is fine with that, I can create ticket for to implement it (3.0 or later). It should be simple.