3.1 Phased Dynamic LMSR Market Maker
Path Protocol implements a Phased Dynamic LMSR system, a mathematically elegant automated market maker that provides instant liquidity without requiring liquidity providers or protocol reserves. The system uses a phased architecture that transitions from capital accumulation to full LMSR operation with dynamic reserves.
Phased Market Architecture
Path Protocol's LMSR implementation uses a phased architecture with five distinct market states:
┌─────────────────────────────────────────────────────────┐
Phased Dynamic LMSR Market States
└─────────────────────────────────────────────────────────┘
BOUNDING Phase
├─> Market starts with target_b (e.g., 1000 USDC)
├─> Only BUY orders allowed
├─> Pool accumulates from trader deposits
├─> virtual_b = target_b (fixed, not dynamic yet)
├─> Transition: When real_pool >= target_b → ACTIVE
└─> Timeout: If end_time reached → REFUNDED (full refund)
ACTIVE Phase
├─> Both BUY and SELL orders allowed
├─> CRITICAL: virtual_b = real_pool (dynamic, updates after each trade)
├─> Prices calculated using virtual_b
├─> True LMSR behavior with accurate pricing
└─> Timeout: When end_time reached → COMPLETED
COMPLETED Phase
├─> Trading stopped
└─> Awaiting oracle resolution
RESOLVED Phase
├─> Oracle has resolved winning outcome
├─> Winners redeem shares (proportional to pool)
├─> Losers receive nothing
└─> Zero-sum settlement (winners from losers)
REFUNDED Phase (BOUNDING timeout)
├─> Market never reached ACTIVE
├─> All traders refunded their deposits
└─> No winners/losers, clean closureHow LMSR Works
LMSR uses a cost function to price outcome shares based on outstanding quantities:
The marginal price for any outcome i is calculated as:
Dynamic Virtual Reserves
Key Innovation: In the ACTIVE phase, virtual_b dynamically adjusts to always equal real_pool:
Settlement Risk:
With dynamic virtual_b, settlement risk is zero:
Pool always matches prices (virtual_b = real_pool)
Winners paid from pool (trader money)
Losers receive nothing
Protocol never adds money
Why LMSR is Superior
Compared to CPMM (Constant Product Market Makers):
Capital Required
$0 (phased dynamic LMSR)
$10k-$100k+ (LP provided)
Liquidity Available
Instant at creation
Depends on LP deposits
Provider Risk
None (no LPs)
Impermanent loss risk
Price Bounds
Guaranteed [0,1]
Can break invariants
Protocol Risk
Zero (dynamic virtual_b)
Unbounded (IL unlimited)
Multi-outcome
Native support
Requires N² pairs
Compared to Order Books:
Liquidity Depth
Smooth curve
Depends on limit orders
Price Discovery
Instantaneous
Requires market makers
Thin Markets
Excellent performance
Poor spreads
Gas Efficiency
High (single tx)
Low (order matching)
Trade Execution Example
Scenario: User wants to buy 100 YES shares in a binary market
Current State:
b = 1000 USDC
q_yes = 500 shares outstanding
q_no = 500 shares outstanding
Step 1: Calculate current cost
Step 2: Calculate cost after purchase
Step 3: Purchase price
The user pays 52 USDC (plus fees) to buy 100 YES shares. If the YES outcome occurs, they redeem shares proportionally from the pool (parimutuel settlement), with winners paid by losers and zero protocol risk.
Note: In Path Protocol's phased dynamic LMSR, the market would be in ACTIVE phase for this trade, with virtual_b dynamically equal to real_pool, ensuring prices accurately reflect true liquidity.
Last updated

