aiShare Your Requirements
Home
Home
Our Projects Solana On-Chain Router

Technologies Involved:

Node Js

Area Of Work:

Smart Contract

Project Description

A blockchain-focused client, specializing in decentralized finance (DeFi) solutions, approached Oodles to enable seamless multi-token swaps across multiple liquidity pools. The client needed a secure, efficient, and scalable program to automate token exchange on Solana. We delivered a robust solution using the Anchor framework, ensuring accurate swaps, flexible multi-hop routes, and reliable on-chain execution.

Scope Of Work

The client sought Oodles for a program to perform multi-swaps across Raydium AMM pools in a single atomic transaction while handling dynamic token routes and intermediary pools. Key areas included swap logic, account management, interaction with liquidity pools, and deployment scripts. The goal was to streamline token exchanges, reduce manual intervention, and ensure security and performance at scale.

Our Solution

The solution enables up to four intermediary hops per transaction, calculates intermediate token amounts dynamically, and interacts directly with Raydium AMM pool accounts for precise execution.

Key features and techniques implemented:

  • Dynamic Multi-Hop Swaps: Handles sequential token swaps with up to four hops based on user input.
  • Secure Account Management: Ensures proper handling of associated token accounts (ATAs) for input and output tokens.
  • Optimized Compute Usage: Reduces on-chain resource consumption for faster, cost-efficient transactions.
  • Deployment & Testing Scripts: Includes scripts for mainnet deployment, contract testing, and predeployment of Lookup Address Tables for scalability.
  • Direct AMM Interaction: Utilizes Raydium’s on-chain instructions (swap_base_in, etc.) for accurate swaps.