> For the complete documentation index, see [llms.txt](https://docs.aqua.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aqua.network/amm-and-pools/what-are-aquarius-amms.md).

# How Aquarius AMMs work

How Aquarius pools price swaps, what liquidity providers earn, the three pool types, and the risks to understand before depositing.

<figure><img src="https://3649863591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5QUy59hBUnouBhx8gNSS%2Fuploads%2F3j9yj9LPW3D8Oq0ni1rW%2FSoroban-aqua.png?alt=media&amp;token=b3a561a6-b74c-4efd-afe4-d615aefa50e5" alt="Aquarius AMM contracts on the Stellar Soroban platform"><figcaption></figcaption></figure>

Aquarius AMMs are **automated market makers built as Soroban smart contracts** on the Stellar network. Swaps execute against the reserves held by a pool, with prices determined by the pool's formula rather than an order book.

### How a pool works

A liquidity pool is a smart contract holding two or more tokens. Anyone can trade against it: a swap sends one token into the pool and takes the other out, and the pool's pricing formula moves the price with every trade.

Liquidity providers (LPs) are the other side of the market:

* In volatile and stable pools, a deposit mints **LP share tokens** representing your proportion of the pool. Concentrated pools record positions by owner and price range instead.
* Every swap pays a **trading fee**, which accrues to the pool — so the value behind each share grows with trading activity. In concentrated pools, fees accrue to the positions whose range the swap trades through and are paid out when you claim them or withdraw.
* When you **withdraw**, your shares are burned and you receive your proportion of the pool's tokens, including accumulated fees.

> The first deposit into an empty pool sets its initial exchange rate, so first depositors should cross-check market prices carefully — see [Deposit & withdraw liquidity](https://docs.aqua.network/user-guides/pools/deposit-and-withdraw-liquidity.md).

### Pool types

Aquarius offers three pool types, each with its own pricing formula:

**Volatile pools** follow the constant product formula (the Uniswap v2 model) and suit any pair of independently priced assets. The pool always holds two tokens, and the price adjusts continuously with supply and demand. Trading fee options at creation: **0.1%, 0.3%, or 1%**.

**Stable swap pools** are designed for assets that should trade close to **1:1** — stablecoins, or wrapped versions of the same asset (for example, ETH and yETH). The stable swap formula concentrates depth around the peg, giving much lower slippage than a volatile pool would for the same liquidity. Stable pools can hold up to three assets, with a customizable trading fee set at creation. Depositing volatile assets into a stable pool is dangerous — the formula assumes the peg and can drain value if prices diverge.

**Concentrated liquidity pools** let each LP choose the price range where the position supplies active liquidity. A narrower range places the same capital across fewer price intervals but moves out of range after a smaller price change. Fee tiers are 0.1%, 0.3%, or 1%. Read [Concentrated liquidity mechanics](https://docs.aqua.network/amm-and-pools/concentrated-liquidity.md) before using the [position management guide](https://docs.aqua.network/user-guides/pools/manage-concentrated-liquidity-pool-positions.md). The [developer reference](https://docs.aqua.network/developers/concentrated-liquidity.md) describes the contract model.

Anyone can [create a pool](https://docs.aqua.network/user-guides/pools/creating-a-pool.md) for any pair of supported tokens. Creating a pool costs **300,000 AQUA**, which discourages spam deployments.

### Where fees go

Trading fees primarily accrue to liquidity providers through the value of their shares. On high-volume markets, a share of AMM trading fees also funds [protocol voting incentives](https://docs.aqua.network/for-projects/what-are-voting-incentives.md) — rewards that flow back to voters supporting those markets, closing the loop between trading activity and liquidity incentives.

### Earning as a liquidity provider

Trading fees are only the base layer. Aquarius pools can earn up to three additional reward streams:

* **AQUA rewards** — pools whose market is in the [reward zone](https://docs.aqua.network/voting-and-rewards/aquarius-voting.md) (voted above the threshold, all assets whitelisted in the [Asset Registry](https://docs.aqua.network/governance/asset-registry.md)) receive continuous AQUA emissions for their LPs.
* **ICE boost** — holders of [ICE](https://docs.aqua.network/aqua-and-ice/ice-boosts-how-to-maximize-lp-rewards.md) can multiply their AQUA rewards by up to **2.5×**, depending on their ICE balance relative to their pool share.
* **Pool Incentives** — third parties can attach [extra reward streams](https://docs.aqua.network/for-projects/pool-incentives.md) to specific pools, paid in any traded token.

### Risks to understand

* **Impermanent loss.** In a volatile pool, if the two assets' prices diverge after you deposit, withdrawing can return less value than holding the assets. Trading fees and rewards may offset part or all of that difference, but the outcome depends on subsequent prices and trading activity. If an asset in a stable pool loses its peg, traders swap it in for the other assets, and LPs end up holding mostly the depegged asset. Concentrated positions add boundary and inventory-conversion effects described in [Concentrated liquidity mechanics](https://docs.aqua.network/amm-and-pools/concentrated-liquidity.md).
* **Position management.** Concentrated positions earn neither swap fees nor AQUA rewards while the market price is outside their range, and earn again when it returns. See [Managing concentrated positions](https://docs.aqua.network/user-guides/pools/manage-concentrated-liquidity-pool-positions.md).
* **Token compatibility.** Aquarius supports standard Stellar and SEP-41 tokens whose transfers move exactly the requested amount. Fee-on-transfer and deflationary tokens are not supported; rebasing tokens work in volatile and stable pools when their balances only increase, and not in concentrated pools. Token contract migrations require manual action — see [System limitations](https://docs.aqua.network/amm-and-pools/system-limitations.md).

### For developers

The [router contract](https://docs.aqua.network/developers/reference/router-and-pool-contracts.md) exposes swaps, deposits, withdrawals, and pool discovery. See the Python and JavaScript [code examples](https://docs.aqua.network/developers/code-examples.md) and the [backend API](https://docs.aqua.network/developers/code-examples/get-pools-info.md) for pool data and swap routing.
