quote units. |
| `interactionState(escrow, merkleProof?, clock?)` | Returns UI-ready booleans and amounts for deposit, withdraw, refund, and claim actions. |
## Instance Transaction APIs
| API | Use |
| - | - |
| `deposit(maxAmount, owner, merkleProof?)` | Builds a deposit transaction. Creates permissionless or Merkle-proof escrow first when needed. |
| `withdraw(amount, owner)` | Builds a Pro Rata withdraw transaction. |
| `withdrawRemainingQuote(owner)` | Builds a post-buy remaining quote withdrawal transaction. |
| `claimToken(owner)` | Builds a vested base token claim transaction. |
| `closeEscrow(owner)` | Builds an escrow close transaction. |
| `fillVault(payer)` | Builds the correct DLMM, Dynamic AMM, or DAMM v2 fill transaction, or returns `null` when no fill should be sent. |
| `createStakeEscrowByAuthority(maxAmount, owner, vaultAuthority)` | Builds one authority-created escrow transaction. |
| `createMultipleStakeEscrowByAuthorityInstructions(walletDepositCap, vaultAuthority)` | Builds multiple authority-created escrow instructions. |
| `createMerkleRootConfig(root, version, vaultCreator)` | Builds a Merkle root config creation transaction. |
| `createMerkleProofMetadata(vaultCreator, proofUrl)` | Builds a Merkle proof metadata creation transaction. |
| `closeMerkleProofMetadata(vaultCreator)` | Builds a Merkle proof metadata close transaction. |
| `getMerkleProofUrl()` | Reads on-chain proof metadata or falls back to the SDK default proof API. |
| `getMerkleProofForDeposit(owner)` | Fetches proof data from `{baseUrl}/{vault}/{owner}` and returns `DepositWithProofParams` or `null`. |
## PDA Helpers
| Helper | Seeds | Returns |
| - | - | - |
| `deriveAlphaVault(base, pool, programId)` | `vault`, base, pool | `[PublicKey, bump]` |
| `deriveEscrow(alphaVault, owner, programId)` | `escrow`, vault, owner | `[PublicKey, bump]` |
| `deriveMerkleRootConfig(alphaVault, version, programId)` | `merkle_root`, vault, version | `[PublicKey, bump]` |
| `deriveMerkleProofMetadata(alphaVault, programId)` | `merkle_proof_metadata`, vault | `[PublicKey, bump]` |
| `deriveCrankFeeWhitelist(cranker, programId)` | `crank_fee_whitelist`, cranker | `[PublicKey, bump]` |
## Transaction Helpers
| Helper | Use |
| - | - |
| `getOrCreateATAInstruction(connection, tokenMint, owner, payer, tokenProgram, allowOwnerOffCurve?)` | Returns an ATA and an optional create instruction. |
| `wrapSOLInstruction(from, to, amount)` | Builds native SOL wrap instructions for the owner's WSOL ATA. |
| `unwrapSOLInstruction(owner)` | Builds a close-account instruction for the owner's WSOL ATA. |
| `fillDlmmTransaction(program, vaultKey, vault, payer, opt?)` | Builds a DLMM fill transaction with bin arrays and transfer-hook remaining accounts. |
| `fillDammTransaction(program, vaultKey, vault, payer, opt?)` | Builds a Dynamic AMM / DAMM v1 fill transaction. |
| `fillDammV2Transaction(program, vaultKey, vault, payer)` | Builds a DAMM v2 fill transaction. |
| `estimateSlotDate(enableSlot, slotAverageTime, currentSlot)` | Estimates a wall-clock date for a future slot. |
## Merkle Helpers
| Export | Use |
| - | - |
| `BalanceTree` | Builds Merkle roots and proofs for wallet `maxCap` entries. |
| `BalanceTree.toNode(account, maxCap)` | Builds the leaf used by the program: wallet address plus `maxCap`, hashed with the leaf prefix. |
| `BalanceTree.verifyProof(account, maxCap, proof, root)` | Verifies a local proof against a root. |
| `MerkleTree` | Lower-level sorted, de-duplicated Merkle tree helper. |
## Constants
| Export | Value or use |
| - | - |
| `PROGRAM_ID` | Cluster map for mainnet, devnet, and localhost Alpha Vault program IDs. |
| `SEED` | Seed strings for `vault`, `escrow`, `merkle_root`, `crank_fee_whitelist`, and `merkle_proof_metadata`. |
| `ALPHA_VAULT_TREASURY_ID` | Treasury account used for escrow fees and crank fees. |
| `VAULT_PROGRAM_ID` | Dynamic Vault program used by Dynamic AMM fill helpers. |
| `DYNAMIC_AMM_PROGRAM_ID` | Dynamic AMM / DAMM v1 program ID used by fill helpers. |
| `DLMM_PROGRAM_ID` | DLMM program ID used by fill helpers. |
| `MERKLE_PROOF_API` | Default devnet and mainnet proof URL base used when on-chain metadata is absent. |
## Enums And Types
| Export | Values or fields |
| - | - |
| `WhitelistMode` | `Permissionless`, `PermissionWithMerkleProof`, `PermissionWithAuthority`. |
| `VaultMode` | `PRORATA`, `FCFS`. |
| `PoolType` | `DLMM`, `DAMM`, `DAMMV2`. `DAMM` maps to Dynamic AMM / DAMM v1. |
| `ActivationType` | `SLOT`, `TIMESTAMP`. |
| `VaultState` | `PREPARING`, `DEPOSITING`, `PURCHASING`, `LOCKING`, `VESTING`, `ENDED`. |
| `VaultParam` | `quoteMint`, `baseMint`, `poolAddress`, `poolType`, `vaultMode`, `config`. |
| `CustomizableProrataVaultParams` | Direct Pro Rata vault creation fields, including absolute deposit and vesting points. |
| `CustomizableFcfsVaultParams` | Direct FCFS vault creation fields, including absolute deposit and vesting points. |
| `DepositWithProofParams` | `merkleRootConfig`, `maxCap`, `proof`. |
| `InteractionState` | Claim, deposit, quota, whitelist, withdrawal, and refund booleans and amounts. |
| `Vault`, `Escrow`, `FCFSConfig`, `ProrataConfig` | Generated account types from the IDL. |
# DAMM v1 Data API Overview
Source: https://docs.meteora.ag/developer-guides/damm-v1/api-reference/overview
Learn how the DAMM v1 Data API exposes indexed pools, pool metrics, pool configs, fee configs, alpha vaults, and farm-backed pool data.
<Tip>
**All DAMM v1 APIs have a rate limit of 10 requests per second (10 RPS).** Explore the production spec at the [Prod Swagger UI](https://damm-api.meteora.ag/swagger-ui/).
</Tip>
## Base URLs
| Environment | Base URL | Swagger UI |
| - | - | - |
| Production | `https://damm-api.meteora.ag` | [Open](https://damm-api.meteora.ag/swagger-ui/) |
| Devnet | `https://damm-api.devnet.meteora.ag` | Use the checked-in OpenAPI server dropdown when available. |
The checked-in OpenAPI file is refreshed from the production Swagger source at `https://damm-api.meteora.ag/api-docs/openapi.json` and includes both production and devnet servers for docs usage.
## Pools
<CardGroup>
<Card title="Pools" icon="file-code" href="/api-reference/damm-v1/pools/pools">
Returns indexed DAMM v1 pools using `GET` `/pools`
</Card>
<Card title="Pool Search" icon="file-code" href="/api-reference/damm-v1/pools/pool-search">
Returns paginated pool search results with filters using `GET` `/pools/search`
</Card>
<Card title="Pool Metrics" icon="file-code" href="/api-reference/damm-v1/pools/pool-metrics">
Returns aggregate DAMM v1 pool metrics using `GET` `/pools-metrics`
</Card>
<Card title="Pool Configs" icon="file-code" href="/api-reference/damm-v1/pools/pool-configs">
Returns published pool config accounts using `GET` `/pool-configs`
</Card>
<Card title="Pools With Farms" icon="file-code" href="/api-reference/damm-v1/pools/pools-with-farms">
Returns DAMM v1 pools with farms using `GET` `/farms`
</Card>
<Card title="Pools By A Vault LP" icon="file-code" href="/api-reference/damm-v1/pools/pools-by-a-vault-lp">
Returns pools by token A vault LP address using `POST` `/pools_by_a_vault_lp`
</Card>
</CardGroup>
## Alpha Vault
<CardGroup>
<Card title="Alpha Vaults" icon="file-code" href="/api-reference/damm-v1/alpha-vault/alpha-vaults">
Returns DAMM v1 alpha vaults using `GET` `/alpha-vault`
</Card>
<Card title="Alpha Vault Configs" icon="file-code" href="/api-reference/damm-v1/alpha-vault/alpha-vault-configs">
Returns alpha vault configs using `GET` `/alpha-vault-configs`
</Card>
</CardGroup>
## Fee Configs
<CardGroup>
<Card title="Fee Configs" icon="file-code" href="/api-reference/damm-v1/fee-configs/fee-configs">
Returns fee configs associated with a config address using `GET` `/fee-config/{config_address}`
</Card>
</CardGroup>
## Query Parameters
| Endpoint | Parameters |
| - | - |
| `GET /pools` | `address`, `unknown`, `pool_type`, `is_monitoring`, `hide_low_tvl`, `hide_low_apr`, `launchpad`. |
| `GET /pools/search` | `page`, `size`, `filter`, `sort_key`, `order_by`, `pools_to_top`, `unknown`, `pool_type`, `is_monitoring`, `hide_low_tvl`, `hide_low_apr`, `include_token_mints`, `include_pool_token_pairs`, `launchpad`. |
| `GET /alpha-vault` | `vault_address`, `pool_address`, `base_mint`. |
| `GET /fee-config/{config_address}` | `config_address` path parameter. |
| `POST /pools_by_a_vault_lp` | JSON body with `address` array. |
`pool_type` supports `dynamic`, `multitoken`, `lst`, and `farms`. `sort_key` for pool search supports `tvl`, `volume`, `fee_tvl_ratio`, and `l_m`; `order_by` supports `asc` and `desc`.
## When To Use The API
| Use the Data API for | Read on-chain accounts for |
| - | - |
| Pool discovery, filtering, and search. | Transaction construction and slippage-sensitive quotes. |
| Aggregate metrics, TVL, volume, APY, and farm metadata. | Current pool, Dynamic Vault, lock escrow, and protocol fee balances. |
| Config and alpha-vault discovery. | CPI account validation and exact pool state reconciliation. |
For swaps, deposits, withdrawals, and lock claims, quote from fresh on-chain pool and Dynamic Vault accounts before building transactions.
# DAMM v1 Changelog
Source: https://docs.meteora.ag/developer-guides/damm-v1/changelog
Track DAMM v1 release notes, compatibility changes, and upgrade guidance for the dynamic AMM program, TypeScript SDK, Rust helpers, and API integrations.
<Tip>
Track DAMM v1 releases here.
</Tip>
<Update label="meteora-dynamic-amm 0.5.3" description="Zap Protocol Fee Support">
<Info>
Mainnet deployment for Release 0.5.3 is planned for February 10, 2026, at 11:00 AM UTC+8 (Tuesday).
</Info>
## Release summary
| Component | Version | PR |
| - | - | - |
| TypeScript SDK | N/A | No update required for SDK |
## What We Shipped
* Zap Protocol Fee Support
## Program: `meteora-dynamic-amm` `0.5.3`
Program ID (mainnet and devnet): `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB`
### Changed
* Upgrade to anchor 0.31.1
* Add new endpoint `create_operator_account` and `close_operator_account` that allows admin to manage different operator accounts
* Add new account `Operator`, that would stores `whitelisted_address` as well as their operational permissions
* Add new endpoint `zap_protocol_fee` that allow operator to claim protocol fees and zap out to SOL/USDC or other token in pool and send to treasury address
### Breaking Changes
* `withdraw_protocol_fees` can only be performed by an operator. The endpoint now requires `max_amount_a` and `max_amount_b` as arguments. The accounts passed in have also been changed.
### Fixed
* Fixed initialization of stable swap error with `AmountNotPeg` due to the precision loss of the underlying vault exchange rate.
</Update>
# DAMM v1 Developer Guide
Source: https://docs.meteora.ag/developer-guides/damm-v1/index
Learn how to build DAMM v1 integrations with the dynamic AMM program, TypeScript SDK, Rust quote helpers, CPI patterns, Data API, and release notes.
DAMM v1 is Meteora's legacy dynamic AMM on Solana. It supports constant-product pools, stable pools, LST/depeg pools, Dynamic Vault yield routing, launch-pool activation, LP locks, and farm integrations. To learn the product model before integrating, read the DAMM v1 product docs.
<CardGroup>
<Card title="Learn more about DAMM v1" icon="book-open" href="/legacy-products/damm-v1/what-is-damm-v1">
Overview of DAMM v1 pool types, vault yield, locks, farms, fees, and legacy integration limits.
</Card>
<Card title="DAMM v1 Formulas" icon="calculator" href="/legacy-products/damm-v1/damm-v1-formulas">
Formulas for pool reserves, virtual price, LP share, swaps, deposits, withdrawals, fees, and vault accounting.
</Card>
</CardGroup>
## Integration
<CardGroup>
<Card title="Program Accounts" icon="table-cells" href="/developer-guides/damm-v1/program/accounts">
Account model for pools, configs, locks, operators, vault relationships, PDA seeds, constants, and enums.
</Card>
<Card title="Program Instructions" icon="list" href="/developer-guides/damm-v1/program/instructions">
Instruction families for pool creation, swaps, liquidity, locks, configs, fees, activation, and operator flows.
</Card>
<Card title="Program Events" icon="list" href="/developer-guides/damm-v1/program/events">
Anchor events for pool creation, liquidity, swaps, configs, locks, fees, activation, and admin flows.
</Card>
<Card title="Program Errors" icon="triangle-exclamation" href="/developer-guides/damm-v1/program/errors">
Anchor custom error codes, messages, and common integration causes for DAMM v1 transactions.
</Card>
<Card title="TypeScript SDK" icon="code" href="/developer-guides/damm-v1/typescript-sdk/getting-started">
Official SDK for pool reads, quotes, swaps, deposits, withdrawals, pool creation, configs, and LP locks.
</Card>
<Card title="Rust Integration" icon="terminal" href="/developer-guides/damm-v1/rust-integration/library">
Rust quote helpers, PDA helpers, account builders, CLI examples, and CPI planning notes.
</Card>
</CardGroup>
<CardGroup>
<Card title="DAMM v1 APIs" icon="database" href="/developer-guides/damm-v1/api-reference/overview">
Indexed read-only pool discovery, pool metrics, pool configs, fee configs, alpha vaults, and farm-backed pool data.
</Card>
</CardGroup>
## Program IDs
The `amm` program ID is the same on mainnet and devnet:
| Network | Program ID |
| - | - |
| Mainnet Beta | `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB` |
| Devnet | `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB` |
DAMM v1 pools route token inventory through Dynamic Vault:
| Program | ID |
| - | - |
| Dynamic Vault | `24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi` |
| Farming | `FarmuwXPWXvefWUeqFAa5w6rifLkq5X6E8bimYvrhCB1` |
<CardGroup>
<Card title="DAMM v1 SDK" icon="node-js" href="https://github.com/MeteoraAg/damm-v1-sdk">
Public TypeScript SDK, Rust quote crate, Rust common helpers, CLI, and examples.
</Card>
<Card title="DAMM v1 IDL" icon="file-code" href="https://github.com/MeteoraAg/damm-v1-sdk/blob/main/ts-client/src/amm/idl.ts">
Bundled Anchor IDL used by the TypeScript SDK.
</Card>
<Card title="Pool Fee Configs" icon="gear" href="/developer-guides/damm-v1/pool-fee-configs">
Published config keys used by config-based DAMM v1 launch pools.
</Card>
</CardGroup>
<Note>
DAMM v1 is a legacy product. For new AMM launches, compare your requirements with DAMM v2 and DBC before choosing DAMM v1.
</Note>
## Commands
| Task | Command |
| - | - |
| Build TypeScript SDK | `cd damm-v1-sdk/ts-client && pnpm install && pnpm run build` |
| Run TypeScript SDK tests | `cd damm-v1-sdk/ts-client && pnpm test` |
| Run Rust quote tests | `cd damm-v1-sdk && cargo t -p dynamic-amm-quote test_quote` |
| Build Rust CLI | `cd damm-v1-sdk && cargo build -p cli` |
| Build AMM program | `cd meteora-dynamic-amm && anchor build -p amm` |
| Run AMM program tests | `cd meteora-dynamic-amm && cargo test -p amm` |
Some SDK and program tests depend on local validator fixtures, deployed vault programs, or account snapshots. For production integrations, simulate transactions and test on devnet before submitting mainnet transactions.
## Stay Updated
<CardGroup>
<Card title="DAMM v1 Changelog" icon="newspaper" href="/developer-guides/damm-v1/changelog">
Program, SDK, quote, API, lock, and compatibility changes for integration planning.
</Card>
</CardGroup>
# DAMM v1 Pool Fee Configs
Source: https://docs.meteora.ag/developer-guides/damm-v1/pool-fee-configs
Explore DAMM v1 pool fee configs, including config-derived pool addresses, public and private config behavior, activation fields, and published mainnet/devnet config keys.
<Note>
DAMM v1 pool addresses are derived differently depending on the pool type. Only some pools require a config key; others use token mints and curve information.
* **Permissionless pools w/o config**: `curveType` + `tokenAMint` + `tokenBMint`
* **Permissionless pools w/ config**: `tokenAMint` + `tokenBMint` + `config`
* **Permissioned pools**: Use arbitrary addresses (not PDAs)
* **Customizable pools**: `"pool"` + `tokenAMint` + `tokenBMint`
</Note>
Configs define the fee parameters, activation behavior, optional alpha-vault configuration, and optional creator authority for config-based DAMM v1 pools.
If `pool_creator_authority` is `11111111111111111111111111111111`, the config is public and any signer can use it to create a DAMM v1 pool.
<Note>If you would like a private config, such that the `pool_creator_authority` is your specific public address, you can reach out to the team on [discord](https://discord.gg/meteora) to create a private config.</Note>
<AccordionGroup>
<Accordion title="List of config keys (Mainnet)">
```json theme={"system"}
[
{
config_address: "FiENCCbPi3rFh5pW2AJ59HC53yM32eLaCjMKxRqanKFJ",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 0,
vault_config_key: "11111111111111111111111111111111",
pool_creator_authority: "11111111111111111111111111111111",
activation_type: 0,
},
{
config_address: "7cADCeqcUsNvYdGFGcPbvghFUwcELovYmHNSauhu2PSh",
trade_fee_bps: 9900,
protocol_fee_bps: 2000,
activation_duration: 2678400,
vault_config_key: "11111111111111111111111111111111",
pool_creator_authority: "24bvHXAxxVT2HxuoBptyG9guhE4vUKUTzFWPVBmHRCzw",
activation_type: 1,
},
{
config_address: "8aPHoLN8ke6PhWeYA7ELi19fppptVYUCQvqKWR5yP1sn",
trade_fee_bps: 150,
protocol_fee_bps: 2000,
activation_duration: 1512000,
vault_config_key: "7ixojP8Zuu4csfTycHi8ywQymHm9zxAhu1TjnFuJaq2R",
pool_creator_authority: "5unTfT2kssBuNvHPY6LbJfJpLqEcdMxGYLWHwShaeTLi",
activation_type: 0,
},
{
config_address: "6GEE5m3fYnYD9TgwmPAoeNr3mNaDAhwYjUg2tgmttJYa",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 2592000,
vault_config_key: "G9xwsDRa3KUW3JJr9Z38szTVschFCbrCq8NySVXxRGL1",
pool_creator_authority: "anovRrVgxBMyFBZkfcQqVi1AaaJTZEmJ2hVY5V3yCdu",
activation_type: 0,
},
{
config_address: "8NWep2us5HrSPXvf2VGJSHJG9pVr1J3UehVBhE2q9mHU",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 1512000,
vault_config_key: "HHVfAboWxsCsWtdHbyL3BNCvxfAdAcV3QPe8s8NtZxRX",
pool_creator_authority: "ChSAh3XXTxpp5n2EmgSCm6vVvVPoD1L9VrK3mcQkYz7m",
activation_type: 0,
},
{
config_address: "DHuQ3sg5WactGD27KFPebFMUj8B8RZt8KG9NNoCchaKD",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 1512000,
vault_config_key: "DEpRg7voUQcKZapijVKiGPJN2iTGxjQswDoooanrmSHT",
pool_creator_authority: "5unTfT2kssBuNvHPY6LbJfJpLqEcdMxGYLWHwShaeTLi",
activation_type: 0,
},
{
config_address: "3Uc2fi7sKEDP1aKUYqc2xGvyD5uNcfoLyMDXa1tBamNt",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 1512000,
vault_config_key: "DEpRg7voUQcKZapijVKiGPJN2iTGxjQswDoooanrmSHT",
pool_creator_authority: "5unTfT2kssBuNvHPY6LbJfJpLqEcdMxGYLWHwShaeTLi",
activation_type: 0,
},
{
config_address: "38cy1kpruGc3Xbni4fUF2W1dyh4EbJ4LzccdpnPZxhJk",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 0,
vault_config_key: "11111111111111111111111111111111",
pool_creator_authority: "FXBXnxEEfwZJA1xnyJzKEhhJXmussKXKRdq5cAh19dbC",
activation_type: 0,
},
{
config_address: "485RajDpU3b39KsQBn4cjnHbkvuodyK6XPpyeTAHnsRC",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 604800,
vault_config_key: "E8WUpiScTWhsdgMaBBGJ8rdUoQuq9P6c7PBcWtrzm6U6",
pool_creator_authority: "11111111111111111111111111111111",
activation_type: 1,
},
{
config_address: "4v3NV94mEL4Y3DMVHziPxUe78gmvp74Ez6dLXNQQBwa5",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 604800,
vault_config_key: "11111111111111111111111111111111",
pool_creator_authority: "11111111111111111111111111111111",
activation_type: 1,
},
{
config_address: "3ewpimT1McmuHM7CZkehEi3ZHVYg1QiASVxR91GK7Z1L",
trade_fee_bps: 1500,
protocol_fee_bps: 2000,
activation_duration: 604800,
vault_config_프로젝트로 돌아가기