# How to Remove Liquidity

When **removing liquidity**, you will transfer your LP tokens back to the ALEX smart contract and withdraw an equivalent value of the token pair plus any fees accrued while holding those LP tokens. Since the relative balance of the tokens in the liquidity pool may have changed since your initial deposit, you could experience what's known as [Impermanent Loss](https://docs.alexlab.co/what-can-you-do/key-concepts#impermanent-loss).

Ready to start? Let's get hands-on!

### Step 1: Go to the Pool Page

As when adding liquidity, go to <https://app.alexlab.co/> and click on navbar's Swap -> Pool tab.

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-9b3eef0a96987005f36c0406c84d3791244e2cab%2Fadding-liquidity-1-pool-tab.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

Once you're on the Pool page, you'll find the "My Liquidity" panel at the top of the pool list. This panel provides a summary of all your pool contributions.

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-5a27e3928a64fdc2414a1ff981b31e950a58a8a8%2Fremoving-liquidity-1-my-liquidity-main-panel.png?alt=media" alt=""><figcaption><p>The pools where you are providing liquidity are displayed here. There is only one in this example.</p></figcaption></figure>

### Step 2: Select Pool

Select the pool you would like to remove liquidity from, either through the "My Liquidity" panel or directly from the pool list.

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-2d786703251643d56d9eef93fc731e096fc83470%2Fremoving-liquidity-2-select-pool.png?alt=media" alt=""><figcaption><p>STX-ALEX pool selection.</p></figcaption></figure>

### Step 3: Open the Remove Liquidity Tab

Once in the panel of the pool, select the "Remove Liquidity" tab.

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-61107735dfe6b0f5623218dec944c01fdbbf11e7%2Fremoving-liquidity-3-remove-tab.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

### Step 4: Enter Amount to Withdraw

For this step, it's important to have in mind that the LP tokens you hold represent your share of the pool's funds. By entering the LP token amount, you're specifying the portion of the pooled funds you want to withdraw. Clicking the `Max` button sets your entire LP token balance, indicating you want to remove all liquidity from the pool.

When you enter the amount of LP tokens, you are specifiyng amount you will transfer to ALEX smart contract in order to receive your funds and any accrued fees in return. These fees are the ones accrued while holding those LP tokens.

Once you have decided the LP token amount, click the "Remove" button.

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-f1b07d474e178335aab11c3aa71b570418817c17%2Fremoving-liquidity-4-enter-amount.png?alt=media" alt="" width="375"><figcaption><p>Example of removing all liquidity; the amount matches the LP token balance.</p></figcaption></figure>

### Step 5: Confirm Liquidity Removal

A confirmation panel will appear where you can double check the amount. If everything looks correct, click "Confirm" :sunglasses:

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-6d80d56a8eb7ebb82e41e7f0f777dbe819ee08df%2Fremoving-liquidity-5-confirm-remove-liquidity.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

### Step 6: Confirm the Transaction in Your Wallet

After clicking "Confirm", you will need to confirm the transaction in your wallet. Here, your Stacks wallet is interacting with ALEX smart contract and is asking you for approval. Scroll through the wallet transaction window, review it and confirm the transaction. By doing this, you are allowing the wallet to sign and broadcast the transaction.

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-f079f0713e6f4499bae7342d7f257890668725bc%2Fremoving-liquidity-6-reduce-position-function-args.png?alt=media" alt="" width="375"><figcaption><p>Function arguments and confirmation button.</p></figcaption></figure>

### Step 7: Wait for Transaction Confirmation

Wait for the transaction to be confirmed on the network.

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-e269b41a97471015299a337e78c8e7c14beb365f%2Fadding-liquidity-7-tx-broadcasted.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
Recommended to track transaction status:

* Turn on [Telegram notifications](https://t.me/stacks_tx_notification_bot), you will get notified when the transaction is confirmed.
* Search for the transaction on the [ALEX Explorer](https://app.alexlab.co/explorer).
* Check your address activity on the wallet.
  {% endhint %}

<div><figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-0165d7489b5825bef854e86e9a9b18c5f3d7aafe%2Fremoving-liquidity-7-tg-tx-pending.png?alt=media" alt="" width="344"><figcaption><p>Telegram message with transaction pending status.</p></figcaption></figure> <figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-647df54d8e1c42c3d701ab4e875a15ad96205f4c%2Fremoving-liquidity-7-tg-tx-success.png?alt=media" alt="" width="361"><figcaption><p>Telegram message with transaction success status.</p></figcaption></figure></div>

<div><figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-cdae0277c33e0a9c0069348f78d4b583c9a3b38d%2Fremoving-liquidity-7-leather-tx-pending.png?alt=media" alt="" width="375"><figcaption><p>Transaction pending displayed on Leather wallet.</p></figcaption></figure> <figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-80dfe5bc72a2a34f618931b78d92043224819afa%2Fremoving-liquidity-7-leather-tx-success.png?alt=media" alt="" width="375"><figcaption><p>Transaction completed, token transfers are visible.</p></figcaption></figure></div>

### Step 8: Check the Updated Liquidity

Once the transaction is completed, you will see the changes reflected in the "My Liquidity" panel, and the updated token balances should appear in your wallet.

<figure><img src="https://959532270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcPba3T1TXTWQ8joiZkYd%2Fuploads%2Fgit-blob-496fea89a9d35f97688f0dffa886fe059a5ec1f2%2Fremoving-liquidity-8-my-liquidity.png?alt=media" alt=""><figcaption></figcaption></figure>
