To create a liquidity pool on Solana, you'll typically use a decentralized exchange (DEX) like Raydium or Orca. Here's a general guide:
Using Raydium

Connect your wallet to Raydium.io
Navigate to the "Liquidity" section
Click "Create Pool"
Select the two tokens you want to pair
Set the initial price and deposit amounts for both tokens
Confirm the transaction in your wallet
Using Orca
Go to Orca.so
Connect your wallet
Click on "Pools" then "Create a pool"
Select your token pair
Set parameters like fee tier (usually 0.3% for standard pools)
Deposit initial liquidity
Confirm the transaction
Technical Approach (Programmatic)
If you want to create a pool programmatically using Solana's Token Swap program:
import { TokenSwap, createInitSwapInstruction } from "@solana/spl-token-swap";
// Initialize the pool
const initSwapInstruction = createInitSwapInstruction(
swapAccount, // New account to hold swap state
swapAuthority, // Authority of the swap
tokenAccountA, // Token A account
tokenAccountB, // Token B account
poolTokenAccount, // Pool token mint account
feeAccount, // Fee account
tokenProgramId, // SPL Token program id
swapProgramId, // Token Swap program id
nonce, // Nonce for the authority
swapFee, // Swap fee (e.g., 0.003 for 0.3%)
curveType // Type of curve (e.g., constant product)
);
// Add this instruction to your transactionRequirements
You'll need SOL for transaction fees
Sufficient amounts of both tokens you want to pool
A small amount of SOL to create the new accounts (rent exemption)
Deleting a Liquidity Pool on Solana
Deleting a liquidity pool on Solana depends on which platform you created it on (Raydium, Orca, etc.) and whether you're the pool creator. Here are the methods:
For Raydium Pools
Withdraw all liquidity:
Go to Raydium.io
Navigate to "Liquidity"
Find your pool and click "Remove Liquidity"
Withdraw 100% of your LP tokens
If you're the pool creator:
After withdrawing all liquidity, the pool will become inactive
There's no direct "delete" function - the pool remains but with zero liquidity
For Orca Pools
Remove all liquidity:
Visit Orca.so
Go to "Pools" and find your position
Click "Remove Liquidity" and select 100%
Whirlpools (concentrated liquidity):
You may need to close your position explicitly after withdrawing liquidity
Programmatic Approach
If you created a custom pool using Solana's Token Swap program:
import { TokenSwap, createWithdrawAllTokenTypesInstruction } from "@solana/spl-token-swap";
// 1. First withdraw all liquidity
const withdrawIx = createWithdrawAllTokenTypesInstruction(
swapAccount, // Swap account
swapAuthority, // Authority
userAccountA, // Your token A account
userAccountB, // Your token B account
poolTokenAccount, // Your LP token account
poolTokenMint, // LP token mint
feeAccount, // Fee account
tokenProgramId, // SPL Token program
swapProgramId, // Token Swap program
poolTokenAmount, // Amount of LP tokens to burn
minimumTokenA, // Min amount of token A to receive
minimumTokenB // Min amount of token B to receive
);
// 2. Then you may close the accounts (if you created them)
const closeIx = await createCloseAccountInstruction(
swapAccount, // Account to close
wallet.publicKey, // Destination for remaining SOL
wallet.publicKey, // Account owner
[]
);Important Notes
You can't delete someone else's liquidity pool - you can only remove your liquidity
Pools persist even with zero liquidity until all accounts are closed
Account closure requires you to be the owner of the accounts
SOL recovery - Closing accounts returns the rent exemption SOL to you
Complete Removal Requirements
For complete removal:
Withdraw all liquidity (burn all LP tokens)
Close the swap account (if you created it)
Close the token accounts (if you created them)
