Back to Learn

What Is a DEX Swap? Pools, Routers and Wallet Signatures Explained

A plain-language explanation of liquidity, routing, approvals, wallet signatures and on-chain settlement in a decentralized token swap.

A DEX swap is an on-chain exchange of one token for another through smart contracts. The user connects a compatible wallet, requests a quote, reviews the route and signs the transaction. The interface does not need to receive a conventional account deposit first.

This page focuses on the mechanics of a DEX swap: pools, routers, approvals, signatures and settlement. For the broader financial context, read what DeFi is and how on-chain swaps work.

What DEX means

DEX stands for decentralized exchange. Instead of a company-operated order book and custodial account being the only place where a trade happens, a DEX uses blockchain contracts and on-chain liquidity.

The Ethereum.org introduction to DeFi describes DEXs as applications that let users exchange tokens while retaining control through their wallets. This does not mean every DEX is equally safe or liquid. Front ends, contracts, tokens, approvals and routes still require verification.

The five parts of a DEX swap

1. Wallet

The wallet holds the keys used to authorize the transaction. Connecting usually shares a public address and network state. It does not move tokens by itself.

2. Token contracts

The input and output assets are identified by their contract addresses on the selected network. Symbols are labels, not unique identifiers. Always verify the token, network and contract.

3. Liquidity

Liquidity is the inventory or executable interest available to complete the trade. In an automated market maker, liquidity providers supply assets to pools. Other systems can also use market makers or signed orders.

4. Router

A router searches one or more possible paths. The route may use a direct pool, an intermediate token, a split order or another eligible source. The router prepares the transaction that the wallet will review.

5. Blockchain settlement

After the user signs, the transaction is broadcast to the network. The blockchain executes the contract calls, charges gas and records success or failure. The final token transfers can be verified with the transaction hash.

How a DEX swap works step by step

  1. Select the network. Both assets must be available on that network for a same-chain swap.
  2. Select and verify the pair. Check both contracts, not only symbols.
  3. Enter the amount. The quote depends on trade size.
  4. Receive a route. The interface estimates output from available liquidity.
  5. Review the quote. Check minimum received, price impact, fees and gas.
  6. Approve the token if required. The approval permits a specified contract to spend an ERC-20.
  7. Sign the swap. The wallet shows the on-chain action.
  8. Verify settlement. Use a block explorer to inspect the result.

Ethereum.org's token swap guide follows the same practical sequence: connect, choose the pair, enter the amount, review, confirm and verify.

Pool, route and aggregator are different

TermRole in the swap
PoolHolds or represents liquidity for a particular market
DEXProtocol or venue exposing swap functionality
RouterFinds a path through supported pools or venues
AggregatorCompares routes across multiple eligible liquidity sources
InterfaceScreen that prepares the quote and wallet request

One product can perform several of these roles. The distinction is still useful because it shows where the quote comes from and which contracts the user is approving.

Latin Link is a non-custodial liquidity aggregation interface. Its routing can consider eligible sources through OpenOcean. It does not guarantee that every token, route or venue is available, and it does not guarantee the best result on every transaction.

Why DEX quotes differ

Two interfaces can show different estimated outputs because they may search different pools, fee tiers, market makers or routes. The quote also changes with time and amount.

Evaluate:

  • estimated output;
  • minimum received;
  • explicit trading or interface fees;
  • current gas;
  • price impact;
  • route and token contracts;
  • approval scope.

The best comparison uses the same pair, amount, network and moment. See how to compare liquidity routes.

DEX swap costs

Network gas

Gas pays the network to process the transaction. A failed transaction can still consume gas because the network performed computation.

Trading and interface fees

Pools, protocols and interfaces can charge disclosed fees. Their presence and amount depend on the route.

Price impact

Price impact reflects how the order changes the execution price against available liquidity. Larger orders in shallow markets generally create more impact.

Slippage

Slippage is the difference between the quoted and executed result as the market changes. The tolerance defines how much adverse movement the transaction accepts before reverting.

Read slippage, price impact and gas before modifying tolerances.

Approval and swap are separate actions

Many ERC-20 swaps require an approval. It gives a specific spender permission to use a token within an allowance. The later swap calls the router or exchange contracts.

Review token, spender and amount. An unlimited approval can remain active after the trade. A successful approval does not mean the swap succeeded.

DEX swap vs centralized exchange trade

In a typical centralized exchange flow, the user deposits assets into an account controlled by the exchange, trades within its internal system and later requests a withdrawal. In a non-custodial DEX flow, the user signs the on-chain trade from a wallet.

This changes the responsibilities. The user must manage keys, verify networks and contracts and understand irreversible transactions. Non-custodial does not mean risk-free.

DEX swap vs bridge

A same-chain DEX swap exchanges assets on one network. A bridge moves value or messages between networks. A cross-chain swap can combine both processes. See bridge vs swap before choosing a cross-chain route.

Common DEX swap risks

  • fake domains and phishing;
  • imitation token contracts;
  • malicious or excessive approvals;
  • smart-contract defects;
  • low liquidity and high price impact;
  • unsuitable slippage settings;
  • wrong network or token representation;
  • signing a transaction that differs from the displayed quote.

Frequently asked questions

Does connecting a wallet give a DEX control of my funds?

Connecting normally shares a public address. Control changes only through transactions or permissions the user signs. Review every request.

Does a DEX hold my tokens?

In a non-custodial swap, the user authorizes contract interactions from the wallet. Some protocols temporarily route tokens through contracts during execution, so inspect the transaction rather than relying on a slogan.

Why do I need gas before receiving the output token?

The network charges gas to execute the swap. The gas asset must normally be available before the transaction can run.

Can a DEX swap fail?

Yes. Slippage limits, insufficient gas, changed liquidity, token behavior or contract errors can cause failure.

No. Latin Link is non-custodial and cannot reverse a confirmed blockchain transaction or recover a user's private keys.

01/Next step

Compare alternatives

Review platforms by model, network, routing and use case.

View alternatives

Review the route

Compare output, gas, slippage, price impact and minimum received before signing.

How to compare routes

Check a current quote.

Latin Link can use OpenOcean routing to compare eligible sources. The route depends on the pair, network, amount and time.