Skip to content

DEX

Preview

AMM pools, central limit order books, frequent batch auctions, circuit breakers, and shielded trading.

Updated View as Markdown

The DEX module supports multiple execution models so a product can choose the trade-off it needs.

Execution modes

  • AMM pools — constant-product liquidity with explicit minimum-output protection.
  • CLOB — limit and market orders with price-time priority and lifecycle states.
  • Frequent batch auctions — collect orders during a batch interval and clear matched orders at a uniform price.
  • Shielded trading — privacy-preserving liquidity and swap paths where the privacy module and pool configuration support them.

Circuit breakers can halt execution after repeated failures and later test recovery under constrained conditions. Reference prices and slippage bounds protect against obviously unsafe execution, but a user still owns market and liquidity risk.

Public message families

The module exposes pool creation, liquidity add/remove, swaps, order placement/cancellation, batch-order submission, and governance parameter updates. Queries cover pools, order books, orders, user orders, trades, candles, circuit-breaker state, and parameters.

Integrator checklist

  • Quote against current pool or order-book state.
  • Sign a minimum-output or maximum-price bound.
  • Treat an order as open, partially filled, filled, cancelled, or expired; do not infer fill from submission.
  • Handle batch clearing as a uniform-price event, not a promise of a particular intra-batch order.
  • Monitor circuit-breaker state and oracle freshness where the market uses reference prices.

Use the market infrastructure workflow and TypeScript SDK for higher-level integration.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close