Swap Tokens on Uniswap
Uniswap v4 has been live on Ethereum mainnet since Q1 2026 and by mid-2026 runs on more than fifteen networks. For a swapper, the important consequences are cheaper routing, hook-enabled pools with unusual fee behaviour, and an interface that increasingly routes you through signed orders rather than raw transactions.
The mechanics of a swap have not changed: you give one token, you receive another, and the price you get depends on pool depth and on who else is transacting in the same block. What has changed is the plumbing underneath, and two parts of it directly affect your execution — v4's architecture and UniswapX's intent-based routing.
This guide covers the swap itself and the two things that actually determine whether you got a good fill: slippage settings and MEV exposure. It also covers what to do when a swap reverts, which is the single most common thing that goes wrong.
What you'll need (prerequisites)
- Self-custodial wallet (MetaMask, Rabby, etc.)
- ETH or native gas token
- Tokens to swap tokens with
- Familiarity with transaction approvals
What changed in v4, and why UniswapX matters more than the pool
Uniswap v4 replaced the per-pool contract model with a singleton that holds every pool in one contract, plus flash accounting that nets balances at the end of a transaction instead of moving tokens at every hop. Multi-hop routes therefore cost dramatically less gas than they used to. On top of that sit hooks: contracts that inject custom logic before or after a swap, a deposit or a fee accrual, enabling on-chain limit orders, volatility-responsive dynamic fees and gated pools.
Hooks are the part to be careful about. A hook can legitimately implement a dynamic fee that rises with volatility — which means the fee you pay is not necessarily the fee tier you saw a minute ago. Reputable aggregators simulate hook-enabled pools before routing through them; you should read the quoted output amount rather than assuming a fixed fee tier.
UniswapX is the other half. Rather than broadcasting a transaction, you sign an off-chain order; a network of fillers competes in a Dutch auction to execute it, and a Reactor contract verifies and settles the fill. Because your order never sits in the public mempool as an executable transaction, the sandwich surface disappears, and MEV that would have been extracted is instead returned to you as price improvement. Fills typically land within about a block.
Note also that Uniswap governance turned on protocol fees under the UNIfication programme, routing protocol-level fees into a UNI burn mechanism. That affects LP economics and UNI holders more than it affects swappers, but it is the reason fee discussions around Uniswap changed tone in 2026.
Recommended for this tutorial
Tools and accounts referenced in the steps below:
Step-by-step
-
Step 1: Open the official interface from your own bookmark
Fake Uniswap front-ends bought through search ads are a persistent problem, and they are effective precisely because the real flow involves approving token allowances. Type the address once, bookmark it, and never navigate there from a link you did not create.
-
Step 2: Connect your wallet and confirm the network
Connect, then check the network selector matches the chain your tokens are on. Uniswap v4 is live across Ethereum, Unichain, Base, Arbitrum, BNB Chain, Polygon and others — and the same ticker on two chains is two different assets. Wrong-network confusion is the most common source of "my balance is missing".
-
Step 3: Select the tokens by contract address
For anything outside the top of the market, paste the token's contract address rather than choosing from search results. Verify it against the project's own website or its verified page on the block explorer. This one habit prevents the most expensive mistake available to a DEX user.
-
Step 4: Enter the amount and read the output, not the rate
The quoted output amount already includes pool fees and expected price impact. Compare that number against another venue or aggregator. Check the price-impact figure explicitly: a large impact means your trade is big relative to the pool, and splitting it into smaller pieces or routing through an aggregator will usually net you more.
-
Step 5: Set slippage — or leave auto-slippage on
Uniswap's auto-slippage adjusts the tolerance dynamically based on the pair and conditions, and for most trades it is a better default than a number you picked once and forgot. If you set it manually, keep it as tight as will execute. A wide tolerance on a thin pair is a defined, extractable profit for a sandwich bot.
-
Step 6: Approve the token, preferring Permit2
Selling an ERC-20 requires an allowance. Uniswap uses Permit2, which lets you grant a signed, scoped, time-limited approval rather than a standing unlimited allowance on the router. Take that option where offered. Where you must send a classic approve, approve the amount you are trading.
-
Step 7: Sign the order or send the swap
If the route uses UniswapX you will sign an order rather than broadcast a transaction, and you will not pay gas directly — the filler does, and prices it into your quote. If it is a direct pool swap you sign a transaction and pay gas yourself. Either way, check the wallet prompt shows the tokens and amounts you expect before confirming.
-
Step 8: Verify the fill on-chain and record it
Open the transaction on the explorer. Confirm the received token's contract address matches what you intended and the amount is inside your slippage band. Save the hash: in most jurisdictions a swap is a disposal of the token you sold, and you will need the date, amounts and fair value at the time.
What a swap costs
Three components. First, the pool's swap fee, which in v4 may be a fixed tier or a hook-driven dynamic fee — so read the quote rather than assuming. Second, price impact, which is a function of your size against pool depth and is not a fee anyone charges you but is real money you do not receive. Third, network gas, which on a v4 multi-hop route is substantially cheaper than the equivalent route was under v3 thanks to flash accounting, and cheaper again on L2s than on mainnet.
UniswapX fills change the shape of this: the filler pays gas and prices it into the rate, and MEV that would otherwise have been extracted from you is returned as price improvement. For small trades on expensive chains, an intent fill is frequently the cheaper path even though the headline rate looks slightly worse.
Uniswap's UNIfication programme activated protocol fees, with protocol revenue flowing into contracts that require an equivalent value of UNI to be burned before the fees can be claimed. As a swapper you do not pay this separately — it comes out of the fee stream — but it is worth knowing that the fee split behind the scenes changed in 2026 and that a vote to extend protocol fees to a portion of v4 pools was on the ballot in late July 2026.
Security pitfalls
- Contract address over ticker. Anyone can deploy a token called anything. The address is the identity.
- Bookmark the interface. Search-ad clones of DEX front-ends are common and are designed to harvest approvals.
- Prefer Permit2 or exact approvals. Then revoke stale allowances periodically — see revoking token approvals.
- Keep slippage tight. A wide tolerance is not a convenience setting, it is the size of the loss you have agreed to accept.
- Be wary of unfamiliar hook pools. A hook can implement dynamic fees or transfer restrictions. If the quote for a pool looks structurally odd, route through an aggregator that simulates it instead.
- Check for transfer taxes. Fee-on-transfer tokens deliver less than quoted and sometimes cannot be sold at all. Test with a small amount first.
- Sign from hardware for size. A swap large enough to matter deserves a hardware signature; see setting up a Ledger.
Troubleshooting
- Swap reverted. Usually slippage exceeded mid-block, an unset allowance, or insufficient gas. Raise slippage slightly, confirm the approval, retry. The gas from a reverted transaction is not recoverable.
- Price impact warning on a small trade. The pool is thin. Route through an aggregator, split the trade, or accept that this token cannot absorb your size.
- Tokens not visible after a successful swap. The wallet has not indexed the token. Add the contract address manually and confirm the balance on the block explorer.
- UniswapX order not filled. No filler found it worthwhile at your terms. Wait for the auction to move, adjust the size, or fall back to a direct pool swap.
- Stuck pending transaction. Replace it at the same nonce with a higher fee, or cancel with a zero-value self-transfer at that nonce. Everything behind it is blocked until it clears.
- Received a different token than expected. You selected a lookalike contract. Nothing on-chain can undo this; treat the balance as worthless and verify addresses next time.
- Bridged to the wrong chain first. Uniswap's interface supports cross-chain swaps through an Across integration, but if you have already moved funds to a chain where the pool does not exist, you must bridge back before you can trade.
FAQ
Is Uniswap v4 live and do I need to do anything differently?
v4 launched on Ethereum mainnet in Q1 2026 and by mid-2026 runs on more than fifteen networks including Unichain, Base, Arbitrum, BNB Chain and Polygon. For a swapper the interface flow is unchanged; the differences are cheaper multi-hop routing thanks to flash accounting, and pools that may carry hook-driven dynamic fees. Read the quoted output amount rather than assuming a fixed fee tier.
What is UniswapX and why would I use it?
UniswapX replaces broadcasting a transaction with signing an off-chain order that fillers compete to execute in a Dutch auction, settled by a Reactor contract. You pay no gas directly, your order is not exposed in the mempool, and MEV that would have been extracted is returned to you as price improvement. Fills typically settle within about a block.
How should I set slippage tolerance?
Auto-slippage is a reasonable default because it adapts to the pair and current conditions. If you set it by hand, use the smallest value that reliably executes. Too tight and the transaction reverts and you lose the gas; too loose and you have pre-authorised a sandwich bot's profit.
What are hooks, and are they risky?
Hooks are contracts attached to a v4 pool that run custom logic around swaps, liquidity events or fee accrual — used for on-chain limit orders, volatility-responsive fees, custom oracles and gated pools. They are a legitimate feature, but a hook you have not evaluated is unaudited code in your execution path. Routing through an aggregator that simulates hook pools before quoting is the safer default.
Can a swap be reversed?
No. On-chain settlement is final. The defences are all preventative: verify the token contract address, test unfamiliar routes with a small amount, keep slippage tight, and read the wallet prompt rather than the website before confirming.