> For the complete documentation index, see [llms.txt](https://docs.alexlab.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alexlab.co/what-can-you-do/stacks-swaps/faqs.md).

# FAQs

<details>

<summary>Where does the swap fee go?</summary>

From the total fee charged during a swap operation, a portion is rebated to users who provide liquidity to the pool (liquidity providers), while the remaining part goes to the ALEX Lab Foundation. By default, this split is 50/50, but it may vary depending on the specific liquidity pool settings.

You can view these percentages in the Pool Info panel by navigating to the Swap -> Pool tab from the navbar and selecting your pool of interest from the list.

</details>

<details>

<summary>In which cases is routing necessary?</summary>

Token swaps on ALEX are performed on a decentralized exchange (DEX) and powered by liquidity pools. This implies that if you want to trade STX for ALEX tokens, you are interacting with the STX-ALEX liquidity pool. Since this pool exists, a direct swap is possible.

Now, suppose you want to trade MEME1 for MEME2, but there isn't a specific MEME1-MEME2 liquidity pool. In this case, the platform will use intermediate pools. For example, if there are STX-MEME1 and ALEX-MEME2 liquidity pools, they will act as intermediaries. In this case, the swap route would be MEME1 -> STX -> ALEX -> MEME2. While MEME1 is still the base token and MEME2 the target token, the swap involves two intermediate tokens (STX and ALEX).

</details>

<details>

<summary>How do token swaps work?</summary>

Swaps on ALEX's decentralized exchange (DEX) operate through smart contracts built on the Stacks network. These smart contracts manage liquidity pools, which are collections of crypto assets deposited by users. When you perform a swap, you trade tokens with the liquidity pool, eliminating the need for a direct counterparty. For example, if a user wants to trade Stacks' native currency (STX) for ALEX's governance token (ALEX), they would interact with the STX-ALEX liquidity pool on ALEX's smart contracts.

The [Automated Market Maker (AMM)](https://github.com/alexgo-io/alexlab-doc/blob/main/users/detailed-information/alexs-automated-market-maker-amm.md) protocol controls prices, fees, and token amounts. For further information on this topic please refer to the [ALEXGo Trading Pool documentation](https://docs.alexgo.io/automated-market-making/trading-pool).

</details>


---

# 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.alexlab.co/what-can-you-do/stacks-swaps/faqs.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.
