0

In looking at the storage values of the CPMM one can see that as of right now the CPMM has the following amounts of tzBTC (represented by the contract as tokenPool), xtz (represented as xtzPool), and LQT or liquidity tokens (represented as lqtTotal).

tokenPool: 161155812
xtzPool: 38977018471
lqtTotal: 51961

I understand that a mutez is 1/1000000 of a single xtz. So we can say that given the above values, the CPMM has 38977.018471 xtz.

What I don't fully understand is how to calculate the amount of tzBTC and LQT are present.

Is it the same conversion factor? Would I be able to do the following (and would it be correct)?

tokenPool (tzBTC): 161155812/1000000 = 161.155812 tzBTC

lqtTotal (LQT): 51961/1000000 = 0.051961

The above numbers seem to make sense for the tokenPool (tzBTC) values, but seem wrong for the LQT.

1

tzBTC uses 8 decimals like Bitcoin, so you should divide tokenPool by 100000000 to get the number of tzBTC held by the contract.

2
  • Am I right in thinking that lqtTotal uses no decimal places?
    – Whirlybird
    Aug 1 at 16:03
  • 1
    Decimals are just a matter of UX, there are no "tez" on the chain only "mutez". Likewise the Bitcoin chain doesn't have bitcoins but sats. Lqt? Well that's largely up to you.
    – Arthur B
    Aug 1 at 17:22

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.