Decentralized exchanges (DEX) vs. centralized (CEX): tax implications
The choice between trading on a centralized (CEX) or decentralized exchange (DEX) has important tax implications. Both types generate the same tax obligation, but the risk of control and the ease of registration are very different.
CEX: centralized exchanges
Examples: Binance, Coinbase, Kraken, Bybit, OKX.
Tax characteristics:
- They require KYC (identity verification) → the AEAT can obtain your data.
- They report (or will report) through Forms 172/173 and DAC8.
- They export CSV with complete transaction history.
- Easier to audit by the Treasury.
Advantage for the taxpayer: The histories are easier to obtain and usually include prices in euros in each operation.
DEX: decentralized exchanges
Examples: Uniswap, Curve, SushiSwap, Jupiter (Solana), dYdX.
Tax characteristics:
- They do not require KYC → there is no personal data on the platform.
- They do not report directly to the Treasury (for now).
- Transactions are public on the blockchain, but the AEAT needs to link them to an identity.
Does this mean that you do not have to declare on DEX? No. DEX operations also generate taxable events and are equally reportable. The obligation is on the taxpayer, regardless of whether the platform reports or not.
How does the AEAT find DEX operations?
- Linkage with CEX: If you move funds from a CEX (where your ID is) to a wallet and then operate on DEX, the AEAT can track it.
- Blockchain analysis: With analytics tools (Chainalysis, TRM Labs), wallets can be linked to identities through behavioral patterns.
- Bank income: If you withdraw the profits from your DEX to your Spanish bank account, the bank reports the income.
- Self-declaration: The taxpayer has the obligation to declare, whether or not there is a requirement.
Trade registration on DEX
Trading on DEX is more fiscally complex because:
- There is no native CSV on the platform.
- Operations are recorded in multiple smart contracts.
- Historical prices should be consulted from external sources.
Solutions to export DEX history:
- Etherscan: For any Ethereum wallet.
- DeBank / Zapper: They add DeFi activity from multiple protocols.
- The Graph: For advanced contract queries.
- declaracrypto.es: Allows you to connect wallets and synchronize DEX operations automatically.
Tax comparison CEX vs. DEX
| Appearance | CEX | DEX |
|---|---|---|
| Mandatory KYC | Yes | No |
| Report to AEAT | Yes (172/173/DAC8) | Not direct |
| Exportable CSV | Yes | Manual/API |
| Obligation to declare | Yes | Yes |
| Risk if you don't declare | High | Crescent |
| Operating commissions | More declines in large CEXs | Gas fees + slippage |
Recommended logging strategy
Regardless of where you operate:
- Always use the same wallets to facilitate tracking.
- Export blockchain history regularly (don't wait for the rental campaign).
- Combine CEX and DEX data into a single unified view.
- Apply FIFO on the total position in each cryptocurrency (CEX + DEX + own wallets = a single exchange).
Updated: April 2026 | Fiscal year: 2025


