CryptaTax
🌐 EN
EnglishENDeutschDEEspañolESFrançaisFRItalianoIT日本語JA한국어KONederlandsNLPolskiPLPortuguêsPT
Sign In Get Started Free

DeFi Tax in Spain: Staking, Trading, NFTs and Airdrops Explained

DeFi tax in Spain is not a grey area as many users assume. The Spanish tax authority, the Agencia Tributaria, has issued guidance that reaches across most decentralised finance activities, and it applies whether you are a casual yield farmer or an active liquidity provider. The rules are built on two pillars: income tax, which captures value you receive as a reward or payment, and capital gains tax, which captures profits when you dispose of a crypto asset. Getting the two confused is one of the most expensive mistakes a Spanish crypto filer can make. This guide covers every major DeFi activity, from staking and liquidity pools to NFTs and airdrops, so you can understand your position before the annual declaration deadline arrives.

How Spain Taxes Crypto in General

Before drilling into DeFi specifically, it helps to understand the broader framework. Spain taxes crypto gains under the personal income tax regime known as IRPF (Impuesto sobre la Renta de las Personas Físicas). Gains from selling or swapping crypto assets fall under the savings tax base, which applies progressive rates depending on how much profit you realise in a given year. Separately, income received in the form of crypto, whether as a reward, salary equivalent, or payment for a service, is taxed under the general tax base, which carries higher rates.

This distinction matters enormously for DeFi users. The same token can generate two separate tax events: one when you receive it as income, and another when you later sell it. Spain does not currently offer a blanket exemption for small gains, so even modest DeFi activity creates a reporting obligation. Residents must declare all worldwide crypto income and gains, and the declaration is filed annually through the Renta campaign, which typically runs from April to June for the previous tax year.

The table below summarises the two tax bases that apply to most DeFi activity in Spain.

Tax Base What Triggers It Rate Type
Savings base (capital gains) Selling, swapping, or disposing of a crypto asset Progressive savings rate
General base (income) Receiving crypto as a reward, airdrop, or payment Progressive general rate (higher)

DeFi Tax on Staking Rewards in Spain

Crypto staking tax is one of the most frequently searched questions among Spanish crypto holders, and the answer is relatively clear. When you receive staking rewards, the Agencia Tributaria treats those tokens as income at the moment you receive them. You must record the fair market value of the tokens on the day they arrive in your wallet, and that value is taxed under the general base as capital income.

Is staking taxable in Spain even if you do not sell the rewards? Yes. The taxable event occurs on receipt, not on sale. When you eventually sell those staking rewards, a second tax event arises: the difference between the sale price and the value you recorded when you received them becomes a capital gain or loss under the savings base. Liquid staking arrangements, where you receive a derivative token representing your staked position, are treated similarly, though the specific token mechanics can affect how the Agencia Tributaria characterises each transaction. Keep records of every reward distribution, including the date, the quantity received, and the token price at that moment.

How are DeFi rewards taxed more broadly? The staking framework applies as a reference point, but the specific DeFi mechanism matters. Rewards earned through protocol governance participation, validator activity, or delegated staking all share the same income-on-receipt treatment under current Spanish guidance.

Liquidity Pools and Yield Farming

Providing liquidity to a decentralised exchange is one of the more complex areas of DeFi tax. When you deposit two tokens into a liquidity pool and receive LP tokens in return, the Agencia Tributaria's position is that this constitutes a swap or exchange of assets. That means the deposit itself may trigger a capital gains calculation on the tokens you hand over, based on the difference between their acquisition cost and their value at the time of deposit.

When you later withdraw from the pool and receive your underlying tokens back, along with any accumulated fees, a further disposal event occurs on the LP tokens. The fee income is generally treated as capital income under the general base. Any difference in the value of the tokens you withdrew compared to what you originally deposited creates a further capital gain or loss. This layered treatment means a single liquidity pool position can involve several taxable events across a single tax year, and accurate cost basis tracking is essential. Yield farming strategies that involve moving between multiple pools compound the complexity further, since each redeployment is likely treated as a new disposal.

NFT Tax in Spain

NFT tax in Spain follows the same general crypto framework, with a few nuances worth understanding. When you buy an NFT with cryptocurrency, you are disposing of that crypto at the moment of purchase. If the crypto has increased in value since you acquired it, you realise a capital gain on the difference. The NFT itself then has a cost basis equal to the fair market value of the crypto you spent at the time of purchase.

