Defi Integrations
Voltr Vault Integration
Learn how to interact with Voltr vaults for deposits, withdrawals, and position management
Solana Agent Kit provides comprehensive integration with Voltr vaults for managing deposits, withdrawals, and viewing position values. The integration supports both Token Program and Token-2022 assets.
Key Features
- Strategy deposits
- Strategy withdrawals
- Position value tracking
- Token-2022 support
- Remaining accounts handling
- LangChain tool integration
Basic Usage
Getting Position Values
Depositing into a Strategy
Withdrawing from a Strategy
Input Parameters
Strategy Operation Parameters
Remaining Accounts Structure
LangChain Integration
Solana Agent Kit provides several LangChain tools for Voltr operations:
Get Position Values Tool
Deposit Strategy Tool
Withdraw Strategy Tool
Example Prompts
For LangChain AI tools, here are example prompts:
Position Management
Important Notes
-
Token Programs
- Supports both Token Program and Token-2022
- Automatically detects token program type
- Validates program compatibility
-
Amount Handling
- All amounts must be in base units (lamports)
- Use BN.js for precise number handling
- Consider token decimals when calculating amounts
-
Remaining Accounts
- Fetched automatically from Voltr API
- Required for strategy operations
- Includes instruction discriminators
Best Practices
-
Error Handling
-
Amount Calculation
-
Transaction Monitoring
Technical Details
Constants
Voltr Client Configuration
API Endpoints
Transaction Options
Implementation Examples
-
Full Deposit Flow
-
Position Value Check
-
Withdrawal with Amount Validation
Was this page helpful?