---
title: "Decentralized Exchange (DEX) — definition | Nuri Glossary"
description: "A trading venue where you swap from your own wallet, keeping custody, usually against pooled liquidity."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/dex"
---

# Decentralized Exchange (DEX)

A trading venue where you swap from your own wallet, keeping custody, usually against pooled liquidity.

## Basically

A decentralised exchange lets you trade crypto directly from your own wallet. You do not deposit your funds with a central company.

## Key Takeaways

- A DEX lets you trade crypto directly from your wallet using smart contracts, with no central party holding funds. This removes custody risk and the need for KYC/AML verification.
- The two main DEX architectures are AMM-based, such as Uniswap and Curve, and order-book-based, such as dYdX. AMMs use liquidity pools and mathematical formulas to price assets, while order books match individual buyers and sellers.
- DEXs now handle roughly 20% of global spot crypto trading volume. Bitcoin-native DEX solutions like atomic swaps and THORChain enable cross-chain trading without wrapped tokens or centralised bridges.

## What Is a Decentralised Exchange?

A decentralised exchange (DEX) is a peer-to-peer marketplace where smart contracts execute cryptocurrency trades directly between users on a blockchain. Unlike centralised exchanges (CEXs) such as Coinbase or Binance, a DEX never takes custody of your funds. You connect your wallet, approve a transaction, and the swap settles on-chain, with no account creation, deposits, or withdrawal queues.
Centralised exchanges create counterparty risk when they hold your funds. The collapse of FTX in 2022, which left users unable to access billions in deposits, demonstrated this risk in dramatic fashion. DEXs remove this single point of failure by replacing the intermediary with code that anyone can audit.
DEXs are a core building block of decentralised finance (DeFi). Their composability lets other protocols build on them: lending platforms can liquidate collateral through DEXs, yield strategies can rebalance through DEXs, and payment applications can source liquidity from DEX pools.

## How It Works

Decentralised exchanges use two dominant architectures. Each has different trade-offs in capital efficiency, execution speed, and user experience.

## AMM-Based DEXs

Automated Market Makers (AMMs) replace the traditional order book with liquidity pools and mathematical pricing formulas. Instead of matching a buyer with a seller, an AMM lets you trade against a pool of tokens locked in a smart contract.
Liquidity providers (LPs) deposit pairs of tokens into these pools and earn a share of trading fees in return. The most common pricing mechanism is the constant product formula.
Token A becomes more expensive relative to Token B when a trader buys Token A by adding Token B to the pool and removing Token A. The reduced supply of Token A raises its price while maintaining the invariant. Larger trades relative to pool size cause more slippage, meaning a worse execution price as the pool's ratio moves further from equilibrium.
A pool with 10 ETH and 20,000 USDC has k = 200,000 and an implied price of 1 ETH = 2,000 USDC. A buyer purchasing 1 ETH must deposit enough USDC to maintain k with 9 ETH remaining. The required deposit is roughly 2,222 USDC, giving an effective price of about 2,222 USDC per ETH because of slippage.
Uniswap pioneered this model in 2018. Uniswap v3 later added concentrated liquidity, letting LPs allocate capital to specific price ranges for better capital efficiency, while Curve Finance developed a StableSwap invariant optimised for similarly priced assets like stablecoins, providing near-zero slippage near the peg.

## Order-Book DEXs

Order-book DEXs match buyers and sellers through limit orders, similar to traditional stock exchanges. You place bids to buy and asks to sell at specific prices, and the matching engine pairs compatible orders.
dYdX is the leading order-book DEX, focusing on perpetual futures and leveraged trading. It operates its own Layer 1 blockchain built on the Cosmos SDK with CometBFT consensus, enabling high throughput and low latency that would be impractical on a general-purpose chain like Ethereum.
Order-book DEXs offer familiar trading interfaces with limit orders, stop-losses, and other advanced order types that AMMs typically lack. The trade-off is that they require significant liquidity from market makers to maintain tight spreads, and fully on-chain order books face throughput constraints on most blockchains.

