1

I want to build a real-time Tezos yearly/monthly inflation calculator that updates for every block. While I have the rewards calculation under control I don't know how to calculate the total XTZ supply. I am aware that tzscan returns this value but want to calculate it myself with nothing more than the Tezos node RPC if possible. What are the steps to do this?

2

The protocol by itself does not track that number (though it would be useful if it did, for many reasons).

This leaves one option, use an indexer that tracks the total supply, and updates it block by block by analyzing how many tokens were created, and how many were burned.

  • Sounds great but how to compute it? I don't see anything in the genesis block operations for example. – Eric des Courtis Oct 18 at 5:52
  • What indexers exist for this purpose? – Eric des Courtis Oct 18 at 5:53
  • It is something that is on the agenda of everyone. I hope Cryptium Labs will implement this asap so that inflation can remain a constant %. It is in the interest of the whole network to do this. I know some work has already been done but it has not yet been implemented. – Argonau7 Oct 21 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.