> For the complete documentation index, see [llms.txt](https://docs.gammaswap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gammaswap.com/legacy-v1/add-remove-liquidity.md).

# Add / Remove Liquidity

### Add Liquidity

You can add liquidity to a pool by navigating to the earn page, clicking on the pool you want to provide liquidity into and then adding in the two tokens of the pool in a 50:50 ratio. You can also zap in with one token. The zap features uses multiple DEXs to swap your token into the two tokens of the pool. There may be price impact, however.

### Remove Liquidity

To remove liquidity from a pool, navigate to the portfolio page and click on the current supplied position that you would like to remove.

Navigate to the withdraw tab in the pool page. You can withdraw using zap or by doing it manually.&#x20;

Zapping uses the GammaSwap DEX router to find the best prices and swaps your position into one token for you. If price impact is high or you prefer exiting into both tokens of the pool, you can withdraw manually by toggling the zap button off.

### Closing a Perpetual Option

Navigate to the trade page for the market of the position you would look to close and select the close button.&#x20;

You can also close a position from the portfolio page by going to the borrowed tab.

### Exit Farm

To withdraw liquidity, you must first unstake your LP on the farm page and then withdraw your liquidity from the pool.&#x20;

After unstaking, you can withdraw your liquidity on the pool page by adding the amount of GSLP you would like to withdraw and then click withdraw.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.gammaswap.com/legacy-v1/add-remove-liquidity.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
