๐Ÿ•How to check the value of an LP token

To calculate the value of an LP token, we will find the total number of LP tokens and the number of tokens in the associated liquidity pool.

Open the developer portal to see the chain state. Find the token ID here.

Find the number of total LP tokens

Check tokens.totalIssuance with the token ID as parameter.

Find the number of tokens in the liquidity pool

Get the token IDs of the token in the pool (the order is important) with xyk.liquidityPools and the LP token ID in the param.

Then call xyk.pools with the params you just got as a result, you will get the number of tokens in the pool.

Last updated