Skip to content

shadowfax92/Solana-MultiSwap

Repository files navigation

💱 Solana MultiSwap

Multi-token swap UI for Solana.

Split one input across multiple output tokens in a single flow.

A DEX aggregator frontend built on Jupiter that lets you swap one token into multiple outputs. Select your input, split the amount across different tokens, and execute — Jupiter finds the best routes across Solana's liquidity pools.

  • 🔀 Multi-token output — split input across multiple swaps
  • 🛣️ Route optimization — Jupiter Aggregator finds best paths across DEXes
  • 👛 Wallet support — Phantom, Solflare, Sollet
  • 💰 Fee transparency — shows deposits, signature fees, and costs per swap
  • 🌙 Dark UI — Tailwind + DaisyUI dark theme

Tech Stack

Framework Next.js 12 + React 17
Language TypeScript
Styling Tailwind CSS + DaisyUI
DEX Jupiter Aggregator
Blockchain Solana (web3.js, SPL Token Registry)

Install

npm install

Quick Start

# 1. Set your cluster
echo "NEXT_PUBLIC_CLUSTER=mainnet-beta" > .env

# 2. Start dev server
npm run dev

Open http://localhost:3000, connect your wallet, and swap.

Config

Variable Values Default
NEXT_PUBLIC_CLUSTER devnet, mainnet-beta, testnet mainnet-beta

How It Works

The app wraps Jupiter's React hooks in a multi-swap interface. For single swaps, it queries Jupiter for the best route and executes via the connected wallet. For multi-swaps, it splits the input amount across separate Jupiter instances and executes transactions sequentially. Routes refresh automatically, and fee breakdowns are calculated per swap.


Personal project for Solana token swaps. Feel free to fork and adapt.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors