Uniswap

Uniswap Swaps Settle Onchain and Leave Records You Can Verify

Uniswap lets a wallet exchange tokens through pool-based transactions or signed orders, with successful execution recorded onchain. A quote is only a proposed route. The first commitment may be an approval, permit, signed order, or submitted swap transaction, depending on the route. The reliable result is the onchain receipt, token balance changes, and eventual network finality, not a spinner or success message by itself. Costs can come from pool fees, network execution, and price movement, depending on the route.

From Quote to Pool Execution

A Uniswap quote connects a specified input and output to one or more possible execution paths. The router reads available liquidity, estimates the output, and considers pool fees and network costs. It may select one pool, use intermediate tokens, or split the trade across several paths. Because pool balances and market conditions can change before execution, the quote does not reserve that price.

Automated market maker pools execute swaps against deposited liquidity rather than matching a buyer with a seller. Uniswap v2 uses paired reserves and a constant-product relationship. Uniswap v3 and v4 can concentrate liquidity within selected price ranges. A larger trade relative to usable liquidity moves the pool price further, which raises price impact and can reduce the output.

Execution applies the route to the pool state that exists when the transaction runs. An exact-input swap normally includes a minimum acceptable output, while an exact-output swap limits the maximum input. If the route cannot satisfy that boundary, the call reverts instead of settling on worse terms. Routes can draw on v2, v3, or v4 liquidity, and some interface swaps may use an auction-based UniswapX order filled by a third party.

The Normal Swap Path and Its Proof

The normal path separates preparation, authorization, execution, and verification. Before signing, the wallet network, token contract addresses, input amount, expected output, and minimum received should all describe the intended trade.

The Normal Swap Path and Its Proof: A block explorer provides the durable record when an interface is slow to refresh.; The record should show the same wallet, network, contract interaction, status, and token movements expected from the trade.; A completed approval followed by no swap transaction explains many cases in which the input balance remains unchanged.

Open full-size image

A token approval changes an allowance; it does not complete the exchange by itself. Preparation may use an onchain approval, a signed permit, or a batched action, depending on the token, wallet, and route. The permission should match the intended token and spender. An unlimited allowance creates a broader commitment than approving only the amount needed for the task.

A submitted onchain swap receives a transaction hash and usually enters a pending state. Inclusion in a block produces a success or failure status. Success means the call completed without reverting, while failure means the requested state change did not settle. A failed call can still consume a network fee because validators processed it.

A block explorer provides the durable record when an interface is slow to refresh. The record should show the same wallet, network, contract interaction, status, and token movements expected from the trade. A completed approval followed by no swap transaction explains many cases in which the input balance remains unchanged.

When Is a Swap Truly Final?

Transaction finality arrives after successful execution and the confirmation standard of the selected network. An interface may show success as soon as a block includes the transaction, but inclusion and finality are different states. Additional blocks or network-specific consensus checkpoints reduce or eliminate the possibility that the accepted history will change.

A transaction reaches finality only when the network's consensus rules secure the block that contains it. Layer 2 systems may distinguish local confirmation from settlement on another chain. Crosschain swaps add a destination-side record, so a successful source transaction alone may not prove that the destination asset arrived. The relevant completion evidence is the final state on every network involved.

A Hypothetical Check of Swap Reversibility

Every amount, balance, output, and interface state in this example is hypothetical. A reader has 815.5 units of an input token and receives a quote for 247.5 output units, with a minimum of 245.0. The output balance starts at 12.5 units.

Compatibility comes first. Each token contract used by this hypothetical onchain route must be deployed on the selected network, the wallet must be connected to that network, and enough of the network's fee token must remain for execution. Before broadcasting anything, the reader can stop without creating a swap state change.

The reader approves only the required input, checks that the approval succeeded, and then submits the swap. A transaction hash identifies the instruction, while a network or explorer status shows whether it was received or included. A pending transaction may be replaceable or cancellable on some networks, but validators may include the original before the replacement.

Suppose the successful receipt shows that the route delivered the quoted 247.5 units. The output balance then rises from 12.5 to 260.0, confirming that 247.5 units arrived. If the interface still says pending while the onchain record shows success, resubmitting would risk creating a second trade rather than repairing the display.

Costs and Execution Boundaries

Swap cost combines separate mechanisms. The pool charges a liquidity provider fee from the input amount, and the network charges for processing an onchain transaction. Price impact comes from changing pool balances during execution. These costs have different recipients and can move independently, so one percentage does not describe the complete trade.

Slippage protection bounds the difference between the quoted and executed amounts. For an exact-input swap, the minimum output sets the point at which the transaction must revert. A deadline can also prevent a stale transaction from executing later. Neither setting removes price movement; each defines when changed conditions are no longer acceptable.

