Uni swap

Uni swap is a Wallet Quote Check and Failed Swap Recovery Workflow

Uni swap is the wallet user's transaction workflow for checking Uniswap's quoted output, reviewing its route, confirming the intended permissions and transaction, and recovering cleanly when an Ethereum swap stalls or reverts. The decisive checks are the token contracts, active chain, input amount, estimated and minimum output, liquidity path, network cost, and wallet prompt type. After submission, the transaction hash and receipt - not the interface animation - show whether settlement occurred and whether a retry requires a fresh quote.

Uniswap Auto Router Versus 1inch Pathfinder Before Signature

In that setup, Uniswap Auto Router and 1inch Pathfinder solve the same pre-signature problem, but they search different liquidity universes and therefore present routes with different dependencies.

Auto Router evaluates three Uniswap protocol generations - v2, v3, and v4 - then compares direct, multihop, and split paths after pool fees and network cost. A direct ETH-to-USDC path touches one pool; an indirect route might pass through WETH or another liquid token. Pathfinder can divide the same order across Uniswap, Curve, Balancer, and other supported venues. The decision dimension is execution scope: the Uniswap route remains inside its pool ecosystem, while 1inch aggregates across protocols. A 0x quote follows the aggregator model too, with its own source set and allowance target. These quotes are snapshots, not promises of future state.

Compare final output after network cost, not the nominal exchange rate. A wider search is useful only when its additional calls improve the amount reaching the wallet.

Quote Fields That Must Match the Intended Trade

A Uni swap quote is ready for confirmation only when its token identities, amounts, route, protections, and network charge all match the trade the wallet owner intends.

Start with both token contract addresses and the active network, because a symbol such as USDC appears on several chains and does not identify one contract. Read the sell amount, estimated receive amount, minimum receive amount, price impact, liquidity provider fee, and network cost as separate fields. The interface's default slippage limit is 0.5%, while price impact measures movement caused by the order itself. Increasing tolerance widens the acceptable execution band; it does not deepen a pool. Refresh the quote whenever the route, input amount, wallet account, or network changes. The new quote may select a different pool combination immediately.

Deadline is another executable parameter. The default is 30 minutes, and the setting accepts one minute through three days, or 4 320 minutes.

The wallet's transaction request should repeat the selected chain, input value, and destination contract. If the prompt switches to an approval or Permit2 signature, finish that stage before treating the displayed swap quote as submitted. The detail is recorded in practice.

Network Identity Changes the Settlement Boundary

The selected network determines the chain ID, gas asset, settlement system, block explorer, and token contract the wallet must use for the quoted swap.

Seven representative Uniswap network options have distinct identifiers: Ethereum is 1, Unichain is 130, Arbitrum One is 42161, Base is 8453, OP Mainnet is 10, Polygon PoS is 137, and BNB Smart Chain is 56.

Network Identity Changes the Settlement Boundary
Network Option Gas Asset and Settlement Security Tier
Ethereum ETH; native settlement Layer 1 proof of stake
Unichain ETH; Ethereum settlement Stage 1 optimistic rollup, Layer 2
Arbitrum One ETH; Ethereum settlement Optimistic rollup, Layer 2
Base ETH; Ethereum settlement Optimistic rollup, Layer 2
OP Mainnet ETH; Ethereum settlement Optimistic rollup, Layer 2
Polygon PoS POL; Ethereum checkpoints Proof-of-stake sidechain
BNB Smart Chain BNB; native settlement Layer 1 Proof-of-Staked-Authority

A route never turns a same-chain swap into a bridge. ETH on Base and ETH on Ethereum occupy different state systems, even though both use ETH for gas. MetaMask, Rabby, and the Uniswap Wallet expose the active chain before signing. Match that chain with the quote, then confirm the output token contract on the same network. Polygon PoS uses POL for network cost, while BNB Smart Chain uses BNB. A balance on another chain does not fund this transaction. This comparison fixes the settlement boundary before any allowance or signature leaves the wallet. It also selects the correct explorer for later verification.

Wallet Prompts Separate Approvals, Signatures, and Swaps

Wallet prompts separate token spending permission from trade authorization, so each prompt must be classified as an ERC-20 approval, Permit2 signature, or executable swap transaction.

Selling native ETH through a standard pool route needs zero ERC-20 approvals. Selling an ERC-20 token for the first time through Permit2 introduces one onchain approval, one offchain Permit2 signature, and one onchain swap transaction. The Uniswap app limits its Permit2 signature approval to 30 days, after which it requests another signature. A signature itself has no network cost, while the approval and swap transactions do. Permit2 records the token, spender, amount, and expiration scope the signature authorizes. Read those fields in MetaMask, Rabby, Ledger, or another connected wallet before continuing. The spender field should match the expected integration path.

An exact ERC-20 approval limits the allowance to the intended amount. A larger allowance reduces repeat approvals, but it also remains available until changed or exhausted.

Do not sign again merely because the interface appears quiet; first check whether the earlier request reached the wallet or chain.

Pending Transactions Require Nonce-Aware Recovery

A pending swap requires transaction-hash and nonce checks before any retry, because a second transaction does not bypass an older unresolved nonce from the same account.

