Virtual AMM (vAMM)

A virtual AMM uses the constant-product formula (x · y = k) to calculate prices — but unlike Uniswap, there are no real tokens in the pool. The vAMM is purely a pricing engine. Collateral sits in a separate vault. When traders open or close positions, the vAMM updates virtual reserves to determine the new mark price. Pioneered by Perpetual Protocol, this design is also the conceptual basis behind GMX's pricing model and dYdX v3.

🎯 vAMM Price Impact Simulator

Drag the trade size slider to see how trades move along the constant-product curve. Larger trades relative to virtual depth create more slippage.

k (constant)
2,000,000,000
Price Before
$2,000.00
Price After
$2,100.00
Slippage
2.44%
Position Size
24.39 vETH
Avg Exec Price
$2,050.00

📐 Depth Comparison: vAMM vs Order Book

See how the same trade executes differently on a vAMM (smooth curve) versus an order book (discrete price levels). The vAMM provides deterministic pricing — no need to match with counterparties.

🔑 vAMM vs Real AMM vs Order Book

Virtual AMM
  • No real tokens in pool
  • k set by governance
  • Collateral in separate vault
  • Can be re-pegged to index
  • Deterministic pricing
Real AMM (Uniswap)
  • Real tokens deposited by LPs
  • k = actual liquidity
  • Tokens swapped in-pool
  • Price = supply/demand
  • LPs take IL risk
Order Book (dYdX v4)
  • Discrete bids & asks
  • Depth from market makers
  • Partial fills possible
  • Tighter spreads at top
  • Requires active LPs

⚠️ vAMM Challenges & Mitigations

MARK-INDEX DIVERGENCE
vAMM price can drift from real spot. Fixed with funding rates + periodic re-pegging + k-adjustment by governance.
INSURANCE FUND DRAIN
If liquidations can't cover bad debt, the insurance fund absorbs losses. Prolonged one-sided markets can deplete it.
DEPTH MANIPULATION
Since k is virtual, manipulators can move price with less real capital. Mitigated by larger k values and OI caps.
💡 Evolution: Perpetual Protocol v1 used a pure vAMM. v2 moved to concentrated liquidity (like Uniswap v3). GMX uses an oracle-based model with zero-slippage execution. dYdX v4 moved to a full order book on its own Cosmos chain. The trend is away from vAMMs toward hybrid models.