Main Accounts
Program Addresses
Vault PDAs are derived from the token mint and vault base. In practice this means one rebalance vault PDA and one idle vault PDA per token mint for this program.
On non-test builds, the initializer payer can be anyone, but new vaults initialize
admin and operator to the fixed production admin address above. Rebalance vault admin can later transfer admin or set a different operator.Roles
The program’s
enabled flag gates deposits only. It does not block withdrawals.Permissioned Instructions
Strategy Limits
The
StrategyType enum still includes several legacy variants, but the handler dispatch for those variants panics as unsupported. Documentation should not describe those variants as active integrations unless the deployed program is updated.
For JupLend, the reserve mint must match the vault token mint, the collateral mint must match the lending reserve’s f-token mint, and the remaining accounts must satisfy Jupiter Lend’s deposit or withdrawal account requirements. Jupiter Lend rewards are automatically reflected in the collateral token, so the current JupLend claim_rewards handler does not transfer a separate reward token.
Token Support
Vault initialization, deposits, withdrawals, LP minting, and most token accounts useanchor_spl::token, the SPL Token program interface. The vault program does not include a general Token-2022 transfer-hook or transfer-fee handling path for user deposits and withdrawals.
Rebalance Vault vs Idle Vault
Rebalance vaults use Meteora’s configured base address and can interact with strategy instructions. Idle vaults use the default base address and are constrained out of rebalance-only instructions.Important Edge Cases
- Deposits with
token_amount = 0fail. - Deposits fail when
enabled = 0; withdrawals do not. - Slippage is enforced with
minimum_lp_token_amounton deposit andmin_out_amounton withdrawal. - Strategy initialization fails if
fee_vaultis still the default public key. - A fee vault must be owned by the treasury address and must use the vault LP mint.
- Reward claims must send rewards to a treasury-owned token account.
- Losses from strategy actions reduce locked profit before new gain is added.
- Strategy removal does not automatically claim rewards; comments in the source indicate rewards should be claimed separately when applicable.

