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/USDC pool: 10,000 SOL + 2,000,000 USDC

  • Current price: 200 USDC per SOL

  • You want to buy 100 SOL at max 201.40 USDC

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 SOL

Execution Steps:

Step 1: Trade against AMM up to first ask (200.50)

  • SOL acquired: 12.48 SOL

  • USDC spent: 2,498.44 USDC

Step 2: Hit the 200.50 orderbook ask

  • SOL acquired: 10 SOL

  • USDC spent: 2,005.00 USDC

Step 3: Continue with AMM up to your limit (201.40)

  • SOL acquired: 22.34 SOL

  • USDC spent: 4,489.35 USDC

Final Result:

  • Total SOL Purchased: 44.82 SOL

  • Total USDC Spent: 8,992.79 USDC

  • Average Price: 200.65 USDC per SOL

  • Remaining Order: 55.18 SOL at 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 SOL immediately vs waiting for full orderbook fill

  • Remaining Liquidity: Order placed for remaining 55.18 SOL

  • Price 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 → Settlement

Process:

  1. Balance Check: System verifies wallet balance in real-time

  2. IOC Order: Immediate-or-Cancel order submitted to hybrid engine

  3. Execution: Trade executes against AMM + orderbook

  4. Settlement: Tokens transferred directly to/from wallet

  5. 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_reserves

Price 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