> For the complete documentation index, see [llms.txt](https://docs.drunkencats.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.drunkencats.xyz/product/swaps.md).

# Swaps

## Overview

The Swap feature lets you instantly exchange one token for another on the LitVM network. Swaps are executed on-chain through automated market maker (AMM) smart contracts — there is no order book, no counterparty and no waiting. You trade directly against liquidity pools.

***

#### Supported Tokens

All tokens issued on LitVM are available for swaps. Swap may not be possible if there is no liquidity pool for the selected pair. A liquidity pool can be created for any pair of tokens.

***

#### How Swaps Work

Drunken Cats uses an **Automated Market Maker (AMM)** model, similar to Uniswap V2.

* **Liquidity pools** hold reserves of two tokens (e.g., zkLTC / dcUSD).
* When you swap, you deposit one token into the pool and withdraw the other.
* The exchange rate is determined by the **constant product formula**: `x * y = k`, where `x` and `y` are the reserves of each token.
* **Routing:** If no direct pool exists for your desired pair, the DEX will route your swap through intermediate pools (e.g., Token A → zkLTC → Token B).
* **Slippage** occurs when the swap size is large relative to the pool reserves, causing the price to move against you.

***

#### 3.4 Slippage Settings

Slippage tolerance defines the maximum price difference you are willing to accept between the quoted price and the executed price.

* **Default:** The platform sets a reasonable default slippage tolerance.
* **Custom:** You can adjust the slippage tolerance in the swap settings. Higher tolerance means your transaction is less likely to fail, but you may get a worse price.
* **Recommendation:** For most swaps, 0.5%–1% is sufficient. For volatile or low-liquidity tokens, you may need 2%–5%.

> Swap preview shows expected sloppage. At mainnet, there will be maximum slippage setting.\
> If your slippage tolerance is too low, the transaction may revert with a "slippage exceeded" error. If too high, you may be vulnerable to front-running.

***

#### Price Impact

Price impact shows how much your swap will move the market price. It depends on:

* **Swap size** relative to pool reserves — larger swaps cause greater price impact.
* **Pool depth** — deeper pools (more liquidity) absorb large swaps with less impact.

> **Warning:** If the price impact exceeds 5%, the UI will display a warning. Consider splitting large swaps into smaller trades or waiting for deeper liquidity.

***

***

#### Fees

| Network     | Swap Fee                                       |
| ----------- | ---------------------------------------------- |
| **Testnet** | 0% - no fees during early testing phase        |
| **Mainnet** | 0.3% per swap - fees go to liquidity providers |

* On testnet, swaps are completely free (no protocol fee). This is to encourage testing and early usage.
* On mainnet, a **0.3% fee** will be applied to each swap. This [fee is distributed to liquidity providers](/economic-model/fee-distribution.md) as a reward for supplying pool reserves.
* Standard gas fees (in zkLIT) apply on both testnet and mainnet.


---

# 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.drunkencats.xyz/product/swaps.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.
