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

# Overview

Before getting started building on DAMM v2, you should read the following resource to get a better understanding of how Meteora's DAMM v2 works:

<CardGroup cols={2}>
  <Card title="What's DAMM v2?" icon="question" iconType="solid" href="/overview/products/damm-v2/what-is-damm-v2">
    DAMM v2 is one of Meteora's advanced AMM product that allows you to provide concentrated or spot or single-sided liquidity to a pool and in return minting an NFT that represents your position.
  </Card>

  <Card title="DAMM v2 Configs" icon="gear" iconType="solid" href="/developer-guide/guides/damm-v2/pool-fee-configs">
    Each DAMM v2 pool is a PDA of token mints + config. There are 2 main types of DAMM v2 configs: Static config and Dynamic config.
  </Card>
</CardGroup>

***

# DAMM v2 Program

At Meteora, we’ve developed a `Node.js <> Typescript SDK`, a `Rust SDK` and a `Go SDK` to make deploying and managing your DAMM v2 liquidity pool easier. The following sections includes information on installing and using the SDKs. It also covers where to find the latest code, and how to contribute to these repositories.

## Program Details

<CardGroup cols={2}>
  <Card title="DAMM v2 Program" icon="rust" iconType="solid" href="https://github.com/MeteoraAg/damm-v2">
    Meteora DAMM v2 Program
  </Card>

  <Card title="DAMM v2 IDL" icon="code" iconType="solid" href="https://github.com/MeteoraAg/damm-v2-sdk/blob/main/src/idl/cp_amm.json">
    Meteora DAMM v2 Program IDL
  </Card>
</CardGroup>

<div className="overflow-x-auto">
  <table className="w-full border-collapse">
    <thead>
      <tr className="border-b border-gray-300 dark:border-gray-600">
        <th className="text-left py-3 px-4 font-semibold text-gray-900 dark:text-gray-100">Network</th>
        <th className="text-left py-3 px-4 font-semibold text-gray-900 dark:text-gray-100">Program ID</th>
      </tr>
    </thead>

    <tbody>
      <tr className="border-b border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800">
        <td className="py-3 px-4"><strong className="text-gray-900 dark:text-gray-100">Mainnet</strong></td>
        <td className="py-3 px-4"><code className="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-sm font-mono">cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG</code></td>
      </tr>

      <tr className="border-b border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800">
        <td className="py-3 px-4"><strong className="text-gray-900 dark:text-gray-100">Devnet</strong></td>
        <td className="py-3 px-4"><code className="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-sm font-mono">cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG</code></td>
      </tr>
    </tbody>
  </table>
</div>

<div className="overflow-x-auto">
  <table className="w-full border-collapse">
    <thead>
      <tr className="border-b border-gray-300 dark:border-gray-600">
        <th className="text-left py-3 px-4 font-semibold text-gray-900 dark:text-gray-100">Authority</th>
        <th className="text-left py-3 px-4 font-semibold text-gray-900 dark:text-gray-100">Address</th>
      </tr>
    </thead>

    <tbody>
      <tr className="border-b border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800">
        <td className="py-3 px-4"><strong className="text-gray-900 dark:text-gray-100">Pool Authority</strong></td>
        <td className="py-3 px-4"><code className="bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-sm font-mono">HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC</code></td>
      </tr>
    </tbody>
  </table>
</div>

## Compounding Fee Mode

DAMM v2 v0.2.0 introduces a third fee collection mode (`collect_fee_mode = 2`).

| `collect_fee_mode` | Fee Token    | Fee on Input?       |
| ------------------ | ------------ | ------------------- |
| 0 (BothToken)      | Output token | No (fee on output)  |
| 1 (OnlyB)          | Token B      | Only for B→A trades |
| 2 (Compounding)    | Token B      | Only for B→A trades |

In Compounding mode, a percentage of the collected fee (set by `compounding_fee_bps` on the config) is automatically reinvested back into pool reserves rather than accruing to LP positions. This portion is reported as `compounding_fee` in `EvtSwap2`. The remaining claimable portion is reported as `claiming_fee`.

<Note>
  Compounding mode pools use a constant-product formula with no concentrated liquidity range.
</Note>

## Official SDKs

<CardGroup cols={2}>
  <Card title="Typescript SDK" icon="node-js" iconType="solid" href="/developer-guide/guides/damm-v2/typescript-sdk/getting-started">
    Official Meteora DAMM v2 Typescript SDK
  </Card>

  <Card title="Rust SDK" icon="rust" iconType="solid" href="/developer-guide/guides/damm-v2/rust-sdk/integration">
    Official Meteora DAMM v2 Rust SDK
  </Card>

  <Card title="Go SDK" icon="golang" iconType="solid" href="/developer-guide/guides/damm-v2/go-sdk/integration">
    Official Meteora DAMM v2 Go SDK
  </Card>
</CardGroup>
