Skip to content

yuno-research/solana_exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solana DEX Swap Execution Library

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

Overview

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.

Supported DEXs

  • Pumpfun bonding curve
  • Pumpswap AMM
  • Raydium Launchpad
  • Raydium AMMv4
  • Raydium CPMM

Key Features

  • 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

Primary Usage

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.

Environment Variables

  • RPC_NODE_URL: Solana JSON RPC node URL
  • JITO_AUTH_SECRET_KEY: Jito authentication keypair (base58) for bundle submission
  • JITO_BE_REGION: Jito block engine region (e.g., "ny", "amsterdam")

Notes

  • 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.

About

Library for building and executing DEX swap transactions on Solana with support for multiple protocols and Jito bundle integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages