DEX Module
The DEX module is the canonical Xian AMM contract set.
Active development lives in xian-dex. The pinned, reproducible catalog copy lives in xian-configs/modules/dex.
Contract Bundle
The canonical module assets are:
modules/dex/module.jsonmodules/dex/contract-bundle.jsonmodules/dex/contracts/con_pairs.s.pymodules/dex/contracts/con_dex.s.pymodules/dex/contracts/con_dex_helper.s.pymodules/dex/contracts/con_lp_token.s.pymodules/dex/contracts/demo_token.s.py
Validate the module:
bash
cd ~/xian/xian-cli
uv run xian module validate dexRecipes
The module currently exposes these recipes:
| Recipe | Purpose |
|---|---|
core | Deploy con_pairs, con_dex, and con_dex_helper without demo liquidity. |
local-demo | Deploy the core DEX contracts plus a demo token, LP token, and seeded XIAN/XDT pool. |
production | Deploy the core contracts without local-only demo assets. |
Local Install
Start a local network first:
bash
cd ~/xian/xian-stack
make localnet-init
make localnet-upThen install the DEX module:
bash
cd ~/xian/xian-cli
uv run xian module install dex --recipe local-demo --stack-dir ../xian-stackFor scripted setups, start the localnet first and then run make localnet-dex-bootstrap, or use xian module install dex ... when the DEX module should be installed through the CLI module flow.
Development Overrides
Use a different pinned bundle when testing a release candidate:
bash
XIAN_DEX_BUNDLE=/path/to/contract-bundle.json make localnet-dex-bootstrapUse raw source only for active DEX development:
bash
XIAN_DEX_CONTRACTS_DIR=../xian-dex/src make localnet-dex-bootstrap