babybuilder.xyz

What records should you keep when you use a decentralized exchange?

When you use a decentralized exchange (DEX), you are responsible for tracking every transaction yourself. Centralized exchanges send you downloadable transaction histories and tax reports. DEXs do not. The records you need to keep are the same records required for any crypto trade - but you have to gather them manually, block by block, and you must save them in a form that will survive a wallet migration or a hard drive failure.

Why DEX record-keeping is different

A decentralized exchange executes trades through smart contracts on a blockchain. No company holds your funds, no company logs your activity, and no company sends you a tidy CSV in January. If you lose your wallet seed phrase or delete a browser extension wallet without backing up its transaction history, your cost basis for every trade on that DEX may be gone permanently.

The IRS expects you to report gains and losses accurately. If you cannot prove your cost basis, the IRS may treat the full proceeds of your sale as taxable gain. Keeping the right records from the start prevents that outcome.

What to Record for Every DEX Trade

For each swap, trade, or liquidity pool interaction on a DEX, you need these six pieces of information:

  1. Transaction hash (TXID) - The unique identifier for the blockchain transaction. Every DEX trade produces at least one TXID. Note it immediately.
  2. Date and time in UTC - DEXs show timestamps in your local time or in block time. Record the UTC time of the block that confirmed the trade.
  3. Asset sent and amount - What you gave up. Include decimals. For example, 0.5 ETH sent.
  4. Asset received and amount - What you got back. For example, 100 USDC.
  5. Market price of both assets at the time of trade - The USD value of the assets on the date and time of the transaction. You can use a reputable price oracle or an exchange’s historical price feed. Save a screenshot or a note of the source.
  6. Fees paid in crypto - DEX trades often include a network fee (gas) and sometimes a protocol fee. Gas fees are generally not added to your cost basis for capital gains purposes, but you should record them for potential deduction or for tracking total transaction cost.

Which records to keep beyond individual trades

DEX usage often involves more than simple swaps. If you participate in liquidity pools, staking, or yield farming, keep additional records:

How to store records so they survive

Don’t rely on a single method. Use at least two of these:

Common mistakes that cost you records

What if you already lost your records?

If you find yourself with a DEX wallet full of tokens and no transaction history, you can attempt to reconstruct it using a blockchain explorer. Search your wallet address on the relevant explorer and export all transactions. Then match each transaction to a known DEX contract address. This process is tedious and may miss trades that involved routing through multiple DEXs or aggregators. In that scenario, a crypto CPA can help, but the cost of that help may exceed the tax savings. The better strategy is to keep records from day one.

Not financial advice. babybuilder.xyz publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.

Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.

Back to crypto tax