How Decentralized Exchanges Work for Your Swaps
A DEX swaps crypto from your own wallet through smart contracts, with no account. You usually pay gas, approve if needed, and keep US tax records.

On this page
- A reverted swap usually still costs gas.
- Open token approvals can drain a wallet.
- US tax treats crypto swaps as taxable.
- DEX records are public, not anonymous.
Your wallet signs every transaction, so check the network, token contract, and fees before you confirm.
What Does a DEX Do?
A DEX is a set of smart contracts that let people swap tokens without a company holding the coins. You open no account and send funds to no exchange wallet. The contract moves tokens by its code, and the trade is public and permanent.
What You Need Before You Start
You need a self-custody wallet, which holds your keys. Fund it with tokens on a supported network, and keep native token for gas. Most swaps cost gas, though some DEXs or networks support gasless swaps, and a DEX may add a liquidity provider fee. Ethereum smart contracts, launched in 2015, made this possible.
Step-by-Step DEX Swap Walkthrough
Every check comes before the confirmation. A swap is final once confirmed.
- 1Connect Your WalletOpen the DEX and connect your wallet. Check the address.
- 2Select the TokensPick the token you have and the one you want. Most single-chain DEXs need both on the same network; cross-chain swaps need a bridge.
- 3Approve if RequiredFor an ERC-20 style token, the contract needs an allowance first. Native-token swaps do not. This costs gas.
- 4Check Slippage, Gas, ConfirmSlippage caps how much the price can move before the swap fails. Price impact shows how much your trade moves the pool price. Check the gas fee and the amount you receive. A reverted swap still costs gas; one rejected before broadcast does not.
After the Swap: Records and Safety
The IRS treats crypto as property, so a swap is taxable in the US. Save the transaction hash, the date, and each token's value at the swap. Revoke token approvals you no longer need, because an open approval can let a scam contract drain your wallet.
Frequently asked questions
The receiving network usually cannot see those tokens, so they can be lost.
Sometimes. You can replace it with a higher-fee transaction using the same nonce. Otherwise you wait, and gas is paid for the mined transaction.
DEXs may use different liquidity pools or order books, so prices can differ.





