Library for building and executing DEX swap transactions on Solana.
Rust components are extensively documented in the following rustdoc: https://yuno-research.github.io/docs/target/doc/solana_exec/index.html
This library provides transaction building and execution utilities for multiple Solana DEX protocols. It handles swap instruction creation, token account management, compute budget configuration, and Jito bundle integration.
- Pumpfun bonding curve
- Pumpswap AMM
- Raydium Launchpad
- Raydium AMMv4
- Raydium CPMM
- Transaction Building: Assemble complete transactions from swap configurations
- Multi-hop Swaps: Support for chaining multiple swaps in a single transaction
- Token Account Management: Automatic opening/closing of token accounts
- Slippage Protection: Configurable slippage tolerance (does not account for fees/price impact to prevent execution on low-liquidity/high-fee pools)
- Jito Integration: Built-in support for Jito bundle submission
- Protocol-Specific: Handles protocol-specific instruction formats and requirements
The main entry point is create_tx_from_swap_configs, which assembles a complete transaction from a list of SwapConfig structures. The resulting transaction can be sent via Jito bundles or standard RPC.
RPC_NODE_URL: Solana JSON RPC node URLJITO_AUTH_SECRET_KEY: Jito authentication keypair (base58) for bundle submissionJITO_BE_REGION: Jito block engine region (e.g., "ny", "amsterdam")
- This library is not responsible for transaction confirmation. That is handled by the calling strategy/system.
- Slippage calculations are theoretical and don't account for fees or price impact to prevent execution on unfavorable pools.
- Protocol-specific functions support manual override for exact amount specifications when needed.