Menu

Get LP Tokens

xAPP is a decentralized protocol that uses an automated market maker (AMM). AMM's work is carried out using a smart contract, so all exchange operations take place safely and without the participation of three persons. Instead of the classic order book, AMM gives users the opportunity to become liquidity providers and get LP tokens.

Liquidity pools

To swap tokens, a smart contract, which is a liquidity pool, must contain these tokens. The liquidity pool contains a pair of tokens that any user can add and thereby become a liquidity provider.

To add liquidity, you need to send both tokens for an equal amount in USDT.

User case

You want to become a liquidity provider in the xUSD/XFI pool for 1,000 USDT. The XFI rate is 2 USDT, and the xUSD rate is always 1 USDT. So you will need to send 250 XFI and 500 xUSD.

What Are LP Tokens?

LP Tokens allow users to receive a percentage of trading commissions in the liquidity pool and additional crypto rewards from the CrossFi Foundation. After adding liquidity, you will receive an LP Token. You must send the LP Token to the staking in the xApp section to receive additional rewards.

Currently, you can only become a liquidity provider paired with xUSD using the following tokens: XFI, eMPX, and USDT. In the future, the number of liquidity pools will expand. You can remove LP Tokens and return the tokens to the liquidity pool.

how to use lp tokens
Add
Remove
Add

Choosing an LP Token

Enter amount

Approve amount in Metamask

Add Liquidity

Confirm the transaction in MetaMask

Complete the transaction

The successful addition of liquidity

Since all liquidity pools are paired with xUSD, LP Token will have the name of the token that is paired with it. For example, after adding liquidity to the wXFI/xUSD pool, you will receive lpXFI.

In the Get LP Tokens section, select the desired LP Token. In the “Add” tab, both tokens will be selected automatically. You must enter the desired amount of one of the two tokens, after which the system will calculate:

  • The amount of the second token to add liquidity;
  • The transaction fee.

If the amount of one token in USDT exceeds the available amount in USDT of the second token, the system displays the error message “Exceeds balance”.
Next, click the “Approve” button.

It is necessary to approve the amounts of your tokens in the Metamask to add liquidity to the pool.  In the wallet window that opens, check the amount of the token and click the “Next” button. Once again, you check all the details of approving the token amount and click the “Approve” button. After that, you repeat the approval for the amount of the second token.

After approving the amount of tokens, click the “Add Liquidity” button

It is necessary to confirm the transaction in the MetaMask wallet. In the wallet window that opens, you check all the information once again and confirm the transaction by clicking the “Confirm” button.

The transaction takes no more than 5 seconds to complete, and in this short period of time, the system will display the amount of tokens that you add to the liquidity.

After completing the transaction, the system will provide you with:

  • Information about the successful addition of liquidity;
  • The amount of LP Tokens received;
  • Hash of the transaction and a link to view it in XFI Scan.
Remove

Enter amount

Approve amount in Metamask

Remove Liquidity

Confirm the transaction in MetaMask

Complete the transaction

Liquidity removal is completed

In the Remove tab, enter the amount of LP Token that needs to be removed to receive the basic tokens.
Next, click the “Approve” button.

It is necessary to approve the amount of your LP tokens in Metamask to remove liquidity. In the wallet window that opens, check the amount of the token and click the “Next” button. Once again, check all the details of approving the LP token amount and click the “Approve” button.

After approving the amount of tokens, click the “Remove Liquidity” button.

It is necessary to confirm the transaction in the MetaMask wallet. In the wallet window that opens, check all the information once again and confirm the transaction by clicking the “Confirm” button.

The transaction takes no more than 5 seconds to complete, and in this short period of time, the system will display the amount of LP tokens that you remove from the liquidity.

After completing the transaction, the system will provide you with:

  • Information about the successful removal of liquidity;
  • The amount of the base tokens received;
  • Hash of the transaction and a link to view it in XFI Scan.
Add

Choosing an LP Token

Since all liquidity pools are paired with xUSD, LP Token will have the name of the token that is paired with it. For example, after adding liquidity to the wXFI/xUSD pool, you will receive lpXFI.

Enter amount

In the Get LP Tokens section, select the desired LP Token. In the “Add” tab, both tokens will be selected automatically. You must enter the desired amount of one of the two tokens, after which the system will calculate:

  • The amount of the second token to add liquidity;
  • The transaction fee.

If the amount of one token in USDT exceeds the available amount in USDT of the second token, the system displays the error message “Exceeds balance”.
Next, click the “Approve” button.

Approve amount in Metamask

It is necessary to approve the amounts of your tokens in the Metamask to add liquidity to the pool.  In the wallet window that opens, check the amount of the token and click the “Next” button. Once again, you check all the details of approving the token amount and click the “Approve” button. After that, you repeat the approval for the amount of the second token.

Add Liquidity

