# Decentralized exchanges: how a token trade reaches settlement

A decentralized exchange uses blockchain contracts to settle trades. In an automated-market-maker design, a trader exchanges assets against pool inventory; other designs use signed orders filled by competing third parties. A quote is an estimate until execution, and the submitted limits determine which outcomes the contract may accept.

Evidence: [Ethereum DeFi overview](https://ethereum.org/defi/); [Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing); [Introducing the UniswapX Protocol](https://blog.uniswap.org/uniswapx-protocol)

Canonical: https://degreesofsatoshi.com/encyclopedia/decentralized-exchanges/
Published: 2026-10-02
Substantively modified: 2026-10-02
Independently verified by an automated reviewer: 2026-10-02T18:17:57.897Z

AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied.

## Key facts

- **Pool design:** Uniswap v2 checks a fee-adjusted reserve invariant. ([Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol))
- **Quote:** Input, reserves and fees determine an estimated output. ([Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing))
- **Trade bound:** A minimum output can reject an unfavorable execution. ([Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing))

## A quote describes state before the execution happens

A pool quote uses current reserves and fees; an order quote follows its signed conditions and available execution route. Other trades or state changes can occur before the user’s transaction is included.

The contract accepts or rejects the actual execution according to its limits. Compare the received amount with the quote at its recorded time, and separate the trade’s own price impact from intervening changes. A wallet signature or a submitted hash alone is not a completed swap.

Evidence: [Uniswap v2 whitepaper](https://app.uniswap.org/whitepaper.pdf); [UniswapX overview](https://docs.uniswap.org/contracts/uniswapx/overview)

## Read the limits in a sample trade

Suppose a quote offers 100 B for 10 A and the submitted minimum is 99 B. A result of 99.4 B meets that minimum; 98.9 B does not. This boundary does not promise a particular market price, and an included Ethereum transaction that reverts still consumes gas used before failure. Who pays depends on the submission design; the UniswapX announcement of July 17, 2023 describes fillers paying to submit signed orders.

A displayed rate also needs a denominator. Output per input, output after pool fees, gas paid in the network asset and any separate interface fee are different quantities. Comparing a headline quote without those distinctions can compare unlike costs.

Evidence: [Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing); [EIP-140: REVERT instruction](https://eips.ethereum.org/EIPS/eip-140); [Introducing the UniswapX Protocol](https://blog.uniswap.org/uniswapx-protocol)

## A DEX name is not a token endorsement

A permissionless pool can contain a token with unusual transfer rules, an issuer freeze mechanism or no credible backing. Pool existence is evidence of a contract and balances, not evidence that the asset is useful or redeemable.

Identify the actual chain, token contract, pool version and route. This article’s invariant example is Uniswap v2, not a claim that every exchange uses the same pricing, custody or administrative design.

Evidence: [Ethereum DeFi overview](https://ethereum.org/defi/); [Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol)

## Questions

### Can a swap fail after I approve it?

Yes. State can change before execution, or the trade can violate a minimum output or another contract condition. Approval to spend tokens does not guarantee that a later swap succeeds.

Evidence: [Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing)

## Claims and scope

### decentralized-exchanges-quick-answer

A decentralized exchange uses blockchain contracts to settle trades. In an automated-market-maker design, a trader exchanges assets against pool inventory; other designs use signed orders filled by competing third parties. A quote is an estimate until execution, and the submitted limits determine which outcomes the contract may accept.

Scope: {"collection":"defi","dataAsOf":null,"blockHeight":null}

### decentralized-exchanges-fact-pool-design

Pool design: Uniswap v2 checks a fee-adjusted reserve invariant.

Scope: {"collection":"defi","dataAsOf":null,"blockHeight":null}

### decentralized-exchanges-fact-quote

Quote: Input, reserves and fees determine an estimated output.

Scope: {"collection":"defi","dataAsOf":null,"blockHeight":null}

### decentralized-exchanges-fact-trade-bound

Trade bound: A minimum output can reject an unfavorable execution.

Scope: {"collection":"defi","dataAsOf":null,"blockHeight":null}

## Sources

- [Ethereum DeFi overview](https://ethereum.org/defi/) — ethereum.org contributors. Financial applications and the distinction between blockchain, assets, protocols and interfaces. Locator: What is DeFi?; How does DeFi work?. Retrieved: 2026-10-02.
- [Uniswap v2 pricing](https://developers.uniswap.org/docs/protocols/v2/concepts/pricing) — Uniswap. Reserve-dependent quotes, trade bounds and external price observations. Locator: Pricing Trades; Exact Input; Exact Output. Retrieved: 2026-10-02.
- [Uniswap v2 pair source](https://raw.githubusercontent.com/Uniswap/v2-core/v1.0.1/contracts/UniswapV2Pair.sol) — Uniswap. Reserve accounting, LP shares, fee-adjusted invariant and optional protocol fee. Locator: mint; burn; swap; _mintFee. Retrieved: 2026-10-02.
- [Introducing the UniswapX Protocol](https://blog.uniswap.org/uniswapx-protocol) — Uniswap Labs. Dated example of signed orders filled and submitted by competing third parties. Locator: Next-level aggregation; Gas-free swapping — and no cost for failed swaps. Retrieved: 2026-10-02.
- [EIP-140: REVERT instruction](https://eips.ethereum.org/EIPS/eip-140) — Ethereum Improvement Proposals. Reverting rolls back state but does not refund work already executed; unused gas is not all consumed. Locator: Specification; Test Cases. Retrieved: 2026-10-02.
- [Uniswap v2 whitepaper](https://app.uniswap.org/whitepaper.pdf) — Uniswap. Full-range constant-product inventory and cumulative-price oracle design. Locator: Price oracle; Liquidity; Fees. Retrieved: 2026-10-02T17:03:45.008Z.
- [UniswapX overview](https://docs.uniswap.org/contracts/uniswapx/overview) — Uniswap. Signed order execution through fillers; execution conditions are mechanism-specific. Locator: Signed orders; Fillers; Dutch auctions. Retrieved: 2026-10-02T17:21:47.712Z.

## Revision history

- 2026-10-02: First publication after primary-source research and independent automated verification.
- 2026-10-02: Before first publication, independent review checked and revised: quickAnswer, quickAnswerSourceIds, sections, sources. Compared the v2 pair invariant and pricing guide with the July 17, 2023 UniswapX announcement. Added primary support for signed-order settlement by competing fillers; no claim that all DEXs use one design. Checked the 100/99 output-bound example. Added EIP-140 support and distinguished included-failure gas from who pays under a filler submission design.
- 2026-10-02: Expanded explanation: A quote describes state before the execution happens. Worked examples are illustrative; source checks and independent verification are recorded separately.

## Cite this entry

Degrees of Satoshi editorial project. “Decentralized exchanges: how a token trade reaches settlement.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/decentralized-exchanges/
