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

# AMM

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

At the core of the CUBISwap platform is our decentralized exchange (DEX).&#x20;

Users can also add liquidity to the CUBISwap DEX to earn passive income on tokens you hold via trading fees in the form of liquidity provider tokens ($CUBI-LPs).

### Swapping/Trading

CUBISwap lets users trade without the need to go through a Centralized Exchange. Everything you do on CUBISwap is routed directly through your own wallet—no need to trust someone else with your coins!

### Liquidity Pools

You can only swap tokens on CUBISwap if there is enough liquidity for those tokens. If nobody has added much liquidity for the token or tokens you want to swap, it will be difficult, expensive, or impossible to do so.

Providing liquidity will get you LP Tokens, which will earn you rewards in the form of trading fees for making sure there's always liquidity for the exchange to use.

### Yield Farming

Yield farming enables users who provide liquidity to earn $CUBI rewards by locking their LP tokens into a smart contract. The incentive is to balance out the risk of impermanent loss that comes along with locking in your liquidity.

### Initial Farm Offerings (IFO & IDO)

An Initial Farm Offering is an event that lets users buy into a limited-time offer to purchase new tokens. The IFO & IDO price is usually very lucrative.


---

# 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://cubi-swap.gitbook.io/cubiswap/products/amm.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.
