> 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

<figure><img src="/files/KxQRiyc8oL5K47X8Qp92" alt="Soroban AQUA"><figcaption></figcaption></figure>

Aquarius AMMs are **automated market makers built as Soroban smart contracts** on the Stellar network. Launched in July 2024, they let anyone swap Stellar assets, provide liquidity, and earn — with no order book and no counterparty: prices come from a formula over the tokens held in each pool.

### 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:

* When you **deposit** tokens into a pool, you receive **LP share tokens** representing your proportion of the pool.
* Every swap pays a **trading fee**, which accrues to the pool — so the value behind each share grows with trading activity.
* 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](/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** follow the Uniswap v3 model: each LP chooses a **price range** where their capital is active, multiplying capital efficiency for those willing to manage positions. Fee tiers: 0.1%, 0.3%, or 1%. See the [position management guide](/user-guides/pools/manage-concentrated-liquidity-pool-positions.md) for the interface and the [developer reference](/developers/concentrated-liquidity.md) for the contract-level model.

{% hint style="info" %}
Concentrated liquidity pools are still under audit — a [Halborn audit](/security/audits.md) has been ongoing since June 2026. Manage exposure accordingly.
{% endhint %}

Anyone can [create a pool](/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 bribes](/for-projects/what-are-bribes.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](/voting-and-rewards/aquarius-voting.md) (voted above the threshold, all assets whitelisted in the [Asset Registry](/governance/asset-registry.md)) receive continuous AQUA emissions for their LPs.
* **ICE boost** — holders of [ICE](/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](/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 — the difference is called impermanent loss. Trading fees and rewards compensate for it; whether they compensate *enough* depends on the market. Stable pools largely avoid it while the peg holds; concentrated positions amplify both fee income and impermanent loss within their range.
* **Position management.** Concentrated positions earn nothing while the market price is outside their range and need active monitoring.
* **Token compatibility.** Aquarius supports standard Stellar and SEP-41 tokens with fixed supply and predictable transfers. Fee-on-transfer, rebasing, and deflationary tokens are not supported, and token contract migrations require manual action — see [System limitations](/amm-and-pools/system-limitations.md).

### For developers

The AMM is fully accessible on-chain: the [router contract](/developers/reference/router-and-pool-contracts.md) exposes swaps, deposits, withdrawals, and pool discovery, with runnable [code examples](/developers/code-examples.md) in Python and JavaScript and a [backend API](/developers/code-examples/get-pools-info.md) for pool data and swap routing.
