# how to calculate the value of a single LQT token for Liquidity Baking?

In looking at the Granadanet contract storage, I can see the amount of tzBTC, Tez, and LQT tracked in/by the CPMM.

Here are those values as of writing this:

``````tokenPool 45805
xtzPool 111379958864916
lqtTotal 51959
``````

Based on these numbers, is it possible to calculate the amount of Tez and tzBTC that a single LQT token is worth?

I ask because I'm currently adding liquidity and removing liquidity on Granadanet, with no way of really understanding how many LQT I should be receiving, or how many Tez and tzBTC I should be getting back when I remove liquidity.

When you add `tezAmount` liquidity you deposit `tezAmount * tokenPool / xtzPool` tokens (with division rounding up) and receive `tezAmount * lqtTotal / xtzPool` LQT (with division rounding down). When you remove `lqtAmount` liquidity you get back `lqtAmount * xtzPool / lqtTotal` tez and `lqtAmount * tokenPool / lqtTotal` tokens (with divisions rounding down).
• Thanks again Sophia. So if the CPMM contract has the following storage values: `tokenPool: 45807, xtzPool: 111396486543871, lqtTotal: 51957`, then If I add 9740 tez I can expect to get the following amount of tzBTC taken: `9740 * 45807 / 111396329043871 = 0.00000400516 mutzBTC tokens or 4.0516 tzBTC tokens (but 5 will be taken since we round up)` and I can expect to receive the following amount of LQT: `9740 * 51957 / 111396486543871 = 0.00000454288 muLQT or 4.54288 LQT (but 4 will be taken since we round down)` Is my understanding and math correct? Jul 30 at 12:23
• @Whirlybird not quite. In this case the tez/token exchange rate is so high (probably my fault if you're looking at granadanet) that that amount of tez equals zero tokens and zero liquidity tokens. If you called `addLiquidity` with `minLqtMinted` as 0 the CPMM would just eat your tez. Jul 30 at 16:37
• If the CPMM contract has the following storage values: `tokenPool: 45807, xtzPool: 111396486543871, lqtTotal: 51957`, then If I add 9740 tez I can expect to get the following amount of tzBTC taken: `9740 * 45807 / 111396329043871 = 0.00000400516 mutzBTC tokens or 4.0516 tzBTC tokens (but 5 will be taken since we round up)` and I can expect to receive the following amount of LQT: `9740 * 51957 / 111396486543871 = 0.00000454288 muLQT or 4.54288 LQT (but 4 will be taken since we round down)` Jul 30 at 19:32