Exact-Input vs Exact-Output Swap Quotes: What Moves
Exact input vs exact output swap quotes fix opposite amounts: one fixes what you send, the other what arrives, with slippage applied to the amount left variable.
The Blockheight Editors··2 min read
An exact-input quote fixes the amount sent and lets the received amount vary; an exact-output quote fixes the amount received and lets the amount sent vary.
The LI.FI API offers a standard quote based on fromAmount and a separate toAmount quote for a fixed output. In a lifi bridge route, that choice determines which amount price movement can change.
Which amount does each swap quote fix?
Exact-input and exact-output quotes fix different sides of a swap. Slippage affects the side left variable, so the quoted amount and the amount you can rely on are not always the same.
For exact input, the sent amount stays fixed. If prices move against the route, the amount arriving can fall, but the LI.FI API’s toAmountMin sets the minimum received amount under the quote’s slippage tolerance.
- Amount fixed: Exact input fixes what leaves your wallet; exact output fixes what reaches the destination.
- Effect of price movement: With exact input, less may arrive, down to toAmountMin. With exact output, the target received amount stays fixed while the amount spent can rise.
- Wallet balance: Exact input requires the specified send amount. Exact output can require more than its estimated input, so your wallet must hold the quoted maximum input to cover slippage.
Who should choose exact input or exact output?
Choose based on which amount must be exact and how much balance headroom you have. Exact input suits a task where the amount leaving your wallet is the constraint and a variable received amount is acceptable.
Exact output suits a task where the destination needs a set amount, such as meeting a required payment amount. Since price movement can increase the spend up to the maximum input, check that your wallet can cover that maximum, not only the estimate.
A fixed destination amount is useful only if your wallet can cover the quote’s maximum input. For a cross-chain move with lifi bridge, choose exact output when the arrival amount is the requirement; choose exact input when you need to fix how much you send.