Mangata Docs
  • 🐋Welcome
  • Guides
    • 🛹Onboarding
      • 💾Setting Up a Mangata Account
        • 🧿Talisman Wallet
          • 🔌Connecting your account
        • 🚇SubWallet
      • ✖️How to get MGX
      • 🏦From a Centralized Exchange
      • ⬇️Deposit Tokens to Mangata X
    • 🪙Trading
      • 🔄How to Swap Tokens
      • 🔗How to: USDT on Mangata X
      • 🌛How to: MOVR on Mangata X
      • ⬆️Withdraw Tokens from Mangata X
    • 🌊Liquidity Provision
      • 💦Add & Remove Liquidity
      • 💎Liquidity Mining Rewards
      • 🍰How to: Stake MGX/KSM LP tokens
      • 🚗Auto Compounding
    • 📘Proof of Liquidity Guides
      • 📂Delegator Guide
      • 🗃️Collator Guide
        • 🦆Install Docker
        • ❓How to: Bond more tokens to collator
      • 🗄️Aggregator Guide
      • 💭Proof of Liquidity FAQ
    • 📙Technical Guides
      • 📟How to Check your Account Balance
      • 💳How to look up Token IDs
      • 🐬How to check your LP token balance
      • 🧹How to Clear Proxy Reserve
      • 🧗How to Claim Your Crowdloan Rewards
      • 🔐How to Unlock Vested Crowdloan Rewards
      • 🚣‍♂️How to Join a Bootstrap
      • 🌈How to Redeem Bifrost Liquid Crowdloan KSM
      • 🍕How to check the value of an LP token
    • 💬DEX FAQ
    • 💻AVS Operator FAQ
  • Litepaper
    • ⛓️Omnichain ZK-Rollup
    • ⚖️Themis Architecture
    • 💧Proof of Liquidity
    • ⏳Loyalty Rewards
    • 🔥Algorithmic Buy & Burn
    • 🗳️Liquidity Gauges & Weight Voting
    • ⛽Gas-free Swaps
    • 🔢TESTNET MGX Tokenomics
  • People
    • 🎂Join the Community
    • 📳Contact the Team
    • 📑Token Listing
      • 🥾Bootstrap
    • 🔐Security Audit
Powered by GitBook
On this page
  • Find the number of total LP tokens
  • Find the number of tokens in the liquidity pool
  1. Guides
  2. Technical Guides

How to check the value of an LP token

PreviousHow to Redeem Bifrost Liquid Crowdloan KSMNextDEX FAQ

Last updated 1 year ago

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 . Find the token ID .

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.

📙
🍕
chain state
here