LP Guide

- LP Guide (Esp)
- LP Guide (Rus)

Description

LP token is a token that a user receives when replenishing a liquidity pool (a liquidity pool is a storage for bringing together the assets of a large number of users). In other words, the LP token is a confirmation of the user’s share in the liquidity pool. The more liquidity the user adds to the pool, the more LP tokens he or she will receive.

Each pool, which consists of two tokens (the so-called pair), has its own LP token. At the same time, LP tokens are not complementary or fungible. For example, for the NBU / USDT pair, the user receives the LP token NBU_USDT_LP, and for the NBU / WBTC pair, the user receives the LP token NBU_WBTC_LP, etc.

LP token price is calculated according to the following formula:

Where:

  • reserveA * reserveB are reserves of two kinds of tokens, of which the pair consists;
  • SQRT (token1 / RewardTokenPrice * token2 / RewardTokenPrice) — square root of (amount of the first token / NBU price * amount of the second token / NBU price)
  • LP_Total_Supply — the total volume of LP tokens

LP tokens can be created on the Nimbus Platform using the functionality in the Pool section. The user can withdraw the liquidity added to the pool at any time. In this case, LP tokens will be withdrawn from the account, and the initial tokens (initially used for creating a pair) will be returned. It is worth mentioning that tokens will be accrued to the account at the current exchange rate.

For instance, when adding liquidity to the Token_A / Token_B pair, the rate was 1: 1. The user added 100 Token_A and 100 Token_B to the pool and received 100 LP tokens in return. After a while, the user takes the added liquidity back, but due to the change in the rate, he receives 75 Token_A and 125 Token_B.

Important: When interacting with ERC-20 tokens, the user should use the Ethereum network. When interacting with BEP-20 tokens, the user needs to make sure that the Binance Smart Chain is connected. We recommend using the Nimbus Platform on the BSC network as the fees are much lower there. Switching to BSC is very simple — you can find step-by-step instructions here.

LP tokens are also associated with such a process as LP Staking. It is the process by which you transfer your tokens to blockchain maintenance in exchange for Rewards in the form of new tokens. In simple words — you “deposit” your tokens and receive Rewards on top of them. Once you receive LP tokens, you will be able to deposit them and receive Rewards on top of them via LP Staking functionality of the Nimbus Platform. For more information, see the LP Staking Guide.

