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

# Core

Much of BubbleFi's core functionality is derived from Uniswap v2, a classic foundational full range AMM with the `x * y = k` preset curve.

## Creating New Pools

Monadex pools are the key functional units in the AMM architecture. New BubbleFi pools with different token combinations can be created in a permissionless fashion for all supported tokens (this excludes fee-on-transfer tokens, or tokens with incompatible quirks). Liquidity providers can supply liquidity in the form of amounts of token pairs to these pools to enable traders to start swapping. Liquidity providers are given LP tokens as per their share of the pool, which accrue fees over time with swapping activity. Most of the collected fees goes towards compensating the liquidity providers for bearing the risk of impermanent loss while supplying liquidity to pools, however, a small, almost negligible amount of the fees goes to Monadex Labs to enable further growth of the protocol, and incentivize innovation in the space.

## Supplying and Withdrawing Liquidity

Liquidity providers can create or decide to exit their positions at any time, and collect their share of accrued fees.

## Swapping Tokens

Users can swap out one token for another on the corresponding BubbleFI bubble pools. On each swap, users pay a small pool fee which is directed towards the liquidity providers. A small portion of this pool fee goes to the protocol treasury.&#x20;

## Flash Swaps and Flash Loans

BubbleFi supports flash swaps and flash loans right out of the box. Additionally, traders can hook into the flash swap or flash loan lifespan by executing custom logic before and after a trade occurs, providing them a fine-tuned control over their trading strategy.


---

# 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://bubblefi.gitbook.io/bubblefi/features/full-range-amm/core.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.
