# Withdraw liquidity

You can withdraw liquidity at any time to realise any gains or losses. The following are the steps required to withdraw liquidity:

{% hint style="success" %}
**Step 1.** To withdraw liquidity, you first need to [**provide liquidity**](https://app.gitbook.com/@charmfinance/s/charm-finance/~/drafts/-MW3S6whoFOOQNr7CgXr/charm-options/liquidity-provision-tutorials/providing-liquidity).
{% endhint %}

{% hint style="info" %}
The **liquidity provided must be withdraw when a market expires, and re-deposited into a new market** when it opens.

Charm is currently working on a vault where liquidity can be automatically rolled over to new markets, so LPs do not need to manually withdraw and re-deposit.
{% endhint %}

{% hint style="success" %}
**Step 2.** **Connect your Metamask** wallet and go to **'Pools':**
{% endhint %}

![](https://337771475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKYbQySKRhJtb4pPaN%2F-MX2Nn_C3yxq89570ivC%2F-MX2OF-kNz1zoJAMx4iR%2FScreenshot%202021-03-30%20at%2014.02.18.png?alt=media\&token=ba6f01f0-4e29-4263-8ee3-e25db68aff04)

{% hint style="success" %}
**Step 3.** Your LP tokens will be displayed in '**Active pools**':
{% endhint %}

![](https://337771475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKYbQySKRhJtb4pPaN%2F-MW3kNPP3HdQYXN0IhK2%2F-MW3lvTkifXuoSyOUPF6%2FScreenshot%202021-03-18%20at%2010.00.29.png?alt=media\&token=e90bc74e-efa8-4918-9856-e9209e2cb2bc)

{% hint style="success" %}
**Step 4.** Click **'Withdraw'** to withdraw liquidity. The amount received will be displayed in the following page:
{% endhint %}

![](https://337771475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKYbQySKRhJtb4pPaN%2F-MW3kNPP3HdQYXN0IhK2%2F-MW3mqQg7j4mBE9Ow2vs%2FScreenshot%202021-03-18%20at%2010.04.18.png?alt=media\&token=6e7e4a13-1c0c-483d-8fb5-c98ed3eff225)

{% hint style="info" %}
This page can also be used to **determine your profit or loss** (before gas fees) from liquidity provision. This is equal to **Amount received - Total cost** (described in Step 8 in [Providing Liquidity](https://app.gitbook.com/@charmfinance/s/charm-finance/~/drafts/-MW3k0UFlgv2Vf8MlM-n/charm-options/liquidity-provision-tutorials/providing-liquidity/@drafts))
{% endhint %}

{% hint style="success" %}
**Step 5.** Click **'Withdraw ETH'** to withdraw liquidity, and receive the amount described in above. The following will appear in Metamask:
{% endhint %}

![](https://337771475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKYbQySKRhJtb4pPaN%2F-MW3rYsN_Rb8H3ZahOUj%2F-MW3sCNw3SWEM39bkq2-%2FScreenshot%202021-03-18%20at%2010.27.43.png?alt=media\&token=4677f3fc-9320-4a72-be83-bb10ebaf18f6)

{% hint style="info" %}
This shows the **maximum gas fees** to close a position is 0.029358.&#x20;

The amount '0' indicates no money is sent from your wallet to the Blockchain, because you are actually receiving money from the Blockchain. The amount you will receive (before gas fees) is 0.007283 ETH, for a gross profit (before gas fees) of 0 ETH because Amount received = Amount received = 0.007283.
{% endhint %}

{% hint style="success" %}
**Step 5.** Click **confirm** if you wish to proceed.
{% endhint %}

{% hint style="success" %}
**Step 6.** Charm will show the transaction is '**pending**':
{% endhint %}

![](https://337771475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKYbQySKRhJtb4pPaN%2F-MW3tkhWthOMr0K93qSH%2F-MW3uCpNqt_x2AJWdGQg%2FScreenshot%202021-03-18%20at%2010.36.42.png?alt=media\&token=092cc62b-5ecc-4d8e-b5c8-5c3987ba4695)

{% hint style="success" %}
**Step 7.** When your transaction have been executed on the Blockchain, you will received the following **confirmation from Metamask**:
{% endhint %}

![](https://337771475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKYbQySKRhJtb4pPaN%2F-MVv1otEy9mKUAFMqP-P%2F-MVv2KRtLRwmSmNM8I14%2FScreenshot%202021-03-16%20at%2012.38.47.png?alt=media\&token=28561c29-6842-4020-848a-d765f6d5a775)

{% hint style="success" %}
**Step 8.** **Click on the above** to view and check your transaction on Etherscan:
{% endhint %}

![](https://337771475-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKYbQySKRhJtb4pPaN%2F-MX2Nn_C3yxq89570ivC%2F-MX2P6z4s5Exw5XFVrYg%2FScreenshot%202021-03-30%20at%2014.50.21.png?alt=media\&token=385c08e5-37a2-483a-a5c2-7f413ee8049f)

From the above, you can **check the following details of your transaction**:

* The amount received should be the same as Step 4.
* The LP shares you returned should be the same as Step 4.
* The final gas fee should be lower than the Metamask estimate in step 5.

{% hint style="success" %}
**Step 9.** Close or exercise your **hedge positions**.
{% endhint %}

The hedge positions are the call or puts you sold in Step 10 of [providing liquidity](https://app.gitbook.com/@charmfinance/s/charm-finance/~/drafts/-MW3k0UFlgv2Vf8MlM-n/charm-options/liquidity-provision-tutorials/providing-liquidity/@drafts).&#x20;

If you **withdraw liquidity before a market expires:**&#x20;

* These [positions should be closed](https://app.gitbook.com/@charmfinance/s/charm-finance/~/drafts/-MW3k0UFlgv2Vf8MlM-n/charm-options/tutorials/close-a-position/@drafts).

If you **withdraw liquidity before a market expires:**

* These positions should be [exercised](https://app.gitbook.com/@charmfinance/s/charm-finance/~/drafts/-MW3k0UFlgv2Vf8MlM-n/charm-options/tutorials/settlement/@drafts).

## Congratulations! You have now withdrawn liquidity.

You can calculate your profit and loss from liquidity provision in the following manner:

**Total profit or loss** = **Amount Received** (Step 4) - **Total Cost** (Step 5 in '[Providing liquidity](https://app.gitbook.com/@charmfinance/s/charm-finance/~/drafts/-MW3S6whoFOOQNr7CgXr/charm-options/liquidity-provision-tutorials/providing-liquidity)')

Your chances of getting a high profit will be increased by **purchasing a hedging instrument at Charm** (in step 10 in '[Providing liquidity](https://app.gitbook.com/@charmfinance/s/charm-finance/~/drafts/-MW3S6whoFOOQNr7CgXr/charm-options/liquidity-provision-tutorials/providing-liquidity)')**, and only deposit in small amounts** (in step 5 in '[Providing liquidity](https://app.gitbook.com/@charmfinance/s/charm-finance/~/drafts/-MW3S6whoFOOQNr7CgXr/charm-options/liquidity-provision-tutorials/providing-liquidity)').