When you sell the NFT, any profit above that cost basis is a capital gain under the savings base. If you create and sell NFTs as a regular commercial activity, the Agencia Tributaria may treat the income as business or professional income rather than investment income, which shifts it to the general base and brings different obligations including potential VAT registration. Royalty income received in crypto from secondary NFT sales is also likely treated as income on receipt. The key variable is whether your NFT activity looks like investing or trading as a business: frequency, scale, and intent all play a role in how the authority may characterise your situation.

Crypto Airdrop Tax and Free Token Distributions

Crypto airdrop tax catches many holders off guard. In Spain, receiving tokens through an airdrop is generally treated as income at the point of receipt, valued at the fair market price of the tokens on the day they arrive. This holds whether the airdrop was unsolicited or whether you qualified by holding another token or completing a task. The value is reported under the general base as capital income.

If the airdrop tokens have no liquid market price at the time of receipt, valuation becomes difficult. Spanish tax law requires you to use a reasonable market value, which in practice means referencing the earliest available traded price. Tokens received through hard forks are treated similarly: they are income at receipt, valued at the market price on the day the new chain split. Keeping a contemporaneous record of the token price at the moment of receipt is the most important step you can take to defend your return in the event of a query from the Agencia Tributaria.

DeFi Activity First Tax Event Tax Base Second Tax Event
Staking rewards Receipt of tokens General (income) Sale of tokens (savings base)
Liquidity pool deposit Swap of tokens for LP tokens Savings (capital gain/loss) Withdrawal of LP position
Yield farming fees Receipt of fee tokens General (income) Sale of fee tokens (savings base)
NFT purchase with crypto Disposal of crypto used Savings (capital gain/loss) Sale of NFT (savings base)
Airdrop receipt Receipt of tokens General (income) Sale of tokens (savings base)

Crypto Trading Tax and Cost Basis Rules

Crypto trading tax in Spain applies every time you swap one cryptocurrency for another, sell crypto for euros, or use crypto to pay for goods and services. Each of these is a disposal, and Spain uses the FIFO (first in, first out) method to determine which units of a token you are selling. This means the oldest tokens you acquired are treated as the first ones sold, which can significantly affect your gain or loss calculation when prices have moved a lot over time.

Swapping one crypto for another, say exchanging ETH for a governance token on a DeFi protocol, is treated exactly the same as selling ETH for euros and then buying the governance token. The capital gain or loss on the ETH disposal is calculated at the moment of the swap using the market price at that point. There is no deferral mechanism for crypto-to-crypto exchanges in Spain. This makes DeFi trading particularly record-intensive: every on-chain interaction that involves exchanging one token for another is a potential taxable event, and you need the acquisition cost and disposal value for every single transaction.

Illustrative Scenario

To illustrate how this applies in practice, consider the following scenario:

Carlos is a freelance software developer based in Madrid who has been active in DeFi for about two years. During the tax year, he earned staking rewards on a proof-of-stake protocol, provided liquidity on a decentralised exchange, received a governance token airdrop, and sold several NFTs he had purchased six months earlier. When the Renta campaign opened, Carlos assumed that because he had not withdrawn his funds to his bank account, he had nothing to declare. He was wrong on all counts.

His staking rewards were income at the moment of receipt and needed to be reported under the general base. His liquidity pool deposit had triggered a disposal of his original tokens at the time he made the deposit. The airdrop was income at receipt. And the NFT sales had generated capital gains under the savings base. Using CryptaTax, Carlos was able to import his on-chain transaction history, automatically classify each event, and generate a pre-filled summary ready for his tax adviser to review. He filed on time, avoided penalties, and had a clear cost basis record for the tokens he still holds.

Frequently Asked Questions

Do I need to declare DeFi income if I never converted to euros?

Yes. In Spain, taxable events are triggered by receipt of rewards or by swapping one crypto for another, regardless of whether you ever convert to euros. The obligation arises at the point of each event, not at the point of a bank transfer. Failing to declare because you stayed within the crypto ecosystem is one of the most common mistakes Spanish filers make.

How are DeFi rewards taxed compared to regular salary income?

DeFi rewards received as staking income, airdrop distributions, or liquidity fees are taxed under the general tax base, the same base that applies to employment income. However, they are typically classified as capital income rather than earned income, which means they sit in a different box on your return. The rates are progressive and can be significant at higher income levels, so accurate valuation at the time of receipt is essential.

Is staking taxable in Spain even for small amounts?

Yes. Spain does not apply a minimum threshold below which staking income is exempt. Even a small quantity of tokens received as a staking reward must be declared at its fair market value on the date of receipt. Keeping a transaction log throughout the year is far simpler than trying to reconstruct prices after the fact.

What is the NFT tax treatment when I buy an NFT using crypto?

