Setup
Import the required dependencies:Adding an Adaptor
1. Define Required Variables
2. Create Add Adaptor Instruction
3. Send and Confirm
Initializing Strategies
1. Derive Strategy Address
2. Create Strategy Initialization Instruction
3. Send and Confirm
Required Account Structure
The strategy initialization requires several key accounts:- Core Accounts:
payer,vault,manager,strategy,protocolProgram - Protocol-Specific Accounts: Protocol program account, required protocol state accounts, token accounts and authorities, system accounts (RENT, etc.)
Best Practices
Strategy Selection
Strategy Selection
- Choose strategies that match your vault’s risk profile
- Understand the underlying protocol’s mechanisms
- Verify strategy program compatibility
Risk Management
Risk Management
- Start with small deposits to test strategy
- Monitor strategy performance regularly
- Have a withdrawal plan for emergencies
Security
Security
- Keep admin keys secure
- Test on devnet first
- Verify all account permissions
- Double-check program IDs
Troubleshooting
Troubleshooting
- Strategy Creation Fails: Verify admin authority, check counterparty token account exists, ensure protocol program ID is correct
- Strategy Addition Fails: Verify vault admin authority, check strategy account exists, ensure adaptor program matches
- Strategy Removal Fails: Verify strategy has zero balance, check admin authority, ensure all funds are withdrawn