> For the complete documentation index, see [llms.txt](https://seacows.gitbook.io/seacows-amm-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seacows.gitbook.io/seacows-amm-docs/seacows-nft-amm-protocol/user-flow/swap.md).

# Swap

<figure><img src="/files/63RTQ85vbzDm0Gxo7D6q" alt=""><figcaption></figcaption></figure>

The Trader initiate the Swap flow:

1. Trader buys 5 NFT from the pair with 10 Token + 1% swap fee + 0.3% protocol fee
2. 0.1 Token as Swap fee saves in the Pair contract but will not be mixed with the reserves in the Pair
3. 0.03 Token as Protocol fee send to the `feeTo` address specified in the `SeacowsPositionManager`
4. It follows the constant product formula `x * y = k` on the reserves.

<br>


---

# 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:

```
GET https://seacows.gitbook.io/seacows-amm-docs/seacows-nft-amm-protocol/user-flow/swap.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.
