# How the AMM Works

***

### The constant product model

The pool holds two assets at all times: DFMREIT tokens and a stablecoin (USDC or CC). Every trade must maintain the constant product invariant:

```
x · y = k

x = quantity of DFMREIT tokens in the pool
y = quantity of USDC/CC in the pool
k = a constant, maintained across all trades
```

The price of DFMREIT at any moment is the ratio of `y` to `x`. As demand shifts, the ratio shifts — prices move continuously and predictably with every trade.

***

### A buy, step by step

1. You send USDC/CC into the pool — `y` increases.
2. DFMREIT tokens leave the pool — `x` decreases.
3. The new ratio `y/x` is higher — price has moved up.
4. The constant `k` is preserved throughout.

The reverse happens when you sell: DFMREIT enters the pool, USDC/CC exits, price moves down.

***

### Price impact

Larger trades move the price more. This is a direct function of your trade size relative to total pool size. A trade representing 1% of the pool will have meaningfully more price impact than one representing 0.01%.

The platform always displays your estimated price impact before you confirm.

***

### No order books, no counterparties

The AMM requires no matching engine and no counterparty on the other side of your trade. The pool itself is always your counterparty. This means:

* The market is always open — no minimum number of participants required
* Execution is atomic and deterministic
* There are no partial fills or pending orders

***

### How the AMM stays anchored to NAV

The AMM price is kept close to the DFMREIT indicative NAV by natural arbitrage incentives:

**Discount (AMM < NAV):** Buy tokens cheaply on AMM → redeem at NAV at the next window → profit. This buying pressure pushes the AMM price back up.

**Premium (AMM > NAV):** Subscribe for tokens at NAV during market hours → sell at a premium on AMM → profit. This selling pressure pushes the AMM price back down.

This mechanism runs without coordination. No admin, no oracle, no rebalancer required.


---

# Agent Instructions: 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://docs.fractit.com/liquidity-and-amm/how-the-amm-works.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.
