Skip to main content

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.

DAMM v2 is Meteora’s configurable constant-product AMM on Solana. To learn more about DAMM v2, including fee behavior, formulas, Token 2022 support, NFT positions, liquidity mining, and LP strategy, read the following product documentations.

Learn more about DAMM v2

Overview of DAMM v2, fee behavior, Token 2022 support, NFT positions, liquidity mining, and LP strategy.

DAMM v2 Formulas

Formulas and definitions for price, liquidity, fee, and impermanent loss concepts.

Integration

Program Accounts

Account model for configs, pools, position NFTs, rewards, vesting, token badges, and operators.

Program Instructions

Instruction families for pool creation, liquidity, swaps, rewards, locks, operator flows, and admin flows.

Program Events

Event families for pool creation, liquidity, swaps, rewards, locks, operator flows, and admin flows.

Program Errors

Anchor custom error codes, enum names, messages, and common integration causes.

TypeScript SDK

TypeScript SDK for interacting with all public DAMM v2 user flows.

Rust Integration

Rust integration with DAMM v2 through CPI and the quote library.

Go Integration

Go examples for reading pools, positions, position NFTs, and unclaimed rewards.

DAMM v2 APIs

Indexed read-only pool discovery, pool groups, OHLCV, volume, and protocol stats.

Program IDs

The cp_amm program ID is the same on mainnet and devnet:
NetworkProgram ID
Mainnet BetacpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG
DevnetcpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG
The pool authority PDA used by the program is:
AuthorityAddress
Pool AuthorityHLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC

DAMM v2 Program

Public Anchor program source for DAMM v2.

DAMM v2 IDL

Published Anchor IDL used by generated clients and the TypeScript SDK.

TypeScript SDK

Public SDK for transactions, quotes, PDA derivation, and account fetching.

Go Examples

Public Go examples for reading DAMM v2 state.

Pool Fee Configs

Static and dynamic config behavior, fee modes, collect fee modes, and published config keys.
The cp-amm source, IDL, TypeScript SDK, Rust quote SDK, and Go examples are public.

Commands

TaskCommand
Build TypeScript SDKcd damm-v2-sdk && pnpm install && pnpm run build
Run TypeScript SDK testscd damm-v2-sdk && pnpm test
Run TypeScript type checkscd damm-v2-sdk && pnpm run check-types
Run Rust quote SDK testscd damm-v2 && cargo test -p rust-sdk
Build cp-amm programcd damm-v2 && anchor build
Run Go examplescd damm-v2-go && go mod tidy && go run examples/get_pool.go

Stay Updated

DAMM v2 Changelog

Program, SDK, event, and quote changes for integration planning.