> For the complete documentation index, see [llms.txt](https://docs.camelot.exchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.camelot.exchange/get-started/castle-tutorials/swapping-explained.md).

# Swapping Explained

The swap feature is used when traders want to exchange tokens within trading pairs.&#x20;

On Camelot, users are charged a [trading fee](/tokenomics/protocol-earnings.md) when they make a token swap.\
[Liquidity](/get-started/castle-tutorials/providing-liquidity-explained.md) is provided to the exchange by liquidity providers, who add their tokens to liquidity pools.

### Swap modes

* Aggregator (V3) - This mode utilizes the Paraswap and OpenOcean APIs and combines both the Camelot V3 and V2 AMMs (Native mode uses only V3 and V2 AMMs)
* V3 - This mode exclusively uses the V3 AMM
* V2 - This mode exclusively uses the V2 AMM

### How to

{% content-ref url="/pages/uk2kZxIpUcMZIqyuzF7f" %}
[Swap tokens](/get-started/castle-tutorials/step-by-step-guides/swap-tokens.md)
{% endcontent-ref %}

{% hint style="warning" %}
For tokens with a custom transfer **TAX**, get familiar with the following [document](/get-started/castle-tutorials/swapping-tax-tokens.md)
{% endhint %}

{% hint style="danger" %}
Before initiating the swap, please make sure you are satisfied with the output parameters, such as price impact, minimum received, and rates
{% endhint %}

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


---

# 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.camelot.exchange/get-started/castle-tutorials/swapping-explained.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.
