# Pool

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FsKiC3VKAhhDfNWw8Fs6z%2Fdexlab%20pool.png?alt=media&#x26;token=ca1a0044-24a6-421b-a402-c7012630ec04" alt=""><figcaption></figcaption></figure>

## 🌊 The Liquidity Pool service is now live on Dexlab

Now, you can become a liquidity provider on Dexlab by depositing assets into a pool and facilitating SWAP trades on DEXs and AMMs.

<https://v3.dexlab.space/pools>

## Adding Liquidity on Pool

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FTwbh5ZJs4L1q1nHP9Caf%2F%EC%9C%A0%EB%8F%99%EC%84%B1%20%EC%B6%94%EA%B0%80.png?alt=media&#x26;token=6d0b2334-0406-4157-a6a3-006c7f9da2da" alt=""><figcaption></figcaption></figure>

&#x20;\*Note that this pool is on the devnet and used for tutorial usage.

1. Enter the amount of Token A
2. Token B amount will be automatically calculated
3. Click Add liquidity
4. Check the transaction process on the left-down corner. It may show a checkmark after transaction success

{% hint style="info" %}
**Terminology**<br>

* LP token: $mockDXL/$mockUSDP
* Fee Tier: The percentage of the transaction goes to the pool as a transaction fee
* $mockDXL and $mockUSDP amount: current amount in the pool
* LP supply: LP token amount ($mockDXL/$mockUSDP)
* Address
  * Pool ID
  * $mockDXL mint address
  * $mockUSDP mint address
  * LP token mint address
* Current Price: Can switch pair by arrow
* mockUSDP Price: $mockDXL per $mockUSDP amount
* mockDXL Price: $mockUSDP per $mockDXL amount
* TVL: Total Valued Locked. Total Liquidity Value
  {% endhint %}

<br>

## Withdrawing Liquidity from Pool

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FoMMdP33cGTPb1HyuE4rU%2F%EC%9C%A0%EB%8F%99%EC%84%B1%20%ED%95%B4%EC%A0%9C.png?alt=media&#x26;token=ef86531c-2bfc-4268-9d40-633a45e490da" alt=""><figcaption></figcaption></figure>

1. Click Withdraw
2. Type down the amount of LP token that you want to withdraw
3. Check the transaction process on the left-down corner. It may show a checkmark after transaction success

{% hint style="info" %}
**Terminology**<br>

* LP Address: LP token mint address
* Total LP supply: LP token amount ($mockDXL/$mockUSDP)
* My LP Amount: Amount of my LP token ($mockDXL/$mockUSDP)
* Mint A Amount: Current amount of $mockDXL in the pool
* Mint B Amount: Current amount of $mockUSDP in the pool
  {% endhint %}

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FoVneeyVbvRWArmpLrLwm%2F%ED%95%B4%EC%A0%9C%20%EC%99%84%EB%A3%8C%EB%90%9C%20%EB%AA%A8%EC%8A%B5.png?alt=media&#x26;token=6858f9cb-afbd-4c30-ad46-0d03cb041e60" alt=""><figcaption></figcaption></figure>

* If the withdrawal went successfully, click the refresh button and you may see the LP token details are gone

## Pool Driven SWAP

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FwWiUkeW1aBBEmnoofsfg%2F%EC%8A%A4%EC%99%91%20%ED%92%80%20%EC%82%AC%EC%9A%A9%20%EB%B2%95.png?alt=media&#x26;token=cd54e254-e4fe-46e3-a43d-5759c5244588" alt=""><figcaption></figcaption></figure>

1. Type down the amount of the token you want to swap
2. The paired token amount will automatically typed down
3. Click SWAP and check the wallet pop-up window
4. You may see the amount of the token differentiated after the SWAP

## Creating Pool

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FafC8b06ACtosSOODYXRx%2Fpool%20creation.png?alt=media&#x26;token=9e45d994-665d-45c3-8d86-9a156a7a2a4b" alt=""><figcaption></figcaption></figure>

* Click 'Create Pool'

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FRYTSBrkT5LNdQKkktKox%2Fpool%20creation2.png?alt=media&#x26;token=6ea73782-8d97-4ff8-88ab-e057455489da" alt=""><figcaption></figcaption></figure>

1. Select the Token A and Token B for the pool you want to make
2. Select the Fee Tier from 0.1% to 2%.

{% hint style="info" %}
**Fee Tier**

* The selected percentage from the transaction will be added to the pool as a transaction fee
  {% endhint %}

3. Type down the initial price for the token pair. I choose 1 $mockDXL = 1 $mockUSDP
4. Type down the deposit amount of the Token A on the right. Token B amount will be automatically typed down after calculation.
5. Click Create Pool to proceed

## Permanent LP Lock

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FZAABycJbnYX44Qg0F2AZ%2FPermanent%20LP%20lock%201.png?alt=media&#x26;token=3f8937c0-b67d-4731-af9e-661ccfb48b09" alt=""><figcaption></figcaption></figure>

* After adding the liquidity to the pool, you may see the 'Permanent Lock' button after refreshing the page

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2Fk8a3W0ndINLebhnIce9T%2FPermanent%20LP%20lock%202.png?alt=media&#x26;token=682c1dda-694f-4f56-9e24-404fd4dce6fa" alt=""><figcaption></figcaption></figure>

* Type down the amount of LP token that you want to lock
* Read the notice and click the checkbox to confirm
* Click the 'Permanent Lock' button to proceed

<figure><img src="https://4258708058-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLgGUCteWrA9nM5I3ts-887967055%2Fuploads%2FGx8zZpmFRFmHAYJfeVaa%2FPermanent%20LP%20lock%203.png?alt=media&#x26;token=a73e70e1-a0ce-4c29-929d-8a1d9cda3a2d" alt=""><figcaption></figcaption></figure>

* After locking the LP, you may see the number changed on 'My LP Amount'
