Skip to main content
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:
  1. By Symbol:
  1. 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

  1. Token Resolution
    • Tokens can be specified by symbol or address
    • Symbols are automatically resolved to addresses
    • Case-insensitive symbol matching
  2. 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
  3. Chain Support
    • Solana <-> EVM cross-chain swaps
    • Multiple EVM chains supported
    • Automatic chain ID resolution
  4. Transaction Confirmation
    • Solana transactions wait for confirmation
    • EVM transactions return hash immediately
    • Explorer URL provided for tracking

Best Practices

  1. Token Addresses
  2. Error Recovery
  3. Slippage Management

Technical Details

Constants

Configuration

API Endpoints