Lux Docs
Exchange

Exchange Quick Start

Run the Lux Exchange locally

Prerequisites

  • Node.js 18+
  • pnpm 8+
  • PostgreSQL 15+ (for the backend)
  • A running Lux node or RPC endpoint

Clone and Install

git clone https://github.com/luxfi/exchange
cd exchange
pnpm install

Configure Environment

cp .env.example .env

Edit .env with your RPC endpoints:

LUX_RPC_URL=http://127.0.0.1:9630/ext/bc/C/rpc
DATABASE_URL=postgres://exchange:pass@localhost:5432/exchange

Run the Exchange

pnpm dev

Open localhost:3000 in your browser.

Features

FeatureDescription
Spot TradingBuy and sell tokens with limit and market orders
Liquidity PoolsProvide liquidity to AMM pools
ChartsReal-time price charts with OHLCV candles
PortfolioTrack your positions and balances
SwapSimple token swap interface

Deployed Instances

InstanceURLNetwork
Mainnetexchange.lux.networkLux Mainnet
Marketsmarkets.lux.networkMarket data

AMM Contracts

All networks use the same CREATE2-deployed contract addresses:

ContractAddress
V2 Factory0xD173926A10A0C4eCd3A51B1422270b65Df0551c1
V2 Router0xAe2cf1E403aAFE6C05A5b8Ef63EB19ba591d8511
V3 Factory0x80bBc7C4C7a59C899D1B37BC14539A22D5830a84
V3 Router0x939bC0Bca6F9B9c52E6e3AD8A3C590b5d9B9D10E

On this page