# AMM Models (CPMM & CLMM)

The Nexus Protocol supports multiple Automated Market Maker (AMM) mathematical curves to cater to different institutional risk profiles and market environments. Unlike smart-contract based AMMs, these curves are computed off-chain via the Nexus Composer and independently verified by Maker and Taker nodes prior to [PSBT signature execution](/protocol-architecture/psbt-engine.md).

{% tabs %}
{% tab title="Constant Product (CPMM)" %}
**Constant Product AMM (CPMM)**

Mathematical Foundation

CPMM implements the fundamental invariant: $$x × y = k$$, where x and y represent reserve balances of two assets, and k remains constant across all trading operations (excluding fee accrual).

This model provides continuous liquidity across all price levels spanning from zero to infinity. As derived in the [Non-Dilutable Yield Theorem](/yield-economics-and-amm-design/non-dilutable-yield.md), the CPMM curve is homogeneous of degree 2, meaning that arbitrage flows scale perfectly linearly with TVL, ensuring reliable yields resistant to liquidity dilution.

Institutional Execution Analysis

* Algorithmic Simplicity: Straightforward implementation for quantitative models tracking Mean-Reversion strategies.
* Continuous Availability: Guaranteed market-making at all theoretical price bands.
* Trade-off: Lower capital efficiency. Uniform distribution across an infinite price range results in suboptimal capital utilization, leading to higher slippage on larger trades relative to pool size.
  {% endtab %}

{% tab title="Concentrated (CLMM)" %}
**Concentrated Liquidity AMM (CLMM)**

Advanced Capital Efficiency Framework

CLMM enables quantitative managers to concentrate their capital bounds within specific, high-velocity price ranges through virtual reserve equations: $$(x + virtual\_x) × (y + virtual\_y) = k$$

By mathematically shifting the price intercepts, CLMM radically improves capital efficiency by focusing liquidity exactly where current trading activity exists.

Institutional Execution Analysis

* Range Specification: LPs define precise upper and lower price boundaries for execution.
* Virtual Amplification: Reduces slippage by orders of magnitude compared to an equivalent CPMM pool size. (e.g. Concentrating liquidity between bounded limits can amplify depth 10x+ over CPMM).
* Trade-off: Requires active, algorithmic range management to prevent capital from sitting idle when the market price breaches the specified bounds.
  {% endtab %}
  {% endtabs %}

#### Fee Economics & Autonomous Distribution

Beyond mathematical capital efficiency, Nexus introduces fundamental operational autonomy for market makers through its fee architecture. In traditional DeFi pools, the protocol mandates a fixed fee (e.g., 0.3%) and a fixed revenue split (e.g., 80% to LPs, 20% to the protocol).

Nexus [Independent Nodes](/deployment-and-integration/node-setup.md) operate as sovereign yield mechanisms.

Autonomous Pricing

Node operators algorithmically set their own Liquidity Provider (LP) Fee within their node configuration based entirely on their exact quantitative strategy and current market volatility. If an operator provides superior execution or deeper specialized liquidity, they can command a premium fee rate (e.g., 1.5% or 2%).

Settlement & Protocol Infrastructure Fee

The Nexus network only assesses a flat, base infrastructure usage fee (fixed at 0.1%). During the atomic PSBT settlement, fees are distributed cleanly:

* The LP Fee settles directly into the operator-controlled UTXOs.
* The 0.1% Protocol Fee is routed to fund Nexus infrastructure.

This pure free-market approach allows self-custodial entities to compete aggressively on execution quality and price discovery without being constrained by legacy pool models.


---

# 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.on.nexus/yield-economics-and-amm-design/amm-models.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.
