Exact input fixes how much of the input token the swap spends. Exact output fixes how much of the output token it targets. The opposite side remains variable within a bound: minimum received for exact input, or maximum spent for exact output.
Uniswap's single-swap guide documents both forms. This page explains their economic meaning; support and handling of unusual token behavior depend on the specific implementation.
| Constraint | Exact input | Exact output |
|---|---|---|
| Fixed quantity | Sell amount | Buy amount |
| Variable quantity | Tokens received | Tokens spent |
| Execution bound | Minimum output | Maximum input |
| Typical objective | Exchange a fixed budget | Obtain a specified receipt |
When the budget is the starting point
In a hypothetical exact-input request, you sell 100 A. The quote estimates 250 B, while the transaction requires at least 247 B. A valid execution delivering 248 B spends the fixed 100 A and satisfies the floor. An execution that would deliver only 246 B cannot satisfy that bound.
The minimum is not the predicted result and is not an instruction to deliberately reduce your receipt to that amount. It defines a permitted boundary. Whether favorable changes are passed through, and how fees are represented, depends on the execution system.
When the receipt is the starting point
For an exact-output request, suppose you require 250 B. The estimate is 100 A, with a maximum of 102 A. Spending 101 A can satisfy the order; requiring 103 A cannot. The maximum is a ceiling, not automatically the amount consumed.
Some contracts temporarily collect the maximum input and return the unused portion; other designs pull only what execution requires. Uniswap's educational multi-hop example illustrates an explicit refund. Do not generalize that precise custody flow to every router.
Do not compare the two modes using mismatched sizes
A quote to sell 100 A and a quote to buy 250 B are not guaranteed to describe the same trade. If one produces 249 B or requires 101 A, their constrained quantities differ. Keep the mode visible when recording or comparing offers.
Also distinguish the token input cap from the total wallet requirement. Network charges or separate actions may use another asset. Exact output constrains the swap's input quantity; it does not mean every surrounding operation has a fixed total cost.
The choice follows the obligation you are trying to meet. A budget-led exchange naturally starts with exact input. A payment that requires a particular token quantity starts with exact output, provided the implementation supports the desired asset and delivery behavior.
Sources & verification (3)
Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.
- Single Swaps | Uniswap Developers
Exact-input and exact-output swap modes and their bounds.
https://developers.uniswap.org/docs/protocols/v3/guides/swapping/single-hop-swapping - Multi-hop Swapping
Sequential token paths and reverse requirements for exact-output swaps.
https://developers.uniswap.org/docs/protocols/v3/guides/swapping/multi-hop-swapping - Understanding Swaps on Uniswap
AMM execution, minimum output, maximum input, deadlines and impact.
https://developers.uniswap.org/docs/get-started/concepts/traders/swaps