Skip to main content
Track Dynamic Vault releases here.
Tracked vault LP supply
Program 0.9.5 is live on mainnet. Use @meteora-ag/vault-sdk@2.4.0 or later.

Release summary

What We Shipped

  • Version 1 vaults price LP shares with vault.total_lp_supply
  • Permissionless migrate_vault moves a version 0 vault to version 1
  • withdraw and withdraw_directly_from_strategy require the LP account owner to sign

What To Do

IntegratorsWhat ChangedWhat To Do
Deposit and withdraw apps
  • withdraw and withdraw_directly_from_strategy require user_lp.owner == user before burning LP.
  • Version 1 vaults price LP shares with vault.total_lp_supply.
  • Have the LP token account owner sign withdraw and withdraw_directly_from_strategy.
  • Upgrade to @meteora-ag/vault-sdk@2.4.0.
Quote and virtual price
  • Version 1 vaults use total_lp_supply in deposit, withdraw, withdraw_directly_from_strategy, and the performance fee calculation.
  • Version 0 vaults keep using lp_mint.supply.
  • Use getVaultLpSupply or getVaultSupply in TypeScript, or Vault::get_lp_supply in Rust.
  • Use total_lp_supply when version == 1, and lp_mint.supply otherwise.
Account decoders
  • Vault.strategies now has 29 entries. version, total_lp_supply, and _padding0 occupy the former 30th strategy slot.
  • migrate_vault is permissionless, runs once per vault, and starts total_lp_supply at the current lp_mint.supply.
  • Update the IDL to program 0.9.5 before migrate_vault runs. The instruction is migrateVault in the SDK IDL.
  • New vaults are created as version 1.

Program: mercurial-vault 0.9.5

Program ID (mainnet and devnet): 24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi

Fixed

  • Fixed withdraw and withdraw_directly_from_strategy letting anyone redeem vault LP held in a token account owned by the System Program or the incinerator. SPL Token skips the owner check when burning from such accounts, so the vault now requires user_lp.owner == user before burning LP.
  • Fixed LP share pricing being manipulable by burning LP outside the vault. LP held by the System Program or the incinerator can be burned by anyone, which lowered lp_mint.supply and inflated the value of the remaining LP. Version 1 vaults price LP shares with their own tracked supply, vault.total_lp_supply, which only changes when the vault mints or burns LP.

Added

  • New endpoint migrate_vault (permissionless) that moves a version 0 vault to version 1 and starts total_lp_supply at the current lp_mint.supply. It can only run once per vault.
  • New Vault fields version, total_lp_supply and _padding0.
  • New event VaultMigrated.
  • New errors InvalidLpOwner, InvalidLpSupplyAccounting and VaultAlreadyMigrated.

Changed

  • MAX_STRATEGY reduced from 30 to 29. The 32 bytes of the former 30th strategy slot, unused by every vault, now hold version, total_lp_supply and _padding0. The account size and the offsets of all other fields are unchanged.
  • Version 1 vaults use total_lp_supply in deposit, withdraw, withdraw_directly_from_strategy and the performance fee calculation, and update it whenever LP is minted or burned. Version 0 vaults keep using lp_mint.supply.
  • New vaults are created as version 1.

Breaking Changes

  • withdraw and withdraw_directly_from_strategy no longer accept an LP account that user only controls as a delegate; the LP account owner must sign as user.
  • Vault.strategies now has 29 entries. Clients decoding the vault with the old IDL see the former 30th slot as a non-default pubkey once the vault is migrated, and must update the IDL before migrate_vault runs.
  • Integrations that compute the underlying amount of vault LP must use total_lp_supply when version == 1, and lp_mint.supply otherwise.

TypeScript SDK: @meteora-ag/vault-sdk 2.4.0

Added

  • getVaultLpSupply to get the LP supply a vault prices shares with
  • initializeIdleVault and migrateVault in the IDL

