šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

github.com/yimingWOW/solroute

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/yimingWOW/solroute

v0.1.0
Source
Go
Version published
Created
Source

SolRoute SDK

SolRoute is a Go SDK that serves as the fundamental infrastructure for building DEX routing services on Solana. Unlike solutions that rely on third-party APIs, SolRoute directly interacts with the Solana blockchain.

Features

  • Protocol Support

    • Raydium CPMM V4 (675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8)
    • Raydium CPMM (CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C)
    • Raydium CLMM (CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK)
    • PumpSwap AMM (pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA)
  • Core Functionality

    • Pool discovery and management
    • Price calculation and quote generation
    • Cross-DEX routing and optimal path finding
    • Transaction instruction building

Use Cases

SolRoute's direct blockchain interaction makes it ideal for building:

  • Trading Services: Price aggregation, best price routing, arbitrage bots
  • DeFi Applications: DEX aggregators, liquidity management tools
  • Research Tools: Market analysis, strategy backtesting

Quick Start

// Initialize router with supported protocols
router := router.NewSimpleRouter(
    protocol.NewPumpAmm(solClient),
    protocol.NewRaydiumAmm(solClient),
    protocol.NewRaydiumClmm(solClient),
    protocol.NewRaydiumCpmm(solClient),
)

// Find best pool and execute swap
bestPool, amountOut, err := router.GetBestPool(ctx, solClient.RpcClient, 
    "TOKEN0_MINT", "TOKEN1_MINT", amountIn)
if err != nil {
    log.Fatal(err)
}

// Build and send transaction
instructions, err := bestPool.BuildSwapInstructions(ctx, solClient.RpcClient,
    userPublicKey, "TOKEN0_MINT", amountIn, minAmountOut)

Installation

go get github.com/yimingWOW/solroute

Project Structure

solroute/
ā”œā”€ā”€ pkg/
│   ā”œā”€ā”€ api/         # Core interfaces
│   ā”œā”€ā”€ pool/        # Pool implementations
│   ā”œā”€ā”€ protocol/    # DEX implementations
│   ā”œā”€ā”€ router/      # Routing engine
│   └── sol/         # Solana client

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

FAQs

Package last updated on 09 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts