Raydium is a DeFi application on the Solana blockchain, integrating an Automated Market Maker (AMM) with OpenBook's (formerly Serum) Central Limit Order Book (CLOB) to create a hybrid model. Its core mechanisms include Fibonacci sequence-based liquidity allocation, optimized pricing/slippage, and permissionless pool creation.
Introduction to Raydium
Raydium is a decentralized exchange (DEX) enabling trustless token swaps on Solana. As one of Solana's earliest AMMs, it pioneers hybrid liquidity solutions by merging AMM pools with OpenBook's order book.
How AMMs Work
Automated Market Makers replace traditional order books by holding paired tokens (e.g., SOL/USDC) in liquidity pools. Swaps follow the constant product formula:
x * y = k Where:
xandyare pool reserveskremains constant post-trade
Liquidity providers (LPs) deposit tokens to earn fees, receiving LP tokens representing their share.
Advantages:
✅ Continuous liquidity – No waiting for counterparties
✅ Price discovery – Automated via reserve ratios
✅ Arbitrage opportunities – Balances market prices
Challenges:
⚠️ Slippage – Large orders impact prices
⚠️ Impermanent loss – LPs face asset value divergence
Raydium’s Hybrid AMM-CLOB Model
Launched in 2021, Raydium’s innovation lies in its dual liquidity sourcing:
- AMM Pools: Standard constant-product swaps
- OpenBook CLOB: Routes trades to order books for better pricing
Key features:
- Permissionless pools: Create pools for any token pair
- Yield farming: Stake RAY tokens for rewards
- Best-price routing: Compares AMM/CLOB for optimal execution
👉 Explore Raydium’s architecture
Technical Deep Dive
Core Components:
- Pool Accounts: Manage token pairs via
x * y = k - OpenBook Integration: Shares liquidity with Serum-derived order books
- Fibonacci Liquidity Allocation: Uses Fibonacci sequences (0, 1, 2, 3, 5...) to place orders at strategic price levels (e.g., ±23.6%, ±38.2% from market price)
Instruction Flow:
- Initialize: Set up pool parameters
- Deposit/Withdraw: Add/remove liquidity
- Swap: Execute trades via AMM or OpenBook routing
- MonitorStep: Adjusts OpenBook orders dynamically
Unique Mechanisms
1. Fibonacci Order Allocation
- Narrow spreads: Small orders near current price (±23.6%)
- Deep liquidity: Large orders at distant levels (±61.8%)
Example: For a $100 SOL price: - Buy orders at $76.4, $61.8
- Sell orders at $123.6, $138.2
2. Best-Price Execution
Compares AMM/CLOB prices in real-time to minimize slippage.
3. Permissionless Design
Any project can launch pools/farms via Raydium’s AcceleRaytor launchpad.
FAQ
❓ How does Raydium reduce impermanent loss?
By routing trades to OpenBook, LPs gain exposure to diversified order flow, mitigating price divergence risks.
❓ What’s the fee structure?
- 0.25% per swap (0.22% to LPs, 0.03% for RAY buybacks)
❓ Can I build on Raydium?
Yes! Developers use Raydium SDK for custom integrations.
Conclusion
Raydium redefines DeFi on Solana by blending AMM efficiency with CLOB depth. Its Fibonacci-based liquidity, low fees, and open access make it a cornerstone of Solana’s ecosystem.
👉 Start building with Raydium today
For developers: Dive into Raydium’s GitHub to explore the codebase.