Skip to main content
This guide covers Cross-Program Invocation (CPI) integration with the Voltr Vault program. If your protocol needs to deposit into or withdraw from Voltr vaults on-chain, use these CPI instructions.
When to use CPI vs. the TypeScript SDK: CPI is for on-chain programs that need to interact with Voltr vaults programmatically (e.g., a router or aggregator). If you are building off-chain automation or a frontend, use the TypeScript SDK instead.
Building with a coding agent? The Voltr Agent Skill ships a cpi-integration.md reference with verified discriminators and drop-in Rust CPI wrappers for all five vault instructions in examples/cpi/.

How It Works

Users deposit assets into a vault and receive LP tokens representing their share. Withdrawals follow a two-step process to ensure vault stability and manage liquidity:
  1. Request withdrawal — locks LP tokens into an escrow receipt
  2. Claim withdrawal — after the vault’s waiting period, burns the locked LP tokens and returns the underlying assets
Alternatively, vaults with a zero waiting period support instant withdrawal, which combines both steps into a single transaction. Users can also cancel a pending withdrawal request to reclaim their LP tokens.

Deployed Address

CPI Instructions

PDA Derivation

All PDAs are derived from the Voltr Vault program (vVoLTRjQmtFpiYoegx285Ze4gsLJ8ZxgFKVcuvmG1a8):
Your program does not need to provide PDA signer seeds for the vault’s internal PDAs. The Voltr Vault program handles its own invoke_signed calls internally. You only need to pass the correct PDA addresses in the account list.

Error Handling

Your program should handle the following errors from the Voltr Vault program:

Reference Repository

Full reference implementations are available at github.com/voltrxyz/vault-cpi.