You can create LP tokens both on the Nimbus Platform and on the Uniswap exchange. LP tokens are created there via the same functionality as on the Nimbus Platform in the Pool section, but only within those pairs created on Uniswap: https://app.uniswap.org/#/swap. Once the LP token is created, it goes to the user’s wallet and the user can go to the Platform to the LP Staking section and add the LP token to the offer (the one that has the “Uniswap” mark — see the “LP Tokens Created on Uniswap” section of this guide).

  • For users, there is a Reward of 0.15% from each Swap transaction in the pool. It is accrued in the token that is swapped (the Reward is divided between all liquidity providers in this pool). In other words, by adding liquidity to the pool, the user receives 0.15% of the amount of Swap transactions for this pair in proportion to his/her share in the pool. Rewards are accumulated in the pool in real-time, and liquidity providers receive their part only when they take liquidity from the pool back (when they “burn” LP tokens).
  • There is also a Reward of 0.15% in NBU tokens from each Swap transaction in the pool. In other words, by adding liquidity to the pool, the user receives 0.15% of the amount of transactions in NBU in proportion to his/her share in the pool. Rewards are accumulated in the pool in real-time, and liquidity providers receive their part only when they take liquidity from the pool back (when they “burn” LP tokens).
  • Moreover, liquidity providers receive 100% APY in NBU (~0.27% per day) when using LP Staking. The following pairs are available for this functionality: BNB / NBU and GNBU / NBU on the BSC network, as well as ETH / NBU, GNBU / NBU, USDT / NBU and WBTC / NBU on the Ethereum network (current pairs can be tracked on the Platform: https://app.nimbusPlatform.io/#/lp-staking).

How It All Works

The user has two tokens on the wallet (Token_A and Token_B). In order to become a liquidity provider, he/she creates a pair of possessed tokens or adds tokens to an already existing pair.

To check the amount of each token needed, the user should go to the Pool section of the Platform, click on the Add Liquidity button and see the calculation based on the amount of one token.

After adding liquidity to the pool, the LP token (LP_Token_AB) will be added to the user’s wallet. Further, from each Swap transaction within this pair, 0.15% of the token that is swapped will be transferred to the pool, as well as 0.15% of the number of transactions in NBU. The user will receive a Reward in accordance with his share in the pool. To receive additional Rewards, the user can use the LP Staking functionality (100% APY in NBU).

To return the tokens that were initially added to the pool, the user needs to withdraw LP tokens from Staking (if using this functionality), open the required pair in the Pool section of the Platform and exchange LP tokens for the ones that the user added to the pool. In this case, not only his/her tokens but also Rewards will be accrued to the user’s wallet.

Important: Before using this section (and any other section of the Platform), make sure the wallet is connected to the Platform. When the wallet is connected, all buttons in this section will become active. This document will use the MetaMask wallet as an example.

How to Add the Liquidity Pair

Important: Before creating a liquidity pair with native tokens, make sure that there are NBU tokens on the wallet. If there are no NBU tokens on the wallet, they can be acquired through the Swap section of the Platform. More details on acquiring NBU tokens can be found in the following guide.

To create a liquidity pair, go to the Pool section of the Platform (Figure 1).

Figure 1

Then, the wallet needs to be connected by clicking on the Connect to a wallet button in the upper right corner of the interface (Figure 2).

Figure 2

Next, click on the Add Liquidity button (Figure 3).

Figure 3

A new window will open. Tokens for creating a pair need to be selected there. If there is no such pair on the Nimbus Platform yet, the following message will be displayed (Figure 4).

Figure 4

To select the first token for a pair, click on the drop-down list — the BNB token is indicated there by default. A window with available tokens will open (Figure 5).

Figure 5

To select the second token for the pair, click on the Select a token drop-down list button in the second Input window (Figure 6).

Figure 6

The same window for selecting the token will open (Figure 7).

Figure 7

Once the tokens for the pair are selected, you need to specify the amount of each of them. To do this, in the Input window (either upper or lower), enter the token amount, and the value of the second token will be calculated automatically at the current exchange rate (Figure 8). It is also worth mentioning that in case the user already has this pair of LP tokens, the data (pool share, token rates) will be automatically provided (Prices and pool share window).

Figure 8

Important: To get LP tokens, make sure the amount of the first token is equal to the amount of the second one in the pair (in value, not in units).

Then, confirm the action by clicking on the Supply button (Figure 8).

A new window will open. It contains the following information (Figure 9):

  • Number of LP tokens that will be received (see the “Description” section of this guide);
  • Information about the added tokens;
  • Token rates relative to each other;
  • Pool share.
Figure 9

Next, confirm the action by clicking on the Confirm Supply button (Figure 9).

The MetaMask wallet window will open. You also need to confirm the action by clicking on the Confirm button (Figure 10).

Figure 10

Finally, a window confirming the successful transaction will appear (Figure 11).

Figure 11

After adding liquidity to the selected pair, a new window will appear in the Pool section of the Platform. It contains the following information (Figure 12):

  • Number of LP tokens that will be received (see the “Description” section of this guide);
  • Information about the added tokens;
  • Pool share.
Figure 12

At the same time, LP tokens will appear in the wallet connected to the Platform (Figure 13).

Figure 13

Important: Received LP tokens serve as proof of adding liquidity to the pool. LP tokens can be added to LP Staking. A Reward of 100% APY in NBU is provided there (see the “LP Staking” section of this guide). The user can take liquidity from the pool out at any time and return his/her initial tokens back.

To add tokens to an existing offer, go to the Pool section of the Platform and click on the Manage button. Then click on the Add button (Figure 14).

Figure 14

The same window (Add liquidity) will open as when adding tokens for the first time (Figure 15).

Figure 15

Next, specify the amount of each token to be added to the liquidity pool. To do this, in the Input window (either upper or lower), enter the token amount, and the value of the second token will be calculated automatically at the current exchange rate (Figure 16).

Figure 16

Then, confirm the action by clicking on the Supply button (Figure 16).

A new window will open. It contains the following information (Figure 17):

  • Number of LP tokens that will be received (see the “Description” section of this guide);
  • Information about the added tokens;
  • Token rates relative to each other;
  • Pool share.
Figure 17

Next, confirm the action by clicking on the Confirm Supply button (Figure 17).

The MetaMask wallet window will open. You also need to confirm the action by clicking on the Confirm button (Figure 18).

Figure 18

The window confirming the successful transaction will appear.

In the Pool section of the Platform (in the following window), the number of tokens and the share in the pool will increase (Figure 19), as well as the number of LP tokens on the wallet (Figure 20).

Figure 19
Figure 20

How to return tokens

In order to exchange LP tokens back for the initially added ones, go to the Pool section of the Platform (Figure 21).

Figure 21

Then, a pair for exchange needs to be selected. In the window of this pair, click on the Manage button and then — on the Remove button (Figure 22). And vice versa, in order to add tokens, click on the Add button — the process is exactly the same as described above.

Figure 22

A new window will open (Figure 23). You can specify the percentage of tokens for exchange (return) by clicking on the 25%, 50%, 75%, Max buttons or by manually selecting the value using the scale (Figure 24).

Figure 23
Figure 24

You can find more information about the tokens that make up the pair by clicking on the Detailed button (Figure 25).

Figure 25

The number of tokens that the user will receive will be calculated automatically. You can also see the price of each token relative to each other in the Price window.

Once the number of tokens for return is selected, click on the Approve button (Figure 24) and confirm the action in MetaMask using the Sign button (Figure 26).

Figure 26

At this stage, the smart contract is provided with access to tokens to make it possible to interact with this functionality in the future. A gas fee is charged for this action, however, access to each token needs to be provided only once, so the gas fee, accordingly, is also charged once.

After confirming the action, the Remove button will become active — to continue, click on it (Figure 27).

Figure 27

A new window will open. It contains the following information (Figure 28):

  • Number of tokens that will be received (returned);
  • Information about the added tokens;
  • Token rates relative to each other.
Figure 28

Next, confirm the action by clicking on the Confirm button (Figure 28).

The MetaMask wallet window will open. You also need to confirm the action there by clicking on the Confirm button (Figure 29).

Figure 29

A window confirming the successful transaction will appear.

In the Pool section of the Platform (in the following window), the number of tokens and the share in the pool will decrease (Figure 30), as well as the number of LP tokens on the wallet (Figure 31).

Figure 30
Figure 31

LP Tokens Created on Uniswap

You can create LP tokens both on the Nimbus Platform and on the Uniswap exchange. LP tokens are created there via the same functionality as on the Nimbus Platform in the Pool section, but only within those pairs created on Uniswap: https://app.uniswap.org/#/swap.

Once the LP token is created, it goes to the user’s wallet and the user can go to the Platform to the LP Staking section and add the LP token to the offer (the one that has the “Uniswap” mark — Figure 32).

The user receives Rewards on Uniswap and sees them on Uniswap, as well. The functionality is completely the same as for other offers.

The user can see LP tokens created on Uniswap on his/her balance on the Nimbus Platform by connecting the same wallet as on Uniswap.

LP tokens created on Uniswap can be added to LP Staking by the user — a certain Reward for LP Staking is provided.

Figure 32