In this guide
- Order books and automated market makers solve the same problem differently
- Pool reserves determine the available trade
- Price impact, slippage and fees need separate checks
- Front-running can turn tolerance into an opportunity
- Providing liquidity is an inventory position
- Check the token contract before checking the ticker
- Read the permission as carefully as the swap
A decentralized exchange, or DEX, lets users trade through blockchain-based systems rather than relying entirely on a centralized exchange to hold balances and settle trades. That changes who controls the assets, but it does not remove execution costs, software risks or fraudulent tokens. A swap is still a transaction with a price, a counterparty arrangement and conditions that deserve inspection.
The first distinction is between trading against orders and trading against a liquidity pool. The second is between making a swap and becoming a liquidity provider. These activities can appear in neighboring tabs, yet expose the user to different risks.
Order books and automated market makers solve the same problem differently
An order book collects instructions to buy and sell at specified prices. A limit order states the least favorable price a trader will accept; it may remain unfilled if no compatible order arrives. A marketable order can consume several price levels, producing a worse average execution than the first price shown.
Order books do not have to belong to centralized custodians. The dYdX Chain documentation, for example, describes nodes maintaining local order books and block proposers using matched trades to build blocks. Short-term orders can exist in node memory before settlement. The label decentralized does not mean that every instruction is immediately finalized onchain or that every DEX uses the same architecture.
An automated market maker, or AMM, instead lets traders transact against assets supplied to a pool. Smart contracts calculate the exchange according to the pool's rules. There need not be another person submitting a matching order at that instant, but there must be sufficient liquidity willing to trade at the resulting price.
The Uniswap profile explains a prominent AMM protocol and its governance token. A token associated with an exchange protocol is separate from the assets being swapped and from the gas currency needed to pay for execution.
Pool reserves determine the available trade
In a simple constant-product pool, two token reserves follow the relationship x multiplied by y equals k. A buyer adds one token and removes the other. The changing reserve ratio changes the next available price, so a large trade relative to the pool moves further along the pricing curve.
This is why a visible token price is not a promise that an entire order can execute there. A token can show a substantial market value while the specific pool available to a user holds little usable depth. The relevant question is what the proposed trade receives after traversing that depth.
Not all AMMs use the same formula or distribute liquidity in the same way. Concentrated-liquidity designs let providers choose price ranges. Uniswap's documentation explains that liquidity outside its chosen range becomes inactive for current trading. The total value deposited in a pool can therefore overstate how much is available near the price of the proposed swap.
Routing adds another layer. An interface may split a swap across pools or use an intermediate token. This can improve a quote, but the user should inspect the final assets, network and total costs rather than assuming the displayed pair describes every step.
Price impact, slippage and fees need separate checks
Price impact is the effect of the user's own trade on the available price. A large purchase from a shallow pool can have high price impact even if nobody else trades while the transaction is pending. It is part of the proposed execution, not simply an unexpected delay.
Slippage commonly describes the difference between the expected execution and what happens when the transaction is included. Other trades, market movement and changing liquidity can alter the outcome. Interfaces do not always present these concepts identically, so compare the quoted output and minimum received rather than relying on a label alone.
A slippage tolerance is an execution boundary, not an extra fee automatically charged by the exchange. For an exact-input swap, a minimum-output condition can make the transaction revert if it would return too few tokens. An exact-output swap can instead cap the maximum input. A deadline can reject a transaction that becomes stale.
These limits protect specific conditions; they do not identify a malicious token or establish that the starting quote is reasonable. Raising tolerance to make a transaction succeed authorizes a worse result. Lowering it can cause more failures when markets move.
Pool trading fees, interface charges where applicable, token transfer charges and network execution fees also affect the outcome. A failed onchain transaction can still consume gas for work already performed. The transaction fee guide explains why a successful swap and its gas payment are separate costs.
Front-running can turn tolerance into an opportunity
Transactions sent through a public transaction pool may be visible before inclusion in a block. Other participants can react to them, and block construction can determine execution order. Ethereum's documentation describes this broader field as maximal extractable value, or MEV.
In a sandwich attack, another trader places a trade before the user's swap and an offsetting trade after it. The first changes the price against the user; the later trade attempts to capture value from the movement. A permissive output limit can leave more room for this behavior.
Private submission routes, auctions and other execution systems can reduce particular forms of exposure, but they introduce their own dependencies and do not make any quote inherently fair. Users still need to review the execution limit and understand which service handles the transaction. Splitting an order is not a universal solution either: it can add gas costs and does not remove malicious contract behavior.
Providing liquidity is an inventory position
A liquidity provider supplies assets that traders can exchange and may receive a share of fees. Unlike a person making one swap, the provider continues holding a position whose mix of assets changes as trading occurs.
Impermanent loss measures underperformance against simply holding the original assets when their relative prices change, before allowing for any offsetting fee income. The position can rise in dollar value while still lagging that holding benchmark. The word impermanent does not promise that the difference will reverse.
As a token becomes more expensive relative to its pair, arbitrage trading generally leaves the pool holding less of that appreciating token and more of the other asset. Fee income may offset the resulting difference, partly offset it or fail to cover it. An advertised fee yield by itself does not answer which outcome occurred.
Concentrated liquidity makes the range decision important. Uniswap's guidance says an out-of-range position stops earning liquidity fees. Moving a range can involve transactions and costs. A provider who expected an unattended income stream can instead face an inventory decision during a sharp market move.
Pool contract exploits, token failures and liquidity withdrawal by major providers create additional risks. These are distinct from impermanent loss and cannot be measured by that calculation alone.
Check the token contract before checking the ticker
A token's name and symbol can be copied. For a contract-based token, the identity to verify is its contract address on the intended network. An address on one blockchain is not sufficient evidence that a similarly named asset on another is equivalent.
Start from the issuer's established official documentation and compare the complete contract address with the one selected for the swap. Use an independent blockchain explorer to inspect that contract and its transaction history. Uniswap's token documentation explains how its interface exposes token contract details, but an interface listing is not a substitute for establishing the issuer's identity.
On Etherscan, source-code verification shows a relationship between published source code and deployed bytecode. Etherscan explicitly warns that verified status does not mean a contract is safe or audited. Code can be transparent and still include harmful permissions.
Relevant questions include whether an administrator can mint more tokens, pause transfers, change transfer charges, restrict sellers or upgrade the implementation. A proxy contract requires attention to the implementation and upgrade authority as well as the address initially shown. Readers unable to assess these powers should recognize that limitation rather than treating a green verification badge as a security judgment.
A small successful purchase is not proof that selling will work later. Contract rules and administrator actions can change the practical exit, while available liquidity can disappear. Likewise, a locked liquidity position does not establish that every other part of the token is trustworthy.
Read the permission as carefully as the swap
Many token swaps require an approval allowing a contract to spend a specified asset. Approval can remain after the swap, and some signing flows grant permission through a signed message rather than a familiar approval transaction. Review the spender, asset, amount and duration where presented.
Disconnecting a wallet from an interface does not by itself revoke an onchain spending allowance. Uniswap's support material describes checking and revoking token approvals separately. Revocation affects future use of that permission; it cannot recover funds already transferred.
Before confirming, check the input token, output contract, network, minimum received, total fees and requested permissions together. The wallet custody and recovery guide explains the signing responsibilities behind that process. Self-custody gives the holder control over authorization, and each authorization determines what that control allows next.