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

Crypto mining: economic activity and taxation

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

Someone installs several mining rigs in a premises, connects them to a pool and begins to receive bitcoin every few days while paying electricity bills. When the time comes to file, several questions arise: whether they must register as self-employed, how what they receive is valued, which expenses they may deduct, what happens when they dispose of the coins, and whether they must charge or may deduct VAT.

When does mining constitute an economic activity?

For Spanish tax purposes, mining qualifies as an economic activity when it is carried on habitually, continuously and through a minimum organisation of material and human means. What matters is that those means are organised on one’s own account in order to take part, with a degree of continuity, in the generation of income (the number of rigs may be an indication of such organisation).

Home mining hardly qualifies on its own as an economic activity, even where the rewards arrive through a pool, because it cannot always be said that such an organisation of means exists. Where that threshold is not reached, and in the absence of a specific ruling, the characterisation most consistent with the criterion the DGT applies to other gratuitous acquisitions of crypto-assets, such as airdrops, is a capital gain not arising from a disposal, included in the general IRPF base at its market value when obtained. The later disposal then gives rise to a capital gain or loss included in the savings base.

Income: the rewards are valued when obtained

Mining rewards (in Bitcoin, the block reward plus the fees of the transactions included in the block) are valued in euros, at market price, at the time the miner receives them. At the same time, that price determines the acquisition value of the crypto-assets for the purposes of a later transfer.

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

Naturally, nowadays it is hard to find anyone carrying on this activity in Spain as a sole trader.

Deductible expenses: electricity and depreciation of the equipment

Where there is an economic activity, the expenses correlated with the obtaining of income are deductible, provided that they are duly substantiated: electricity, depreciation of the equipment, rent of the premises, maintenance and repairs, pool fees, etc. In an activity so intensive in electricity consumption and hardware, the substantiation of these expenses determines the final tax burden.

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

Characterisation as an economic activity also carries formal obligations: registration with the tax census (forms 036/037) under the relevant heading of the Business Activities Tax (IAE), which the DGT has been placing at 831.9, “Other financial services n.e.c.”, and determination of the net income under the direct assessment method, that is, by the difference between actual income and expenses.

The later sale of the mined coins

When the crypto-assets obtained by mining are transferred, the acquisition value is the amount already included as income from the activity when they were obtained; the difference from the sale value gives rise to a capital gain or loss.

This characterisation of the proceeds of the sale as a capital gain or loss included in the savings base operates, as a general rule, where the transfer takes place outside the normal course of the activity, which is the case of the miner who keeps the coins as a non-business asset, essentially that of the home miner. If, on the contrary, the miner transfers 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.

VAT: outside the scope for want of an identifiable recipient

For VAT purposes, the DGT considers that the reward obtained by the miner is outside the scope of the tax. The reasoning is that there is no direct relationship between a service and an identifiable recipient, since the new coins are generated automatically by the network itself, and no specific client can be identified who pays for a specific service. For that reason the DGT rules out that mining is a supply of services for consideration and places it outside the scope of the tax. This criterion was laid down in ruling V3625-16 and has been reiterated since, among others, in ruling 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. That doctrine, for its part, 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 the equipment and other inputs.

That exclusion from the scope of VAT introduces a conceptual friction with the characterisation of mining as an economic activity for IRPF purposes: the same operation that, for VAT, does not turn the miner into an entrepreneur or professional, because there is no service and no recipient of it, may indeed constitute an economic activity for IRPF purposes.

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.

There is a DGT criterion for VAT purposes (outside the scope). For IRPF there is no specific ruling: characterisation as an economic activity depends on the organisation of means (Article 27.1 LIRPF), and treating the isolated miner's reward as a capital gain is a reasonable criterion on which no ruling has been published.