guest@tfb:~$ cat analysis/crypto-mining-tax.md
~/analysis/crypto-mining-tax.md

Crypto mining: economic activity, income and expenses

Economic activity for IRPF · outside the scope of VAT (V3625-16, V1274-20)

Mining raises two tax questions that are worth separating from the outset: how the rewards obtained are taxed, and whether or not the activity falls within the scope of VAT. The answer to the first depends largely on a prior step: determining whether or not mining constitutes an economic activity.

When does mining constitute an economic activity?

Mining qualifies as an economic activity when it is carried on habitually, continuously and with a minimum organisation of material and human resources. The key is not the number of machines used, but the existence of a self-employed ordering of those resources to take part, with a degree of continuity, in the generation of income.

Home mining hardly qualifies, on its own, as an economic activity, even where rewards are obtained through a mining pool (the grouping of miners that share computing power and split the rewards), because it cannot always be said that there is that genuine organisation of resources. Where mining does not reach the threshold of an economic activity, the administrative position has been to characterise the reward received as a capital gain not arising from a transfer, included in the general IRPF base at its market value when obtained; the later sale will then give rise to a gain or loss within the savings base. That said, it opens a distinct question: what happens if an individual mines an isolated block on their own? The characterisation of the income obtained in that case calls for a specific analysis of the circumstances, and should not be resolved with knee-jerk assumptions.

Income: the rewards are valued when obtained

Mining rewards —the block reward plus the transaction fees in the case of Bitcoin— are valued in euros, at market price, at the exact moment of their receipt by the miner. This matters, because that value performs a dual function: it is the income for the tax year and, at the same time, the acquisition value of the crypto-assets for a later disposal.

Hence mining can generate two successive taxation moments. If 1 BTC is mined when it trades at €27,000 and is later sold at €50,000, tax is first paid on €27,000 as income from the economic activity (included in the general IRPF base where the miner operates as an individual) and then on €23,000 as a capital gain, taxed within the savings base.

Deductible expenses: electricity and depreciation are decisive

If there is an economic activity, expenses correlated with the obtaining of income are deductible, provided they are duly substantiated: electricity, depreciation of equipment, rent of the premises, maintenance and repairs, and pool fees. In an activity so intensive in electricity consumption and hardware, the correct substantiation of these expenses is what separates reasonable taxation from excessive taxation.

Example. If, over the tax year, rewards are obtained with an accumulated market value of €12,000 and €4,500 of electricity, €2,000 of equipment depreciation and €500 of fees and maintenance are substantiated, the net result of the activity would be €5,000, included in the general IRPF base.

Characterisation as an economic activity also entails formal obligations: registration with the tax census (forms 036/037) under the relevant IAE heading —the DGT has been placing mining under 831.9, “Other financial services n.e.c."— and determination of the net result under the direct assessment method.

The later sale of the mined coins

When the crypto-assets obtained by mining are disposed of, the acquisition value is the amount already included as income from the activity at the time they were obtained. Following the previous example, if those assets are later sold for €14,000, the additional capital gain will be €2,000; if they are sold for €10,000, a capital loss of €2,000 arises. There is therefore no double taxation: the value recognised on mining marks the boundary between what has already been taxed as income and what will later be taxed as a gain or loss.

It should be noted that this characterisation of the sale as a capital gain or loss within the savings base operates, as a general rule, where the disposal takes place outside the course of the activity —the case of the miner who keeps the coins as a non-business asset. Where, on the other hand, the miner disposes of them within their economic activity, selling them in the ordinary course as inventory or as business assets, the income obtained could be characterised as income from the activity and included in the general base. The boundary depends on whether the coins are allocated to the business and on the manner of operating, so it is best analysed on a case-by-case basis.

VAT: outside the scope for want of an identifiable recipient

For VAT, the administrative doctrine takes the view that mining is outside the scope of the tax. The reasoning is that there is no direct relationship between a service and an identifiable recipient: the new coins are generated automatically by the network itself, without any specific client who pays for a service. The DGT denies that mining confers on the miner the status of an entrepreneur or professional for VAT purposes and, for that reason, places it outside the scope of the tax; it established this in ruling V3625-16 and has reiterated it since, among others in V1274-20. The Hedqvist judgment of the Court of Justice of the European Union (Case C-264/14) provides context on the VAT treatment of bitcoin, but the specific support for mining being outside the scope lies in that domestic doctrine denying the existence of a specific recipient, a doctrine that in turn rests on the case law of the Court of Justice on the requirement of a direct link between the service and its consideration (Tolsma, Case C-16/93). As a counterpart, being outside the scope prevents the deduction of the input VAT borne on the acquisition of equipment and other inputs.

This VAT exclusion introduces a conceptual friction with the way we characterise mining in IRPF as an economic activity: the same activity that, for VAT, does not turn the miner into an entrepreneur or professional —because there is no service and no recipient— may nonetheless constitute an economic activity for IRPF purposes. The apparent contradiction is resolved by the principle of the autonomy of each tax (estanqueidad): each tax defines its concepts independently and according to its own logic —for VAT, a transaction within scope requires a recipient who pays for a service; for IRPF, it is enough to organise means of production on one’s own account (Article 27.1 LIRPF)—. It is not, therefore, an incoherence that invalidates either criterion, but a nuance worth bearing in mind.

Rulings and case law — VAT / IRPF
  • V3625-16 · V1274-20 — mining is outside the scope of VAT for want of a direct relationship between a service and an identifiable recipient, which prevents the deduction of input VAT.
  • Judgment of the CJEU of 22 October 2015, Hedqvist (C-264/14) — the exchange of bitcoin for legal tender is a currency transaction exempt from VAT (Article 135(1)(e) of Directive 2006/112/EC); it serves as context on the VAT treatment of bitcoin.

IRPF criterion: habitual mining with an organisation of means constitutes an economic activity (general base); the later sale of the coins obtained gives rise to a capital gain or loss (savings base), taking as acquisition value the one already included when they were obtained.

Settled criterion for VAT (outside the scope) and IRPF (economic activity where there is an organisation of means). Open area: the characterisation of the reward obtained by an individual who mines an isolated block, which calls for a case-by-case analysis.