Changed

  • Sync IDL with vault program 0.9.5: Vault has 29 strategies followed by version, totalLpSupply and padding0, new VaultMigrated event and errors up to VaultAlreadyMigrated (6024)
  • getVaultSupply refetches the vault and returns totalLpSupply for version 1 vaults
  • Version 1 vaults price shares with totalLpSupply, not the LP mint supply. Reading lpMint.supply directly gives wrong share and amount calculations, use getVaultLpSupply / getVaultSupply in TS or Vault::get_lp_supply in Rust
  • deposit no longer refetches the vault, it only uses the vault’s LP mint and token mint
  • refreshVaultState also refreshes tokenLpMint
  • Rust Vault state uses the 0.9.5 layout and adds get_lp_supply, VaultError matches the program

Removed

  • collectDust and withdraw2 from the IDL, the program no longer has them

Fixed

  • Strategies of type Kamino and JupLend decode, the IDL StrategyType was missing both and the Rust StrategyType was missing JupLend
  • StrategyType type matches the strategy names Anchor decodes: adds kamino and jupLend, renames apricotWithoutLM to apricotWithoutLm, removes cypher and psylend
Anchor 0.31.1 and Jupiter Lend

Release summary

What We Shipped

  • Anchor 0.31.1
  • Jupiter Lend

Program: mercurial-vault 0.9.4

Program ID (mainnet and devnet): 24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTiProgram PR #297

Changed

  • Upgrade to anchor 0.31.1

Added

  • Jupiter lend

Removed

  • Removed marginfi
  • Removed kamino
  • Removed solend

Fixed

  • Use of +1 as rounding for from_liquidity_to_collateral
Initial deposit overflow fix

Release summary

What We Shipped

  • Overflow fix for a large initial deposit

Program: mercurial-vault 0.9.3

Program ID (mainnet and devnet): 24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTiProgram PR #290

Fixed

  • Fix overflow issue when initial deposit amount is too big
Audit fixes and removed endpoints

Release summary

What We Shipped

  • Offsite audit fixes
  • Removed collect_dust and withdraw2

Program: mercurial-vault 0.9.2

Program ID (mainnet and devnet): 24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTiProgram PR #289

Fixed

  • Fix some audit reports from Offsite

Breaking Changes

  • Remove collect_dust endpoint
  • Remove withdraw2 endpoint
Removed token registry dependency

Release summary

What We Shipped

  • Removed @solana/spl-token-registry

TypeScript SDK: @meteora-ag/vault-sdk 2.3.1

SDK PR #135

Changed

  • remove @solana/spl-token-registry deps
Moved package ownership to Meteora

Release summary

What We Shipped

  • Package moved to the meteora-ag organization

TypeScript SDK: @meteora-ag/vault-sdk 2.3.0

SDK PR #134

Changed

  • move to meteora-ag org
deserializeMint utility

Release summary

What We Shipped

  • deserializeMint

TypeScript SDK: @mercurial-finance/vault-sdk 2.2.1

SDK PR #131

Added

  • new utils deserializeMint
Mint field fixes

Release summary

What We Shipped

  • Fixed tokenMint and tokenLpMint
  • Removed lpMintPda

TypeScript SDK: @mercurial-finance/vault-sdk 2.2.0

SDK PR #130

Fixed

  • fix tokenMint & tokenLpMint

Removed

  • remove lpMintPda field
Batch vault loading

Release summary

What We Shipped

  • Fewer RPC calls in createMultiple and createMultiplePda

TypeScript SDK: @mercurial-finance/vault-sdk 2.1.1

SDK PR #129

Changed

  • update createMultiple & createMultiplePda to optimize rpc call
createMultiple parameters

Release summary

What We Shipped

  • createMultiple takes fewer parameters

TypeScript SDK: @mercurial-finance/vault-sdk 2.1.0

SDK PR #128

Fixed

  • fix createMultiple to take in less param
refreshVaultState fix

Release summary

What We Shipped

  • refreshVaultState works again

TypeScript SDK: @mercurial-finance/vault-sdk 2.0.1

SDK PR #126

Fixed

  • fix refreshVaultState not working
spl-token 0.4.6 and withdrawal change

Release summary

What We Shipped

  • @solana/spl-token 0.4.6
  • Removed direct strategy withdrawal logic

TypeScript SDK: @mercurial-finance/vault-sdk 2.0.0

SDK PR #124

Changed

  • Pump “@solana/spl-token” to 0.4.6 and various relevant packages

Removed

  • Remove logic to withdraw directly from strategy