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.

Dynamic Vault is Meteora’s yield vault layer on Solana. Integrators deposit a supported token into a vault, receive vault LP tokens, and withdraw by burning LP tokens against the vault’s unlocked amount. To learn more about the product model, read the product documentation.

Learn more about Dynamic Vault

Overview of vault behavior, yield routing, access rules, and product concepts.

Dynamic Vault Formulas

Formulas for virtual price, locked profit, LP share, and withdrawal accounting.

Integration

Program Accounts

Account model for vaults, strategies, locked profit, bumps, PDA seeds, and constants.

Program Instructions

Instruction families for user deposits, withdrawals, strategy rebalancing, rewards, operators, and admin flows.

Program Events

Anchor events emitted by liquidity, strategy, reward, performance fee, loss, and simulation flows.

Program Errors

Anchor custom errors, messages, likely causes, and source/IDL naming notes.

TypeScript SDK

Official TypeScript SDK for creating vault clients, deposits, withdrawals, state reads, helpers, and affiliate flows.

Rust Integration

Rust account readers, CLI helpers, and CPI account planning for the vault program.

Dynamic Vault APIs

Indexed read-only vault, APY, virtual price, vault address, and strategy allocation data.

Program IDs

The public vault program ID is the same on mainnet and devnet:
NetworkProgram ID
Mainnet Beta24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi
Devnet24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi
The TypeScript SDK also exposes the affiliate program ID:
ProgramAddress
Affiliate vault programGacY9YuN16HNRTy7ZWwULPccwvfFSBeNLuAQP7y38Du3

Constants

ConstantValueUse
VAULT_BASE_KEY / get_base_address()HWzXGcGHy4tcpYfaRDCyLNzXqBTv3E6BttpCH2vJxArvBase key used in rebalance vault PDA seeds.
get_base_address_for_idle_vault()11111111111111111111111111111111Base key used in idle vault PDA seeds.
get_treasury_address()9kZeN47U2dubGbbzMrzzoRAUvpuxVLRcjW9XiFpYjUo4Owner required for fee vault and reward destination token accounts.
MAX_STRATEGY30Maximum strategy addresses stored on a vault.
MAX_BUMPS10Maximum bump bytes stored on a strategy.
LOCKED_PROFIT_DEGRADATION_DENOMINATOR1_000_000_000_000Denominator for locked-profit drip calculations.
Performance fee500 / 100005% performance fee minted as vault LP tokens when rebalance reports profit.

Source Repositories

Vault Program

Anchor source for the current vault program handlers, accounts, events, and errors.

Vault SDK

Public TypeScript SDK, Anchor IDL, vendored program crate, tests, and Rust client helper.

TypeScript SDK Package

Published package for transaction builders, state reads, helper functions, and affiliate support.

Rust Client

CLI-style Rust examples for showing vault state, simulating unlocked amount, deposits, and withdrawals.
The current program source in mercurial-vault/programs/vault is newer than the TypeScript SDK’s checked-in IDL in a few areas. These docs call out source-backed behavior and avoid documenting older IDL-only entries as current program handlers.

Commands

TaskCommand
Build TypeScript SDKcd vault-sdk/ts-client && pnpm install && pnpm run build
Run TypeScript SDK testscd vault-sdk/ts-client && pnpm test
Run affiliate SDK testscd vault-sdk/ts-client && pnpm run test-affiliate
Build Rust clientcd vault-sdk/rust-client && cargo build
Inspect Rust client commandscd vault-sdk/rust-client && ../target/debug/rust-client --help
Build current vault programcd mercurial-vault && NO_DNA=1 anchor build
Run current vault program testscd mercurial-vault && NO_DNA=1 anchor test

Stay Updated

Dynamic Vault Changelog

Program, SDK, IDL, Rust helper, and API notes for integration planning.