BTC $50,968.10 −8.79%ETH $1,548.81 −1.32%SOL $66.94 −0.04%S&P 500 7,405.98 +0.06%Nasdaq 100 27,611.00 +0.89%Gold $3,664.00 −0.36%Brent $91.45 +0.32%EUR/USD 1.0807 −0.25%DXY 105.26 +0.36%US10Y 5.08% 0.00%NVDA $150.57 −0.76%TSLA $424.76 +0.04%
FREEKONOMIST
GuideDeFi and on-chainAdvanced

How to use a DEX safely: wallet, contract, slippage, approvals, MEV

A decentralized exchange has no support desk and no undo button. Here is what to check before a swap so your tokens do not end up with scammers or bots.

5 min read · Updated: 2026-10-19

In short

A DEX is an exchange made of smart contracts: you swap tokens straight from your wallet, usually through a liquidity pool and an AMM. Nobody vets the tokens, and nobody refunds you if you make a mistake.

The main risks:

If you are not yet comfortable with a wallet and gas, start with how to buy your first crypto and come back later.

Step 1. Set up the wallet

  1. Create a separate "working" wallet for DeFi and keep only what you need for current activity in it. Keep your main savings at another address, ideally on a hardware wallet.
  2. Install the wallet extension only from the link on its official site. Never enter your seed phrase anywhere except the wallet itself during a restore.
  3. Hold a little of the network's native coin (ETH, BNB, SOL and so on) for gas.
  4. Open the DEX from a bookmark. Links from search ads, DMs and comments are a common source of phishing.
  5. When connecting the wallet, check the site address and which network you are on.

Step 2. Check the token contract

Anyone can create a token with the name and ticker of a popular coin. Only the contract address tells the real one apart.

  • Take the contract address from the project's official source (website, docs) or a major coin data aggregator, and confirm it in a block explorer.
  • Paste the address into the DEX token selector instead of picking by name from search.
  • Look at the contract's age, the number of holders, trading volume and pool liquidity. A new token with tiny liquidity is high risk.
  • Check whether the contract code is verified and whether it had an audit. An audit lowers risk but does not guarantee safety.

For new tokens, run a honeypot scanner and check the buy and sell tax. If you cannot sell or the tax is 50%+, it is a trap.

Step 3. Set slippage tolerance

Slippage tolerance is how much worse than expected the final price can be before the transaction cancels.

SituationTypical tolerance
Major pairs, stablecoinsAbout 0.1–0.5%
Regular tokens with good liquidityAbout 0.5–1%
Volatile tokens with thin liquidityHigher, but that is a warning sign

Too low, and transactions often fail while gas is still charged. Too high, and you let bots and the market take the difference.

Example: you swap $1,000 with 10% tolerance. In the worst case you get $900 of tokens and the transaction still goes through. At 0.5%, the worst case is $995.

Also watch the price impact: if your trade alone moves the price several percent, the pool is too small for that amount. A DEX aggregator can help by splitting the swap across pools.

See it in a pictureTap to play the animation
Swapping $1,000Tolerance 10%at least $900Tolerance 0.5%at least $995Too low: the swap fails, gas is still paidToo high: bots take the differenceMajor pairs: about 0.1–0.5%Illustrative schema, numbers are made up

Slippage tolerance is the worst price you accept. At 10% a $1,000 swap can return only $900 of tokens; at 0.5% no less than $995.

Step 4. Approvals and revoking them

Before a DEX can take your tokens for a swap, you give its contract permission: a token approval. Many interfaces suggest an unlimited approval by default.

  • Where possible, set the limit to exactly the swap amount.
  • Read what you sign. A request for "setApprovalForAll", a "permit" or a signature with no clear description is a reason to stop. Permit signatures also grant spending rights, even though they look like a plain message with no gas.
  • Once a month, open an approval checker (block explorers and dedicated revoke tools have them) and revoke everything you do not need. Revoking is a transaction and costs gas.

A hacked or malicious contract with an unlimited approval can take your tokens even a year after the swap. This is how most drainers work.

See it in a pictureTap to play the animation
Your wallet1 000 USDTDEX contractasks for accessUnlimited approvalcan take it all, even a year laterExactly the swap amount100 USDT, the rest stays safeRevoke unused approvals monthlyRevoking is a transaction and costs gasIllustrative schema, numbers are made up

An unlimited approval lets the contract take all of that token at any time. An approval for exactly the swap amount only puts that amount at risk.

Step 5. MEV and sandwich attacks

MEV is profit that validators and bots make by reordering transactions in a block. The biggest threat to you is a sandwich: a bot sees your buy in the mempool, buys right before you, you buy at a higher price, and the bot sells straight after.

  • Keep slippage tolerance as low as works: that is exactly what a sandwich takes.
  • Use a protected RPC or an MEV-protection mode if your wallet or the DEX offers one. The transaction goes straight to block builders and never shows up in the public mempool.
  • Split large swaps or route them through an aggregator.
  • On layer 2 networks MEV works differently, but the risk is not zero.
See it in a pictureTap to play the animation
Order in the block1. Bot buysprice ↑2. You buyyou pay more3. Bot sellsbot profitsProtection:low slippage, a protected RPCsplit large swapsIllustrative schema, numbers are made up

A bot sees your buy in the mempool, buys right before you and sells right after. You pay more, and the difference goes to the bot.

Scam tokens and other traps

  • Honeypot. You can buy but not sell, because the contract blocks sales.
  • Rug pull. The creators pull the liquidity from the pool and the price drops close to zero.
  • Unknown airdropped tokens. Tokens you never bought appear in your wallet with a site "to claim your reward". Do not touch them and do not connect your wallet to that site.
  • Fake support and "wallet sync". No service ever needs your seed phrase.
  • Pump and dump in chats. "Buy now before it's too late" is the classic line.

If in doubt, do not sign. A missed opportunity costs less than an empty wallet.

Questions and answers

What slippage should I set on a DEX?

For major pairs and stablecoins, 0.1–0.5% is usually enough, and 0.5–1% for liquid tokens. If a swap only goes through at 5–10%, that points to thin liquidity or a tax in the contract, so better stop.

How do I revoke a token approval?

Open the approval checker in your network's block explorer or a revoke tool, connect your wallet, find the approvals you do not need and revoke them. Each revoke is a separate transaction that costs gas.

How can I tell a real token from a fake one?

Only by the contract address. Take it from the project's official site, confirm it in a block explorer, and paste the address into the DEX instead of searching by ticker.

What is a sandwich attack?

A bot buys a token right before your trade and sells right after, pocketing the price difference within your slippage tolerance. Low slippage and MEV protection help.

Read next