## Intent-Based DEXs

Intent-based DEXs are a newer architecture that has gained traction since 2024. Instead of interacting directly with a liquidity pool or order book, you sign an "intent" describing your desired outcome, such as "swap 1 ETH for at least 2,000 USDC", and a network of solvers competes to fill the order at the best possible price.
UniswapX, CoW Protocol, and 1inch Fusion all use variations of this model. Intent-based systems can route across multiple liquidity sources, protect you from front-running, and even enable gasless swaps where the solver pays the transaction fee.

## Bitcoin-Native DEX Solutions

Most DEX activity occurs on Ethereum, Solana, and BNB Chain. Several solutions also let you trade Bitcoin without centralised intermediaries.

## Atomic Swaps

Atomic swaps use Hash Time-Locked Contracts (HTLCs) to enable trustless cross-chain trades. The process works as follows:
The swap is atomic: either both sides complete or neither does. If Alice fails to reveal the secret before the timelock expires, both parties reclaim their funds. No intermediary is needed.

## Cross-Chain DEXs

THORChain is the leading cross-chain DEX for Bitcoin. It enables native swaps between BTC, ETH, BNB, and other assets without wrapped tokens, using its own validator network and liquidity pools with RUNE as the intermediary settlement asset.
Bisq takes a different approach as a fully decentralised, peer-to-peer desktop application for trading Bitcoin for fiat currencies or other crypto. It uses Tor for privacy and a multisig escrow system for trade security.
Layer 2 networks like Spark are expanding what is possible for Bitcoin-native trading. By moving transactions off the main chain while preserving self-custody, L2s can support faster, cheaper swaps that would be impractical on Bitcoin's base layer. For a deeper comparison of Bitcoin scaling approaches, see the Bitcoin Layer 2 comparison.

## MEV and Front-Running

Maximal Extractable Value (MEV) is one of the most significant risks on AMM-based DEXs because pending transactions are visible in the mempool before confirmation, allowing bots to exploit that transparency. The most common attack is the sandwich: a bot places a buy order before your swap and a sell order after it, extracting the maximum allowed slippage as profit. Intent-based DEXs and private transaction pools are emerging as mitigations.

## Smart Contract Risk

DEX smart contracts hold billions of dollars in liquidity, and bugs, vulnerabilities, or governance exploits can lead to catastrophic loss of funds. Major DEXs like Uniswap have extensive audit histories, but newer or forked protocols may not. You should verify that a DEX's contracts have been audited and consider the protocol's track record before providing liquidity.

## Impermanent Loss

Liquidity providers on AMM-based DEXs face impermanent loss when the price ratio of pooled tokens diverges from the initial deposit ratio. The LP ends up with less value than if they had simply held both tokens, and the loss is "impermanent" only if prices return to the original ratio. For volatile pairs, impermanent loss can exceed the trading fees earned.

## Scam Tokens

Permissionless listing is both a feature and a risk. Anyone can create a token and add liquidity for it on a DEX, including tokens designed to defraud buyers: honeypots that can be bought but not sold, fake versions of popular tokens, and rug pulls where the creator drains the liquidity pool. Always verify token contract addresses through official project channels before trading.

## Gas Costs and Network Congestion

On-chain trades require gas fees. On Ethereum mainnet during periods of high demand, a single swap can cost $10 to $50 or more in gas, making small trades uneconomical. Layer 2 networks and alternative chains have largely addressed this, with swaps on Arbitrum, Base, or Solana typically costing fractions of a cent, but bridging assets to these networks adds complexity and risk.

## Regulatory Uncertainty

Rules for DEXs remain unsettled. In February 2025, the SEC closed its investigation of Uniswap Labs without enforcement action, a significant development for the DeFi space. Multi-jurisdictional exposure persists, the classification of DEX governance tokens and LP positions under securities law continues to evolve, and the GENIUS Act and similar legislation may indirectly affect how DEXs handle regulated assets like stablecoins.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
