How It Works
When a vault manager allocates or deallocates funds, the vault program:- Transfers tokens to/from the
vault_strategy_authPDA - Calls your adaptor’s
depositorwithdrawinstruction via CPI - Reads the returned
u64(via Solana’sget_return_data) to track the strategy’s position value
Core Requirements
Every adaptor must implement at minimum these three instructions:
Adaptors can define additional instructions beyond these three for protocol-specific workflows — such as multi-step withdrawals (request → withdraw), reward harvesting, or rebalancing. These extra instructions are invoked by the vault manager via
remaining_accounts or separate transactions, not by the vault program itself.
Key Concept: Strategy = Your Protocol’s State
The vault passes astrategy account to your adaptor. This account maps to your protocol’s own state — a market PDA, a reserve, a lending pool, etc. Your adaptor validates this mapping:
Accounts Passed by the Vault
The vault program always passes these accounts in a fixed order when calling your adaptor: Initialize:payer, vault_strategy_auth (signer), strategy, system_program, + remaining accounts
Deposit / Withdraw: vault_strategy_auth (signer), strategy, vault_asset_mint, vault_strategy_asset_ata, asset_token_program, + remaining accounts
Any additional protocol-specific accounts are appended via remaining_accounts.
Getting Started
Core Components
Required instructions and account structures
Security Considerations
Security best practices for adaptor development