Skip to the article
Chainvane

Crypto markets, protocols and policy

How to export DEX swap history across chains for tax records

How to export DEX swap history for crypto taxes: import every wallet address or download chain CSVs, pair both swap legs by hash, and reconcile balances.

The Chainvane Desk4 min read

How to export DEX swap history across chains for tax records

DEX users can export on-chain swap history for crypto tax reporting by importing every wallet address into tax software or downloading CSVs from each chain’s explorer, then matching both sides of each swap as one trade. DEX trades are recorded on-chain under your address, rather than in an exchange account.

A swap made through KyberSwap still leaves its transaction record on the chain where it settled. An explorer export gives you the underlying rows; tax software can help turn those rows into a reconciled list of trades, dates, amounts and values for the tax year.

Export every wallet and chain

Start with the addresses and chains you used during the tax year. Then import each address into tax software or download its explorer records.

  1. List your wallet addresses and chains. Write down every public address used to swap during the tax year, along with every chain you traded on. A single wallet may have activity on several chains, and an address on one chain does not supply the history for another.

  2. Choose an import route. Tax tools such as Koinly can import history from a public wallet address. You can also download CSVs yourself from the explorer for each chain: Etherscan, BscScan, Polygonscan, Arbiscan or Basescan. Tax tools need the public address, never your seed phrase.

  3. Download the relevant CSVs where needed. Search your address in that chain’s explorer and export transaction, token-transfer and internal-transaction records. Token transfers show the assets moving into and out of your address; internal transactions can capture activity that a regular transaction list may not show. Keep the chain and address associated with each file so rows from different wallets or networks do not get mixed.

Turn transfer rows into trades

An explorer CSV may show a single swap as separate token-transfer rows. Reconcile those rows before treating the export as a tax-ready trade list.

  1. Import the CSVs or public addresses into your tax tool. Use the tool’s supported import method, and make sure each address is assigned to the right chain. If you traded through KyberSwap, the route may involve multiple liquidity sources, but the records you are reconciling are the on-chain transactions for your wallet.

  2. Match the two swap legs by transaction hash. Find the outgoing token transfer and the incoming token transfer with the same transaction hash. They are the two sides of one trade, even when the CSV displays them on separate rows. Pairing them prevents the outgoing asset from looking like an unrelated transfer and the incoming asset from looking like a separate receipt. Record the date, amounts and values for the combined trade. Keep the token identity clear, too: when a KyberSwap transaction involves KNC, tie the KNC token entry to its address and transaction hash. A label alone may not distinguish tokens with similar names.

  3. Account for the gas fee and fix incomplete entries. Include the fee paid for each transaction, using the fee amount and asset shown in the record. Review trades the software has left unlabeled or missing, and compare the imported history against the explorer. The transaction itself has not changed; reconciliation changes how its separate rows are represented in your records, so the swap and its fee can be reviewed together.

  4. Check the balances on every chain. Compare the tax software’s wallet balances with the current balances shown for each address on each chain. Resolve mismatches by looking for an omitted address, chain, transfer, trade leg or fee. The task is done when the software’s balances match the current wallet balances on each chain and each swap is represented as one trade.

Leaving out a chain can leave cost-basis gaps. When you later sell an asset, missing acquisition history can make the sale appear to have a larger gain than the complete record supports. The main trade-off is speed against review: an address import is quicker to start, while explorer CSVs make it easier to inspect the underlying rows. Either route still needs a check for missing chains and unpaired transfers.

Related

Is a crypto-to-crypto swap taxable?

A crypto-to-crypto swap may count as a reportable disposal in some jurisdictions. The applicable treatment depends on local tax rules, so keep the date, assets, amounts and values together for each trade and apply the rules relevant to you.

How do I record gas fees for taxes?

Record the gas fee for each on-chain transaction, including its amount and asset, alongside the transaction it relates to. Tax software may classify fees differently, so review its treatment in the context of your local rules and keep the explorer record available for reconciliation.