I'm thinking of this as a way of verifying total coin supply.
I've seen another thread about a command to add up all coinbase tx's to do the same, but I'm curious about the utxo approach. Thanks
Monero Stack Exchange is a question and answer site for developers and users of the secure, private and untraceable cryptocurrency Monero. It only takes a minute to sign up.Sign up to join this community
I don't think a utxo method is possible, because the blockchain is opaque. There are no unspent transaction outputs on the Monero blockchain, in other words.
There are no unspent transaction outputs on the Monero blockchain, in other words.
The above is a generalization, that isn't true in all cases. There are certain instances where an output can be shown to be provably spent. Nevertheless, the vast majority of outputs on the blockchain are not able to be provably spent.
Additionally, since RingCT, amounts in each new RingCT output are masked.
If I understand well, the "mixing pool" is basically the entire blockchain, ie, every output on it. Not every coin, but every output appearing on the blockchain, spent or unspent (you can't tell them apart). Note
sum(outputs) > sum(coinbase). It's just the matter of matching an amount being actually sent with the amount of an output found on the blockchain and then "mix". Note that nothing is actually mixed as in coinjoin or other solutions. The extra outputs are not "real" so those didn't move but you can't tell the difference unless you have the keys to the real one. That's why we split into denominations, to make this work smoothly and have enough matching ones available for each amount. To verify the total available supply, just adding the outputs won't work as each ring signature has a few, and only 1 gets spent. Every one of them will appear many times on the blockchain.
So, adding up outputs can't tell you anything, as you can't really know which of those to add up. If you add up all of them, because some are spent, you will get the wrong value (larger than supply).