After approving the amount of tokens, click the “Add Liquidity” button

Confirm the transaction in MetaMask

It is necessary to confirm the transaction in the MetaMask wallet. In the wallet window that opens, you check all the information once again and confirm the transaction by clicking the “Confirm” button.

Complete the transaction

The transaction takes no more than 5 seconds to complete, and in this short period of time, the system will display the amount of tokens that you add to the liquidity.

The successful addition of liquidity

After completing the transaction, the system will provide you with:

  • Information about the successful addition of liquidity;
  • The amount of LP Tokens received;
  • Hash of the transaction and a link to view it in XFI Scan.
Remove

Enter amount

In the Remove tab, enter the amount of LP Token that needs to be removed to receive the basic tokens.
Next, click the “Approve” button.

Approve amount in Metamask

It is necessary to approve the amount of your LP tokens in Metamask to remove liquidity. In the wallet window that opens, check the amount of the token and click the “Next” button. Once again, check all the details of approving the LP token amount and click the “Approve” button.

Remove Liquidity

After approving the amount of tokens, click the “Remove Liquidity” button.

Confirm the transaction in MetaMask

It is necessary to confirm the transaction in the MetaMask wallet. In the wallet window that opens, check all the information once again and confirm the transaction by clicking the “Confirm” button.

Complete the transaction

The transaction takes no more than 5 seconds to complete, and in this short period of time, the system will display the amount of LP tokens that you remove from the liquidity.

Liquidity removal is completed

After completing the transaction, the system will provide you with:

  • Information about the successful removal of liquidity;
  • The amount of the base tokens received;
  • Hash of the transaction and a link to view it in XFI Scan.

faq

What Are LP Tokens?

LP (Liquidity Provider) Tokens are digital tokens that represent a user’s share in a liquidity pool. Users who add liquidity to a pool (provides assets) receive LP tokens in return. These tokens reflect the amount of liquidity the user has contributed to the pool. LP tokens can be used for various purposes, including:

  • Earning a share of the trading fees from transactions in the liquidity pool.
  • Staking the LP tokens in return for additional rewards or interest.
  • Redeeming the original assets from the pool when withdrawing liquidity.
What Is a Liquidity Pool?

A liquidity pool is a collection of two or more tokens locked into a smart contract on a decentralized exchange (DEX). It is essential for decentralized trading because it provides the assets that users trade. Rather than using a traditional order book, liquidity pools enable decentralized exchanges to use automated market makers (AMMs) to facilitate token swaps.

A liquidity pool typically contains a pair of tokens, and its value remains balanced by a formula such as x * y = k (used in many AMMs like Uniswap). This formula ensures that the pool remains balanced in proportion to the amount of the tokens provided.

What Is an Automated Market Maker (AMM)?

An Automated Market Maker (AMM) is a decentralized exchange protocol that prices assets within liquidity pools using a mathematical algorithm rather than an order book. In an AMM, liquidity is provided by users (liquidity providers), and prices are determined algorithmically based on the ratio of tokens in the pool.

AMMs allow trades directly between a user and a liquidity pool rather than between buyers and sellers. This removes the need for intermediaries, enabling continuous trading regardless of demand or liquidity levels at any specific time.

What Is a Liquidity Provider?

A liquidity provider is a user who adds assets (typically in pairs) to a liquidity pool on a decentralized exchange. In return for liquidity, the provider receives LP tokens representing their stake in the pool. Liquidity providers are crucial in decentralized exchanges as their contributions allow users to trade tokens in the pool without needing a traditional buyer and seller.

By being a liquidity provider, users can:

  • Earn trading fees generated from transactions within the pool.
  • Receive additional rewards, such as staking incentives, depending on the platform.
How to Become a Liquidity Pool Provider

To become a liquidity pool provider, follow these general steps (specific processes may vary based on the platform):

  • Choose a Platform: Select a decentralized exchange (DEX) that supports liquidity pools as xAPP.
  • Select a Token Pair: Choose a pair of tokens to provide liquidity. For example, you could select an XFI/xUSD pool.
  • Provide Equal Value of Tokens: In most liquidity pools, you must contribute an equal value of both tokens (measured in a stable currency like USDT). For instance, if you’re adding to a 1,000 USDT liquidity pool where XFI is worth 2 USDT and xUSD is worth 1 USDT, you would need to provide 250 XFI and 500 xUSD.
  • Deposit Tokens: Use your crypto wallet (e.g., MetaMask) to deposit the required tokens into the liquidity pool via the DEX interface.
  • Receive LP Tokens: After depositing your tokens, you’ll receive LP tokens representing your pool share.
  • Earn Rewards: Once you are a liquidity provider, you can earn trading fees and possibly additional rewards depending on the platform.

If you want to remove your liquidity later, you can redeem your LP tokens to withdraw your original tokens from the pool.

License