Spot Trading
Deriverse's innovative hybrid AMM-orderbook model combines the best of continuous liquidity and precise execution for superior spot trading.
Overview
Spot trading on Deriverse bridges the gap between AMM convenience and orderbook precision. Instead of choosing between slippage-prone AMMs or potentially illiquid orderbooks, traders access both simultaneously in a single, optimized execution flow.
How It Works
Hybrid Execution Model
Traditional DEXs force users to choose between AMMs or orderbooks. Deriverse eliminates this trade-off:
Order Execution Flow:
1. AMM Liquidity (up to first orderbook quote)
2. Orderbook Matching (existing limit orders)
3. AMM Liquidity (up to price limit)This hybrid approach ensures:
Maximum Liquidity: Access to both AMM pools and limit orders
Optimal Pricing: Best available execution across all sources
Reduced Slippage: Smaller price impact on large orders
Continuous Trading: Always available liquidity
Practical Example
Let's walk through a real trading scenario to see how the hybrid model works:
Initial Setup:
SOL/USDCpool: 10,000SOL+ 2,000,000USDCCurrent price: 200
USDCperSOLYou want to buy 100
SOLat max 201.40USDC
Existing Orderbook:
Asks:
202.00 USDC - 1 SOL
200.50 USDC - 10 SOL
Bids:
199.50 USDC - 1 SOL
199.00 USDC - 20 SOL
198.50 USDC - 1 SOLExecution Steps:
Step 1: Trade against AMM up to first ask (200.50)
SOLacquired: 12.48SOLUSDCspent: 2,498.44USDC
Step 2: Hit the 200.50 orderbook ask
SOLacquired: 10SOLUSDCspent: 2,005.00USDC
Step 3: Continue with AMM up to your limit (201.40)
SOLacquired: 22.34SOLUSDCspent: 4,489.35USDC
Final Result:
Total
SOLPurchased: 44.82SOLTotal
USDCSpent: 8,992.79USDCAverage Price: 200.65
USDCperSOLRemaining Order: 55.18
SOLat 201.40 (on orderbook)
Benefits Demonstrated
This example shows key advantages:
Better Pricing: Average 200.65 vs pure AMM price of ~202
Partial Fill: Got 44.82
SOLimmediately vs waiting for full orderbook fillRemaining Liquidity: Order placed for remaining 55.18
SOLPrice Improvement: Better than pure orderbook or pure AMM execution
Direct Wallet Trading
No Deposit Required
Trade directly from your Solana wallet without pre-depositing funds:
Wallet → Direct Trade → SettlementProcess:
Balance Check: System verifies wallet balance in real-time
IOC Order: Immediate-or-Cancel order submitted to hybrid engine
Execution: Trade executes against AMM + orderbook
Settlement: Tokens transferred directly to/from wallet
Unfilled Return: Any unfilled quantity returns immediately
Benefits:
Zero friction trading experience
No fund lockup or deposits
Atomic execution guarantees
Immediate availability of tokens
Supported Order Types
Immediate-or-Cancel (IOC):
Execute immediately against available liquidity
Any unfilled quantity cancels automatically
Perfect for direct wallet trading
No persistent orderbook presence
Limit Orders (with deposits):
Traditional orderbook orders
Require depositing funds to Deriverse account
Remain on orderbook until filled or cancelled
Eligible for maker rebates
Market Dynamics
Price Discovery
The hybrid model creates superior price discovery through:
AMM Component:
Continuous pricing based on pool reserves
Always available liquidity
Predictable slippage curves
Arbitrage opportunities maintain market alignment
Orderbook Component:
Precise price levels from limit orders
Professional market maker participation
Reduced spread competition
Deep liquidity at key levels
Liquidity Provision
AMM Liquidity Providers:
Deposit tokens to provide continuous liquidity
Earn fees from AMM trading
Face impermanent loss risk
Benefit from arbitrage flow
Limit Order Makers:
Place orders at specific price levels
Earn maker rebates on fills
Control exact execution prices
No impermanent loss risk
Technical Implementation
AMM Mathematics
Pool reserves determine pricing using constant product formula:
k = token_a_reserves × token_b_reservesPrice calculation for swaps:
price = token_b_reserves / token_a_reserves
new_price = (token_b_reserves + amount_out) / (token_a_reserves - amount_in)Integration Benefits
For Developers:
Single Spot market covers both AMM and orderbook
Predictable execution with fallback liquidity
Real-time market data feeds
Standard DEX interfaces and Open-Source Deriverse SDKs
For Market Makers:
Professional tools for quote management
Atomic bid-ask replacement
Reduced gas costs per update
Transparent fee rebates
Best Practices
For Traders
Order Management:
Use price limits appropriate for market conditions
Monitor partial fills and adjust strategies
Consider total trading costs including gas
Risk Control:
Start with smaller position sizes
Understand price impact before trading
Keep sufficient token balances for intended trades
For Liquidity Providers
AMM Providers:
Monitor impermanent loss exposure
Rebalance positions based on market trends
Consider fee earnings vs IL risk
Market Makers:
Maintain competitive spreads
Update quotes frequently in volatile markets
Use atomic replacement to minimize adverse selection
Last updated