NFT tax in Spain starts before you even own the NFT. Paying for an NFT with cryptocurrency is a disposal of that crypto, and any gain since you acquired the crypto is taxable at that moment. The NFT then takes a cost basis equal to the fair market value of the crypto you spent. When you later sell the NFT, gains above that cost basis are taxed under the savings base.

How does crypto trading tax work for DeFi swaps?

Every token swap on a DeFi protocol is treated as a disposal of the token you send and an acquisition of the token you receive. Spain uses the FIFO method, so your gain or loss is calculated against the cost of the oldest units you hold. There is no deferral for crypto-to-crypto trades, and each swap must be recorded with its date, quantities, and the market price at the time of execution.

What is the crypto airdrop tax treatment for tokens with no market price?

If the tokens you receive in an airdrop have no established market price at the time of receipt, you must use the first available traded price as a reasonable proxy for fair market value. Document how you arrived at that valuation and keep the record. The Agencia Tributaria expects you to make a good-faith effort at valuation rather than simply leaving the field blank on your return.

Do I owe tax when I withdraw from a liquidity pool?

Yes, in most cases. Withdrawing from a liquidity pool involves disposing of your LP tokens and receiving the underlying assets back. This is treated as a taxable disposal, and any gain on the LP tokens since you acquired them is subject to the savings rate. Fee income accumulated in the pool is typically treated as income on receipt rather than as a capital gain.

When is the deadline to declare crypto and DeFi income in Spain?

Spanish residents file their IRPF return during the annual Renta campaign, which generally runs from April to June for the preceding tax year. If you have crypto or DeFi activity to declare, it must be included in that return. Missing the deadline results in surcharges, and late declarations that are discovered by the Agencia Tributaria rather than filed voluntarily carry higher penalties.

Source: CryptaTax

FAQ

Do I need to declare DeFi income if I never converted to euros?

Yes. In Spain, taxable events are triggered by receipt of rewards or by swapping one crypto for another, regardless of whether you ever convert to euros. The obligation arises at the point of each event, not at the point of a bank transfer. Failing to declare because you stayed within the crypto ecosystem is one of the most common mistakes Spanish filers make.

How are DeFi rewards taxed compared to regular salary income?

DeFi rewards received as staking income, airdrop distributions, or liquidity fees are taxed under the general tax base, the same base that applies to employment income. However, they are typically classified as capital income rather than earned income, which means they sit in a different box on your return. The rates are progressive and can be significant at higher income levels, so accurate valuation at the time of receipt is essential.

Is staking taxable in Spain even for small amounts?

Yes. Spain does not apply a minimum threshold below which staking income is exempt. Even a small quantity of tokens received as a staking reward must be declared at its fair market value on the date of receipt. Keeping a transaction log throughout the year is far simpler than trying to reconstruct prices after the fact.

What is the NFT tax treatment when I buy an NFT using crypto?

NFT tax in Spain starts before you even own the NFT. Paying for an NFT with cryptocurrency is a disposal of that crypto, and any gain since you acquired the crypto is taxable at that moment. The NFT then takes a cost basis equal to the fair market value of the crypto you spent. When you later sell the NFT, gains above that cost basis are taxed under the savings base.

How does crypto trading tax work for DeFi swaps?

Every token swap on a DeFi protocol is treated as a disposal of the token you send and an acquisition of the token you receive. Spain uses the FIFO method, so your gain or loss is calculated against the cost of the oldest units you hold. There is no deferral for crypto-to-crypto trades, and each swap must be recorded with its date, quantities, and the market price at the time of execution.

What is the crypto airdrop tax treatment for tokens with no market price?

If the tokens you receive in an airdrop have no established market price at the time of receipt, you must use the first available traded price as a reasonable proxy for fair market value. Document how you arrived at that valuation and keep the record. The Agencia Tributaria expects you to make a good-faith effort at valuation rather than simply leaving the field blank on your return.

Do I owe tax when I withdraw from a liquidity pool?

Yes, in most cases. Withdrawing from a liquidity pool involves disposing of your LP tokens and receiving the underlying assets back. This is treated as a taxable disposal, and any gain on the LP tokens since you acquired them is subject to the savings rate. Fee income accumulated in the pool is typically treated as income on receipt rather than as a capital gain.

When is the deadline to declare crypto and DeFi income in Spain?

Spanish residents file their IRPF return during the annual Renta campaign, which generally runs from April to June for the preceding tax year. If you have crypto or DeFi activity to declare, it must be included in that return. Missing the deadline results in surcharges, and late declarations that are discovered by the Agencia Tributaria rather than filed voluntarily carry higher penalties.