Owner: Nawar | Ship: Week 2 | Est: 0.5-1d | Chain: integra-testnet-1 (EVM 26218) URL: dex.integralayer.com
AMM decentralized exchange for Integra — Uniswap V2 architecture adapted for IRL token pairs. Supports swaps, pool creation, and liquidity provision. Core pairs: IRL/IRWA, IRL/PT, IRL/YT. This is foundational plumbing — without swap infrastructure, bonding curve graduates have nowhere to trade, yield tokens can't be priced, and the lending app can't liquidate collateral.
- Token Swap — Swap between any listed token pair with real-time price quotes, slippage protection, and deadline enforcement
- Multi-Hop Routing — Automatic routing through intermediate pairs when no direct pair exists (e.g., PT -> IRL -> YT)
- Liquidity Pools — Deposit equal value of both tokens into a pool, receive LP tokens representing pool share
- Pool Creation — Create new trading pairs by depositing initial liquidity, setting the starting price
- Remove Liquidity — Burn LP tokens to withdraw proportional share of both tokens from any pool
- Pool Stats Dashboard — TVL, 24h volume, 7d volume, fee APR, and price charts per pool
- Price Impact Warning — Visual warning when trade size would cause significant price impact
- Fee Structure — 0.3% swap fee split: 0.25% to LPs, 0.05% to protocol treasury
- Constant Product AMM — x * y = k pricing formula ensures continuous liquidity at all price levels
- Token Listing — Any ERC-20 on Integra can be paired and traded permissionlessly
- LP Token Tracking — View all LP positions, current value, fees earned, and impermanent loss
swapExactTokensForTokens— Swap with exact input amount and minimum output guaranteeaddLiquidity— Deposit both tokens into a pool, receive LP tokensremoveLiquidity— Burn LP tokens, receive proportional share of both tokensgetAmountsOut— Price quote for a given input amount and swap pathcreatePair— Deploy a new pair contract for two tokensgetPair— Look up the pair contract address for any two tokens
- Connect wallet via Web3Auth
- Select token pair and enter swap amount
- Review price quote with slippage estimate, confirm swap
- For liquidity: select a pair, deposit equal value of both tokens, receive LP tokens
- Monitor pool stats — TVL, volume, earned fees
- Remove liquidity at any time by burning LP tokens
- Factory contract deployed (creates and indexes all pairs)
- Pair contract (holds reserves, executes swaps, mints/burns LP tokens)
- Router contract (user-facing swap and liquidity functions with safety checks)
- Swap interface with token selector, price quotes, and slippage settings
- Add/remove liquidity interface
- Pool creation flow for new pairs
- Pool stats page with TVL, volume, and fee APR per pool
- Multi-hop swap routing
- On-chain event emissions for all actions
- Depends on: IRL token, all ERC-20 tokens on Integra
- Used by: Bonding Curve (spec #11) graduates tokens here, Yield Splitter (spec #12) PT/YT tokens trade here, Lending app uses DEX prices as oracle, Liquidator (spec #32) sells seized collateral via swaps, GOB can route orders here for better execution
- Explorer: Integra Explorer
| Action | Points |
|---|---|
| First swap | 20 XP |
| Each swap | 5 XP |
| Create a new pool | 50 XP |
| Add liquidity | 25 XP |
| Provide liquidity for 7+ days | 100 XP bonus |
| Remove liquidity | 5 XP |
| Metric | Target |
|---|---|
| Total swap transactions | 1,000+ in first month |
| Unique traders | 200+ wallets |
| Total Value Locked (TVL) | 500K+ IRL across all pools |
| Active trading pairs | 10+ pairs |
| Average swap completion time | < 5 seconds |