> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raydium.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CPMM (Standard AMM)

> Pure constant-product AMM. No OpenBook dependency. Token-2022 compatible. The recommended program for new constant-product pools.

## What it is

CPMM is Raydium's standard constant-product AMM. It is the successor to AMM v4 and has no OpenBook dependency, lower gas, first-class Token-2022 support (including transfer-fee tokens), and a cleaner account layout.

**Program ID:** see [reference/program-addresses](/reference/program-addresses).

**Token-2022:** supported, including transfer-fee, permanent delegate, and default-account-state extensions. See [algorithms/token-2022-transfer-fees](/algorithms/token-2022-transfer-fees) for how transfer fees affect swap math.

## Chapter contents

<CardGroup cols={2}>
  <Card title="Overview" icon="circle-info" href="/products/cpmm/overview">
    What CPMM is, why it was built, and how it differs from AMM v4.
  </Card>

  <Card title="Accounts" icon="database" href="/products/cpmm/accounts">
    PoolState, AmmConfig, LP mint, token vaults, observation (oracle) account. Seeds, field layouts.
  </Card>

  <Card title="Math" icon="function" href="/products/cpmm/math">
    xy=k invariant, SwapBaseIn vs. SwapBaseOut math, oracle observation update rule, transfer-fee adjustment.
  </Card>

  <Card title="Instructions" icon="terminal" href="/products/cpmm/instructions">
    Initialize, Deposit, Withdraw, SwapBaseInput, SwapBaseOutput, CollectFundFee, CollectProtocolFee, UpdatePoolStatus.
  </Card>

  <Card title="Fees" icon="percent" href="/products/cpmm/fees">
    LP fee, protocol fee, fund fee, creator fee; how fees are collected and withdrawn.
  </Card>

  <Card title="Code demos" icon="code" href="/products/cpmm/code-demos">
    Create pool, deposit, withdraw, swap — in TypeScript (raydium-sdk-v2) and Rust CPI.
  </Card>
</CardGroup>

## When to read this

* You are creating a new constant-product pool.
* You need an AMM that supports Token-2022 tokens.
* You are routing and want to include CPMM liquidity.
