# Exact-input and exact-output swaps: which amount is fixed?

An exact-input swap fixes the amount offered and enforces a minimum received. An exact-output swap targets a receiving amount and enforces a maximum spent. In the documented Uniswap v3 router flows, a trade that cannot satisfy its bound fails; the displayed quote is not a promise of execution.

Evidence: [Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps)

Canonical: https://degreesofsatoshi.com/encyclopedia/exact-input-vs-exact-output-swaps/
Published: 2026-10-02
Substantively modified: 2026-10-02
Independently verified by an automated reviewer: 2026-10-02T19:18:00.092Z
Data current through: 2026-10-02

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

## Key facts

- **Exact input:** The usual protection is amountOutMinimum. ([Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps))
- **Exact output:** The input is limited by amountInMaximum. ([Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps))
- **Unused input:** A prefunded exact-output integration must return any unspent input. ([Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps))

## Choose which side matters

A person spending a fixed 100 units of token A generally cares about the token B amount received. A person who needs exactly 50 B generally cares about how much A must be supplied. Those are different transaction instructions even when an interface initially quotes the same exchange rate.

Evidence: [Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps)

## Read the actual bounds

Suppose spending 100 A is quoted to receive 50 B. A 1% reduction from that quote gives a minimum of 49.5 B. A different instruction might request exactly 50 B while allowing at most 101 A. Neither instruction requires execution at the original quote.

The arithmetic is hypothetical and states the percentage convention explicitly. Interfaces can calculate tolerances differently. Inspect the minimum-output or maximum-input amount that will actually be enforced, along with the recipient and deadline.

Evidence: [Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps)

## Account for the integration

In Uniswap’s example, the exact-output helper temporarily takes the maximum input and refunds the unused portion. A custom integration needs to implement that refund correctly. A nonzero price limit can also cause an exact-input flow to use less than the requested amount, requiring careful refund handling.

These are v3 router examples. Fee-on-transfer tokens, custom hooks and other routers can have different supported behavior; a familiar swap label does not establish compatibility.

Evidence: [Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps)

## Questions

### Does exact output guarantee that I will receive the target?

In the documented router example with sqrtPriceLimitX96 set to zero, a successful exact-output swap delivers the requested output. Liquidity, input limits or expiry can still prevent settlement. Custom nonzero price-limit paths need their own output-completeness checks.

Evidence: [Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps)

## Claims and scope

### exact-input-vs-exact-output-swaps-quick-answer

An exact-input swap fixes the amount offered and enforces a minimum received. An exact-output swap targets a receiving amount and enforces a maximum spent. In the documented Uniswap v3 router flows, a trade that cannot satisfy its bound fails; the displayed quote is not a promise of execution.

Scope: {"collection":"defi","dataAsOf":"2026-10-02","blockHeight":null}

### exact-input-vs-exact-output-swaps-fact-exact-input

Exact input: The usual protection is amountOutMinimum.

Scope: {"collection":"defi","dataAsOf":"2026-10-02","blockHeight":null}

### exact-input-vs-exact-output-swaps-fact-exact-output

Exact output: The input is limited by amountInMaximum.

Scope: {"collection":"defi","dataAsOf":"2026-10-02","blockHeight":null}

### exact-input-vs-exact-output-swaps-fact-unused-input

Unused input: A prefunded exact-output integration must return any unspent input.

Scope: {"collection":"defi","dataAsOf":"2026-10-02","blockHeight":null}

## Sources

- [Single Swaps](https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps) — Uniswap. Version-specific router constraints and worked integration examples. Locator: exactInputSingle; exactOutputSingle; deadline; amountOutMinimum; amountInMaximum. Retrieved: 2026-10-02T18:53:19.662Z.

## Revision history

- 2026-10-02: First publication after primary-source research and separate automated verification.

## Cite this entry

Degrees of Satoshi editorial project. “Exact-input and exact-output swaps: which amount is fixed?.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/exact-input-vs-exact-output-swaps/
