Defi Integrations
Fluxbeam
title: ‘FluxBeam Integration’ description: ‘Learn how to create and manage liquidity pools with FluxBeam’
Solana Agent Kit provides integration with FluxBeam for creating and managing liquidity pools. The integration supports creating new pools with any pair of tokens, including native SOL and SPL tokens.
Key Features
- Create new liquidity pools
- Support for native SOL and SPL tokens
- Automatic decimal handling
- LangChain tool integration
- Built-in slippage protection
Basic Usage
Creating a New Pool
Input Parameters
Pool Creation Parameters
LangChain Integration
Solana Agent Kit provides a LangChain tool for pool creation:
Create Pool Tool
Example Prompts
For LangChain AI tools, here are example prompts:
Creating Pools
Error Handling
API Details
FluxBeam API
- Base URL:
FLUXBEAM_BASE_URI
- Endpoint:
/token_pools
- Method: POST
- Required fields: payer, token_a, token_b, token_a_amount, token_b_amount
Best Practices
-
Token Amount Handling
- Input amounts in human-readable format (e.g., 1.5 SOL, not 1500000000 lamports)
- The integration automatically handles decimal conversion
- Always verify token decimals before submission
-
Token Address Validation
- Use PublicKey class for token addresses
- Verify token existence before pool creation
- Handle native SOL cases appropriately
-
Transaction Signing
- Transactions are automatically signed by the agent
- Uses VersionedTransaction for compatibility
- Includes retry logic for better reliability
-
Error Recovery
- Implement proper error handling
- Check for sufficient balances
- Verify token approvals
Implementation Notes
-
Decimal Handling
-
Native SOL Support
-
Transaction Processing
Common Use Cases
-
Creating a SOL/USDC Pool
-
Creating a Custom Token Pool
Technical Details
Constants
Configuration Options
Was this page helpful?