Defi Integrations
Mayan Cross chain Swap
Learn how to perform cross-chain token swaps using Mayan Finance
Solana Agent Kit provides integration with Mayan Finance for cross-chain token swaps. The integration supports swapping tokens between different blockchain networks, including Solana and EVM-based chains.
Key Features
- Cross-chain token swaps
- Support for multiple chains (Solana, Ethereum, etc.)
- Token symbol and address support
- Automatic quote fetching
- Configurable slippage
- ERC20 Permit support
- Jito MEV protection for Solana
- LangChain tool integration
Basic Usage
Performing a Cross-Chain Swap
Input Parameters
Swap Parameters
Token Input Formats
Tokens can be specified in multiple formats:
- By Symbol:
- By Address:
LangChain Integration
Solana Agent Kit provides a LangChain tool for cross-chain swaps:
Cross-Chain Swap Tool
Example Prompts
For LangChain AI tools, here are example prompts:
Cross-Chain Swaps
Advanced Features
ERC20 Permit Support
The integration automatically handles ERC20 permits for supported tokens:
Jito MEV Protection
For Solana transactions, Jito MEV protection is automatically applied:
Error Handling
Important Notes
-
Token Resolution
- Tokens can be specified by symbol or address
- Symbols are automatically resolved to addresses
- Case-insensitive symbol matching
-
Slippage Protection
- Default “auto” slippage for optimal execution
- Can be specified in basis points (e.g., 10 = 0.1%)
- Recommended to use higher slippage for volatile tokens
-
Chain Support
- Solana <-> EVM cross-chain swaps
- Multiple EVM chains supported
- Automatic chain ID resolution
-
Transaction Confirmation
- Solana transactions wait for confirmation
- EVM transactions return hash immediately
- Explorer URL provided for tracking
Best Practices
-
Token Addresses
-
Error Recovery
-
Slippage Management
Technical Details
Constants
Configuration
API Endpoints
Was this page helpful?