Page cover

Duality Orderbook

Zypheria offers a high-performance orderbook combining orderbook and AMM advantages for efficient, capital-optimized trading

Zypheria Duality is a protocol-native orderbook seamlessly integrated into Zypheria’s core infrastructure, combining the benefits of traditional orderbooks and AMMs into a single, capital-efficient framework. Unlike standard orderbooks deployed as smart contracts, Duality is implemented at the protocol level, offering superior performance and tighter integration with other Zypheria features.

Key Features

Dynamic Trade Routing & Order Types

Automatically discovers the best price while protecting against extractive tactics like sandwich attacks. Submit limit orders directly to the orderbook, or use the Market tab for instant token swaps with optimal execution.

Protocol Integration & Vault Partnerships

As a core protocol module rather than a smart contract, Duality benefits from enhanced performance and acts as the foundational liquidity layer. Partners such as Margined and Astroport allow passive LPs to engage in professional-grade trading strategies.

Technical Architecture

Duality is built directly into Zypheria’s core infrastructure as a native protocol module, making it highly capital-efficient and seamlessly integrated with other Zypheria applications. It maintains a full limit orderbook for precise price discovery and execution while supporting a variety of order types. Its open composability ensures that the fully open-source design allows other applications to build on top, enhancing overall ecosystem liquidity.

Explore the module code: Developers curious about the technical details can review the Dex module documentation for a full breakdown of Duality’s implementation.

Benefits for Users

Professional Market Makers: Advanced order types enable improved pricing at higher frequencies with reduced risk of adverse selection.

Traders: Access better prices, lower slippage, and protection against predatory behaviors like sandwiching and front-running.

Passive LPs: Vault providers allow participation in sophisticated strategies without sacrificing convenience, delivering professional-grade returns.

Ecosystem Integration

Duality serves as the foundational layer for spot liquidity on Zypheria, boosting capital efficiency across the ecosystem:

  • Mars: Efficiently routes liquidations and position onramps through Duality, enabling higher lending deposit caps and greater borrowing capacity safely.

  • Astroport: Boosts LP rewards by allowing PCL pools to supply liquidity on Duality.

  • Margined: Supports off-chain market-making strategy vaults for Duality markets.

  • Drop: Partnering with Margined and Supervaults to create profitable market-making strategy vaults for dAsset markets.

  • Eclipse Fi: Working with Margined to launch arbitrage vaults for Duality pairs.

Trading on Duality

Limit Orders

Place buy and sell orders at specific prices to ensure optimal execution. Duality supports a variety of expressive limit order types:

  • Fill-Or-Kill (FOK): Executes only if the entire order can be filled.

  • Immediate-Or-Cancel (IOC): Executes as much as possible below the limit price, canceling the rest.

  • Good-Til-Canceled (GTC): A maker order that remains on the orderbook until filled or canceled.

  • Good-Til-Time (GTT): A maker order with a set expiration time.

  • Just-In-Time (JIT): A GTT limit order that expires exactly after 1 block.

Market Swaps

Execute instant token swaps with minimal slippage, allowing you to trade tokens quickly and easily.

MultiSwaps route trades through multiple pairs in a single atomic transaction, using on-chain route finding to optimize execution and prevent front-running.

Last updated