The Dex module implements a decentralized exchange on Neutron, providing users with the ability to trade tokens, provide liquidity, and place limit orders. The module introduces a novel AMM design centered around constant-price liquidity pools that offer simplicity, flexibility, and capital efficiency.
Duality Orderbook: This module powers Duality, Neutron’s protocol-native orderbook that combines the advantages of orderbooks and AMMs. For a complete overview of Duality’s features, architecture, and ecosystem integrations, see the Duality documentation.
The fundamental building block of Neutron DEX is the constant-price liquidity pool, where liquidity is concentrated at specific price points (ticks). This design:
Enables zero or near-zero slippage trades for stablecoins and highly correlated assets
Allows liquidity providers to precisely target their capital to specific price ranges
Significantly improves capital efficiency compared to traditional AMM designs
Good Til Cancelled (GTC): Remain active until explicitly cancelled
Fill or Kill (FOK): Execute entirely or not at all
Immediate or Cancel (IOC): Fill as much as possible immediately, then cancel any unfilled portion
Good Til Time (GTT): Remain active until a specified expiration time
Just in Time (JIT): Special limit orders that can only be filled by takers
Order matching follows a price-time priority model, where orders at better prices are filled first, and within the same price, older orders take precedence.