Liquidity pools in DeFi: taxation in Spain explained
Liquidity pools are the engine of the DeFi ecosystem. Millions of users contribute cryptocurrencies to protocols such as Uniswap, Curve, Balancer or Aerodrome to earn commissions. But how is all this taxed in Spain?
What is a liquidity pool?
A liquidity pool is a smart contract that stores pairs of tokens (for example ETH/USDC) to facilitate swap operations between users. Liquidity providers (LPs) deposit both tokens in equal proportions and receive in return LP tokens that represent their participation.
In exchange, the LPs receive a portion of the commissions on each swap that passes through the pool.
Entry operation: taxed?
When you deposit ETH and USDC into a Uniswap v3 pool, you are technically transmitting those cryptocurrencies in exchange for LP tokens. The DGT has applied the criterion that any crypto exchange generates a taxable event.
Therefore:
- If the ETH you deposit has increased in price compared to your acquisition cost, there is capital gain at the time of deposit.
- If it has decreased, there is asset loss.
Commissions received: how are they taxed?
The trading commissions you receive as an LP can be taxed in two ways depending on the chosen criteria:
- Return on capital: When you withdraw the accumulated commissions, they are taxed at the savings rate (19-28%).
- Increase in LP token value: If commissions are automatically reinvested in the pool (as in Uniswap v2), the value of the LP token grows, and you are only taxed when you sell/withdraw it.
The DGT does not have specific criteria on pool commissions. The most prudent approach is to treat them as capital gains at the time of realizing the benefits.
Impermanent Loss: is it deductible?
Impermanent loss occurs when the pool composition changes due to price differences between deposited tokens. By withdrawing your position, you may have less value in euros than if you had simply held the cryptos.
Is it deductible as a loss?
Only if when you withdraw your position the total value received is less than your acquisition cost. In that case, the difference is capital loss compensable with other savings gains.
The "latent" impermanent loss while your position is open is not deductible.
Governance Tokens as an additional reward
Many DeFi protocols pay additional tokens (UNI, CRV, BAL, etc.) to their LPs. These tokens:
- They are taxed as income from movable capital upon receipt, valued at market price.
- Its acquisition cost is set at that value, to calculate future profits.
Complete practical example
Maria deposits 1 ETH (price: €3,000) and 3,000 USDC in a pool on January 1st.
- Your cost of acquiring ETH was €2,000.
- Gain on deposit: 3,000 - 2,000 = €1,000 (capital gain, savings base).
Three months later he withdraws:
- Receive 0.9 ETH (price: €3,500) = €3,150 + 3,150 USDC = €6,300
- Cost of the LP token: value of the deposit (3,000 + 3,000 = €6,000)
- Profit on withdrawal: 6,300 - 6,000 = €300
Additionally, during those 3 months he collected €150 in swap commissions → return on capital.
Tools needed
Keeping track of liquidity pools manually is extremely complex. declaracrypto.es allows you to import DeFi transactions and automatically calculate the capital gains and returns of each operation.
Updated: April 2026 | Fiscal year: 2025


