Program ID
CPI Scope
For off-chain apps, use the TypeScript SDK. For on-chain CPI, your program owns the outer validation, signer seeds, and slippage thresholds.
Deposit CPI Accounts
deposit uses DepositWithdrawLiquidity.
Arguments:
Withdraw CPI Accounts
withdraw uses the same DepositWithdrawLiquidity accounts.
Your program should calculate or validate
unmint_amount in LP units. To withdraw a target underlying amount, convert using current unlocked amount and LP supply.
Direct Strategy Withdrawal CPI
withdraw_directly_from_strategy is used when vault reserve liquidity is not enough and the transaction should pull from a strategy first.
Direct strategy withdrawal can refine the LP burn amount if the strategy cannot return the full desired amount. It rejects precision loss greater than one underlying unit.
Vault Signer Seeds
The vault signs token transfers and LP minting with:Account Planning
Rebalance CPI Notes
Strategy rebalance instructions are admin/operator flows and requirevault.admin == operator or vault.operator == operator.
Common CPI Failures
Testing
For public partner integrations, keep the CPI surface narrow: deposit, reserve withdrawal, and carefully audited direct strategy withdrawal only when your protocol truly needs it.

