# Withdraw LP from Jediswap V1

Follow these step-by-step process to withdraw your liquidity from Jediswap V1.

{% stepper %}
{% step %}

### Get all Jediswap v1 LP tokens

* Open [https://starkscan.co](https://starkscan.co/)&#x20;
* Search your wallet address in the search bar&#x20;
* Go to Portfolio&#x20;
* Look for Tokens with symbol "JEDI-P"
* Click on Token contract address for each individual LP token

<figure><img src="/files/lAcmyTm52h5Wxm24b5A7" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Get your LP balance

* Go to the LP token page on Starkscan as described above
* Go to Read/Write contract
* Click on function "balanceOf(account)"
* Input your wallet address and click query
* Copy the value of the balance on a note, it will be used in step 4 and 5

<figure><img src="/files/CiphCikABqvTKNf24O5y" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Get address for token0 and token1

* Scroll down on the same page as above and click on function "token0()"
* Click query and copy the address on a note, it will be used to call withdraw function at end&#x20;
* Similarly scroll down again and click on function "token1()"
* Click query and copy the address on a note, it will be used to call withdraw function at end

<figure><img src="/files/hZy4KopNgjfSV0ZAXluE" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Give "Jediswap Router contract" approval to spend your Jedi-P LP token

* Go to "Write" from top left options on the same Jedi-P LP contract
* Connect your Starknet wallet
* Click on "increaseAllowance" function&#x20;
* In the "spender" field, paste "0x041fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023"
* In the "added\_value" field, paste the LP balance value you copied from step 2
* Click "write" and confirm tx on your Starknet wallet

<figure><img src="/files/X6MnhAcUiSJBglral3Ry" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/MAVROcWNm8UQCsy0Kku1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Remove your liquidity

* Go to "Write Contract" on [Jediswap Router Contract](https://starkscan.co/contract/0x041fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023#read-write-contract-sub-write)
* Connect your Starknet wallet
* Click on "remove\_liquidity" function
* Input these values in the fields
  * tokenA = token0 value you received from step 3
  * tokenB = token1 value you received from step 3
  * liquidity = LP balance value from step 2
  * amountAMin = 0
  * amountBMin = 0
  * to = \[your wallet address in which you want your funds]
  * deadline = 10000000000
* Click write and confirm the tx on your wallet

<figure><img src="/files/8YYMgeQ5vhGVcdBRbWOs" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Done! Your funds should be in your wallet. Repeat these steps for each of your Jediswap V1 LP position.

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jediswap.xyz/withdraw-lp-from-jediswap-v1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
