Skip to main content
The vault program exposes user liquidity instructions, strategy rebalance instructions, and admin/operator instructions. Apps should normally use the TypeScript SDK for transaction construction. Programs using CPI should generate bindings from the IDL and cross-check account order against the current source.
Program 0.9.5 is live. @meteora-ag/vault-sdk@2.4.0 matches that program.

User Liquidity

deposit rejects zero amounts and rejects deposits when vault.enabled == 0. withdraw does not check enabled, so users can still exit a disabled vault.

Deposit Accounting

Withdrawal Accounting

Vault Initialization

initialize and initialize_idle_vault create version 1 vaults with total_lp_supply at 0. Deposit and withdraw on a version 1 vault add or subtract the LP they mint or burn. A version 0 vault keeps using lp_mint.supply until migrate_vault. Initialization sets admin and operator from the configured program admin, initializes the token vault and LP mint PDAs, clears all strategy slots, initializes locked profit, and enables the vault.

Strategy Management

initialize_strategy requires vault.fee_vault to be set. The handler validates the strategy bump layout and fails with InvalidBump if other_bumps[0] or other_bumps[1] do not match the expected strategy index and PDA bump.

Rebalancing And Rewards

Strategy instructions pass protocol-specific remaining accounts to the active strategy handler. The current source-backed external handler is JupLend.

Rebalance Wrapper Behavior

deposit_strategy, withdraw_strategy, remove_strategy, remove_strategy2, and withdraw_directly_from_strategy run through shared rebalance accounting.

Admin And Operator Controls

All admin and operator controls except get_unlocked_amount require a rebalance vault.

TypeScript SDK Mapping

Low-Level Gotchas