Search the address or transaction hash in Etherscan or the explorer for the selected network. If no hash exists, the request was not broadcast; reconnect the wallet, refresh the quote, and submit once. If a hash shows pending, use the wallet's speed-up or cancel function. Both actions replace the original with another transaction carrying the same nonce and a higher effective fee. Resolve the smallest pending nonce first when several transactions queue. An EIP-1559 Type 2 transaction exposes two fee caps: max fee per gas and max priority fee per gas.

Wait for the replacement receipt before sending the swap again. Once either transaction lands, the shared nonce is consumed, and the competing transaction becomes invalid for that account sequence. Cancellation itself pays network gas.

Failed Receipts Narrow the Retry Path

A failed receipt means the chain executed the call and reverted its state changes, so recovery starts with the failure class rather than blind resubmission.

Ethereum transaction receipts use status 0 for failure and status 1 for success. A status 0 swap does not transfer the quoted output, yet it still consumes gas for work already performed. Requote before retrying, then handle the relevant cause: replenish native gas, accept a fresh market quote, extend an expired deadline, or reduce an amount whose price impact exceeds the chosen tolerance. Uniswap v3 and v4 routers do not support rebasing, reflection, or debasing tokens. An interface-level expected-failure warning blocks submission before gas is spent. That distinction determines whether network cost was incurred.

Output Verification Uses Receipts, Logs, and Balances

Output verification combines the transaction receipt, ERC-20 Transfer logs, wallet balance changes, and the exact destination address instead of relying on a success banner alone.

On Ethereum, a block slot lasts 12 seconds, and 32 slots form a 6.4-minute epoch; inclusion and finality are separate milestones. The receipt proves execution status and records the block, gas used, and emitted logs. ERC-20 Transfer events identify the token contract, sender, recipient, and raw value. Convert the raw value with the token's declared decimals: native USDC uses 6 decimal places, while WETH uses 18. Then compare the credited amount with the quote's minimum receive field, allowing only the route's declared behavior. Record the hash for later accounting.

If the wallet omits the asset, add the correct contract to its token list and switch to the settlement network. The onchain balance remains the authoritative amount.

Routing Under the Hood Explains Quote Movement

Routing mechanics explain why two consecutive Uniswap quotes differ even when the input amount stays fixed, because reserves, fee tiers, gas estimates, and available paths move independently.

The Auto Router compares direct, multihop, and split execution across Uniswap v2, v3, and v4 liquidity. A direct path uses one pool and one pool fee. A two-hop path uses two pools, so the router accepts it only when better pool pricing offsets the extra fee and gas. Uniswap v2 defines one 0.30% pool tier. Uniswap v3 defines four static tiers - 0.01%, 0.05%, 0.30%, and 1.00% - while v4 permits many static or dynamic configurations. The chosen route is an execution plan tied to the current state; reopening the review should trigger a fresh comparison.

Route visibility turns a changing quote into an explainable decision: check pools, hops, splits, final output, and gas before the wallet confirmation.

Key questions about Uni swap

Does reconnecting a wallet invalidate a prepared Uni swap quote?

Reconnecting alone does not alter onchain state, but the interface should obtain a fresh quote before signing. A new session may select another account, chain, route, deadline, or recipient. Compare those fields again, especially the token contracts and minimum received. Any Permit2 signature already issued remains governed by its own amount, spender, nonce, and expiration rather than by the browser connection.

When should the swap deadline be extended beyond 30 minutes?

Extend the deadline only when the selected network needs more time to include a correctly priced transaction. A longer window keeps the call executable while market state continues changing, so refresh the quote and review minimum received first. The interface accepts deadlines from one minute through three days. Raising the fee cap addresses slow inclusion more directly than leaving an old quote executable for hours.

Is network gas charged when the interface predicts a failure?

No network gas is charged when preflight simulation stops the swap before broadcast. Once a signed transaction reaches the chain and receives status 0, the sender pays for computation performed before the revert. An unfilled UniswapX order also differs from an onchain revert because the signed order may expire without a swap transaction from the user. Check for a transaction hash and receipt to classify the event.

Why does a retry ask for another Permit2 signature?

A retry requests another Permit2 signature when the earlier authorization expired, used a different spender or amount, or no longer matches the new quote. The Uniswap app's Permit2 signature window lasts 30 days, although each signed message carries its own scope. Signing has no network cost, while changing the underlying ERC-20 approval does. Read the token, amount, spender, nonce, and expiration again before approving the retry.

Should the Max button be used when selling ETH?

The Max button is suitable only when the transaction retains enough ETH for network gas. Native ETH serves both as the sell asset and the Ethereum, Base, Arbitrum One, OP Mainnet, and Unichain gas asset, so the full displayed balance is not automatically spendable. Let the interface reserve gas, then inspect the wallet's final value and fee cap. ERC-20 sales still require native gas unless the route explicitly provides sponsorship.

Are token approvals consumed by a reverted swap?

A fully reverted EVM swap restores token allowances and Permit2 nonce changes made inside that transaction. The separate ERC-20 approval completed earlier remains onchain, because it was a different transaction with its own successful receipt. A canceled pending swap also does not revoke that earlier allowance. Check the token's allowance after recovery, and change it only when its amount or spender no longer matches the next intended trade.

Could a hardware wallet hide route details during confirmation?

A hardware wallet may display a contract interaction without decoding every Universal Router command, pool hop, or split. Review those route details in the connected interface before opening the device prompt, then match the chain, account, value, and destination the device does show. Ledger support, wallet software, and transaction decoding differ by integration. Limited decoding does not change the calldata, so the pre-signature quote review remains essential.