Token transfer fees, unusual token code, custom v4 hooks, or insufficient network funds can also change or block execution. An onchain failure generally consumes network resources even when no swap output arrives. Signed-order routes can assign execution costs differently, so the review screen and resulting record must be read in the context of the selected route.

Liquidity Roles Across Protocol Versions

Protocol versions offer different ways to organize liquidity. Uniswap v2 pools distribute liquidity across the full price curve. Uniswap v3 introduced concentrated positions with chosen price ranges. Uniswap v4 retains concentrated liquidity while allowing hook contracts to run custom logic at defined points in a pool's lifecycle.

Liquidity providers supply the assets that pool-based swaps use and receive a share of applicable pool fees. In concentrated-liquidity versions, a position generally earns fees only while its range is active. The position also changes asset composition as the market price moves, so fee income does not remove price exposure.

Adding liquidity, collecting fees, and removing liquidity are distinct actions with their own records. A wallet should reconcile the position identifier, deposited amounts, collected amounts, and returned assets after each transaction. Removing a position is the liquidity provider's exit path; it is separate from reversing any swaps that the pool previously executed.

UNI has a governance role within the ecosystem, while swaps rely on the selected network, pools, routes, and permissions. Holding UNI is not what makes a trade executable. The transaction succeeds only when the input balance, any required allowance, route constraints, liquidity, and network execution requirements are satisfied together.

Reconciliation and Exit States

Reconciliation compares the starting record with the final onchain state. For an onchain route, no transaction hash usually means no swap transaction was broadcast. A signed-order route instead begins with an order identifier and gains an onchain settlement record only if a filler executes it. A pending hash means execution remains unresolved, a failed receipt means the state change reverted, and a successful receipt calls for checking token transfers and balances. Once final, a swap cannot be edited or undone; exchanging back requires a new transaction under new pool conditions, fees, and network costs.

Quick answers about Uniswap

Does Uniswap Require an Account or a Custodial Deposit?

The Uniswap Protocol does not require depositing tokens into a centralized exchange account. A compatible wallet authorizes interactions with protocol contracts while its holder controls the signing keys. Interfaces can offer different connection methods, but the swap itself settles through the selected onchain route. The wallet must still hold the input token and any network asset required for transaction costs.

Can a Token Approval Be Revoked After a Swap?

A continuing token allowance can usually be reduced or revoked through a wallet or approval-management transaction. Revocation is a separate onchain action and normally has its own network cost. A permit may instead have an expiry or amount limit. Revoking an allowance does not reverse a completed swap, but it can prevent the approved spender from using the remaining permission later.

Is UNI Required to Make a Swap?

UNI is not generally required to exchange tokens through the protocol. The required fee asset is determined by the selected blockchain, while the swap needs the chosen input token and sufficient liquidity or a fillable order. UNI serves a governance function. Gas sponsorship or filler-based execution can alter who pays an execution cost, but holding UNI does not establish transaction eligibility.

How Can Matching Token Names or Symbols Be Distinguished?

The contract address and network distinguish tokens that share a name or ticker. A symbol is display text and is not a unique identifier, so selecting by symbol alone can point to an unrelated or malicious contract. Compare the contract shown in the wallet, route preview, and transaction record before granting an allowance. The same address on a different network does not automatically represent the same asset.

Are Wallet Signatures the Same as Paid Blockchain Transactions?

A wallet signature is not always an onchain transaction. A permit or signed order can authorize later action without immediately paying a network fee or changing balances. An approval transaction, swap transaction, or filler settlement creates a separate blockchain record. Read what the wallet is asking to sign, because an offchain signature can still grant meaningful permission even though it has no transaction hash yet.

When Should Part of a Network Token Remain Unswapped?

Part of the balance should remain when that token pays the selected network's execution costs. Attempting to swap the entire balance can leave too little for the swap transaction, a replacement, or later account activity. The required amount changes with network demand and transaction complexity, so an estimate is not a permanent constant. On a filler-sponsored route, the filler may pay the execution cost and account for it in the quoted price.

What Can a Uniswap v4 Hook Change?

A v4 hook can add pool-specific logic around actions such as swaps, liquidity changes, or fee calculation. The exact behavior comes from the deployed hook code and configuration, so two v4 pools can impose different conditions even when they contain similar assets. Hook selection therefore belongs in the route review, especially when it changes fees, access rules, or the way output is calculated.

Do Concentrated Liquidity Positions Earn Fees While Out of Range?

A concentrated position generally stops earning swap fees while the market price sits outside its selected range. Its assets remain in the position, and it can become active again if the price returns to that range. The provider may also remove or reposition the liquidity through new transactions. Collected fees do not eliminate changes in asset composition or the risk of loss relative to simply holding the tokens.

Updated: