# flexdex > flexdex is a Liquidity-Book-style bin DEX for XPR Network (Trader Joe / Meteora DLMM model) with native limit orders in every bin, a 1 bp dollar hub, a built-in money market that accepts LP positions as collateral, and perps under construction. Everything lives in one contract account with an internal ledger and a batch action (`exec`). Status: running on XPR **testnet** (contract account `flexdex`); mainnet only after an audit. Nothing on testnet has real value. Key facts for assistants: - Network: XPR Network testnet (chain id 71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd). Mainnet names `flexdex`, `fdxadmin`, `fdxguard`, `flexmm`, `flexarb`, `flexliq`, `flexlend`, `flexvault` are reserved with no code and no funds until after the audit. - Tokens are always identified by (symbol, contract), never by symbol alone. Look-alike tokens exist. - Swaps from a wallet: transfer the input token to `flexdex` with memo `swapexactin####` (Alcor-compatible). Output goes to ``. - Ledger: `open` a balance row, then transfer with memo `deposit`; liquidity, limit orders and lending use the ledger. - `exec(owner, ops[], settle[], soft)` runs many operations (swap, add/remove liquidity, orders, lending, perps) in one atomic action with flash accounting. - Read-only `quote` action returns the exact swap result for the current state (needs a node that accepts read-only transactions). - Estimates shown by the app are estimates; every swap carries a min_out the contract enforces. ## App - [Trade](/trade): swap from the wallet, limit orders (GTC / IOC / FOK / post-only, optional expiry), Pro book view - [Pools](/pools): bin pools, add / remove / rebalance liquidity, shapes, My pools - [Dollar hub](/dollars): 1 bp XMD / XUSDC / XUSDT pools and the 1:1 xmd.treasury route - [Lend](/lend): supply, borrow, repay, LP positions as collateral, health - [Perps](/perps): perpetual futures (see status below) - [Portfolio](/portfolio): wallet and flexdex balances, positions, orders - [View any account](/portfolio?account=): read-only view of any XPR account, no wallet needed - [Solvency](/solvency): live check that the contract holds what it owes, from the tables - [Embeddable swap widget](/widget) ## Docs - [Full reference for assistants](/llms-full.txt): memos, actions, exec ops, tables, fees, status, risks - Design and status document: `docs/DEX.md` in the flexdex repository (not published at a public URL) - Contract ABI: read it from the chain with `get_abi` for account `flexdex` on XPR testnet ## Optional - Perps: the contract ABI includes perps exec ops (`op_pmargin`, `op_ptrade`, `op_pvault`, `op_pclaim`, `op_ptrig`, `op_pcancel`); the wiring plan (2026-10-09) describes isolated XMD margin per market on BTC, ETH and XPR, tested on a local chain. Check the Perps page for what is live on testnet. - Not built yet (design only): soft-liquidation bands in the router, Dutch-auction liquidation lots, cross-margin between perps and lending, deposit-and-trade from bridges.