Author | Blockspace

Translation | GaryMa Wu says Blockchain

This article was published on May 14, and some information may be outdated.

Bitcoin mining is present in some of the most remote corners of the globe, including countries you wouldn't expect.

Taking Iran as an example.

This country is struggling due to international sanctions and is under the heavy pressure of a theocratic dictatorship, yet it has a thriving underground 'family-style' Bitcoin mining industry. For a long time, Iranians have used cryptocurrency to break through the financial barriers set by sanctions for online shopping and to evade domestic capital controls.

In this context, Bitcoin mining plays a key role: Iranians can use cheap electricity to mine Bitcoin and then exchange it for stablecoins like USDT for savings and online transactions. Therefore, illegal 'guerrilla' mining is seen everywhere in the country, from residential homes to jewelry stores and office buildings, where people are secretly mining.

The scale of underground mining is so large that ViraMiner CEO Masih Alavi estimates it is close to 2 GW (gigawatts), far exceeding the scale of legal mining at about 5 MW (megawatts). If you think this number sounds exaggerated, don't be surprised — 2 GW is indeed astonishing, especially considering that Iran's total electricity generation in 2023 is only about 42 GW.

Regardless of whether this estimate is accurate, illegal mining in Iran undoubtedly exceeds legal mining, making Iran a fascinating case study: its mining thrives in the shadows and is primarily driven by individual actions.

The following text is an excerpt from our recent Mining Pod conversation with Masih Alavi, in which he outlined Iran's unique Bitcoin mining industry.

Question: Can you briefly describe the current Bitcoin mining landscape in Iran? Can you provide an approximate estimate of megawatts, and if possible, please provide exact numbers?

Answer: Of course. Before the government formally intervened in mining, Iran had about 300 megawatts of mining capacity in operation. After the government intervened, I remember that initially about thirty people applied for mining licenses.

Later, about 700 applications were approved to start mining projects, but ultimately only about 300 projects received government approval to officially operate industrial-scale Bitcoin mines. However, currently, only about 5 megawatts are truly operational.

If all issued licenses are counted, there is a potential capacity of about 400 megawatts, but most of it has not yet been put into production.

Question: So, is it true that Iran currently only has 5 megawatts of legal mining in operation?

Answer: Yes, legal mining is only 5 megawatts. But illegal mining is about 2,000 megawatts, which is 2 GW.

Question: Wow — 2,000 megawatts / 2 GW? The gap is really huge. What are these illegal mining sites like? How do they obtain such a large amount of electricity, and how do they evade regulation?

Answer: Actually, I remember seeing photos of people running mining machines in basements in the US. The situation in Iran is similar. We call it 'silent parts' — people try to connect to electricity in front of the electric meter so that their electricity usage won't be counted, and the government can't detect their consumption.

They put mining machines in their homes, and the numbers are considerable. About two to three weeks ago, I saw the government announce that they had discovered and penalized about 800,000 illegal miners.

A few days ago, I also met with a department of the Iranian Ministry of Energy called Tavanir. They told me that some people are still illegally using older models like Antminer M3 and S9. It was surprising, and the numbers they mentioned were also quite staggering.

I blame the government. They initially launched flawed policies, especially setting wrong electricity prices for mining. They view Bitcoin mining as 'printing money' — literally like printing dollars — and impose the highest electricity fees on miners.

Therefore, it is difficult to obtain licenses, forcing many people to turn to illegal mining. Coupled with ongoing sanctions, many prefer to take the risk of mining in basements or other hidden places to make money.

Question: So, can ordinary residents still profit by mining with S9 or M3? Aren't these models completely outdated now?

Answer: Yes. After mining Bitcoin, they convert it into Tether (USDT), and then exchange it for Iranian rials, which still makes a profit. Even using S9 or M3 can still be profitable.

Question: This is on the premise of paying standard residential or commercial electricity prices. If calculated according to the official electricity price — which includes specific taxes or additional fees for mining — how much would the cost increase? Does this lead some people to feel that legal mining is not sustainable?

Answer: Yes. Whether it’s electricity or gas costs — because we sometimes use gas for power generation — the costs are very high. Although Iran is the second-largest natural gas producer in the world, the highest rates also apply to mining gas usage, just like electricity.

We can obtain electricity from the grid, or we can use engines or power plants to convert gas into electricity, then connect it to mining machines. However, both methods are very expensive. Therefore, we often cannot earn enough income to pay taxes.

According to government regulations, if miners reinvest the Bitcoin they earn into the Iranian economy, they can be tax-exempt. But electricity prices are exorbitant, making it impossible to pay for labor, rent for facilities, or even the costs of compliance, leading many legal mining sites to close and turn to illegal operations.

So, currently, only 5 megawatts of legal capacity are in operation, while about 2,000 megawatts, or 2 GW, are being illegally mined.

Question: We talked about mining in residential buildings and basements; what about industrial-scale mines? Are they decentralized small-scale mining sites, or do they hide in certain places to evade the government?

Answer: I don't have exact statistics, but I've heard of many cases. Many people mine not in basements but in other types of venues. For example, a few days ago, authorities discovered mining machines in a general warehouse, which was shocking.

They have also found mining machines in office buildings. I remember about two years ago, authorities even seized mining machines in the basement of a currency exchange point, which caused a stir. The operators claimed it was just a data center, not a mining site. After the truth was revealed, it triggered a scandal among the management of that office.

Now, people want to mine and move to any place where they can access electricity. As you know, the current price of Bitcoin is around $84,000 to $85,000.

Many people also believe that prices will continue to rise in the coming months. Meanwhile, due to Iran's negotiations with the US over sanctions and nuclear issues, the exchange rate of the dollar against the rial briefly fell, but people expect that as long as negative news arises, such as a statement from Trump, the dollar will soar again.

People are preparing for this volatility; they seek to survive. Under the impact of sanctions, people are looking for alternatives like cryptocurrency to get through economic difficulties.

Question: Regarding payment channels for cryptocurrencies: you mentioned that people convert the Bitcoins they mine into USDT or other stablecoins and then into rials. Are there licensed exchanges in Iran that allow people to deposit crypto assets and then transfer rials to their bank accounts? Or is all of this done underground?

Answer: This is a good question. So far, the Central Bank of Iran has not issued licenses to any cryptocurrency exchanges. However, many such exchanges cooperate with security departments and law enforcement agencies, especially in combating scams and related issues.

So, I can’t say they are entirely illegal, but they are not legal either, falling into a gray area. Nevertheless, about 18 million Iranians hold crypto assets, and there are about 300 to 600 digital exchanges within Iran where people exchange crypto assets for rials or trade locally.

Due to sanctions, overseas exchanges like Binance and Bybit will block accounts as soon as they find out that users are from Iran, so people can only rely on domestic exchanges, although their depth and liquidity are far inferior to international platforms, they can still meet daily demand.

I believe that if sanctions are lifted, Iran will have tremendous potential to connect with global markets and exchanges. For example, about three to five years ago, there was a gas price hike here that led to public protests, and the government shut down the internet to curb communication and unrest, resulting in a roughly 10% to 15% drop in global Bitcoin computing power.

That incident highlighted Iran's significant contribution to the global computing power network — although at that time, most of it belonged to illegal mining. Since then, the government has tried to track miners through IP addresses. But Iranians are very clever; they use router microchips, VPNs, and other tools to hide or change their IP addresses, making it difficult for the government to track.

Some wealthy individuals even use Elon Musk's Starlink satellite network to completely evade monitoring. They also use 'hot tapping' to generate electricity for small underground mining sites, circumventing grid regulation.

Question: Some say there are people mining in mosques? Perhaps not inside the mosque, but in the mosque's property or basement?

Answer: Technically speaking, it is impossible. In urban areas, some transformers (which we call 'transes') have load limits. If someone mines in a mosque or military base, excessive load can lead to system overload or even explosion. So, it is impossible to mine in mosques. People can only choose 'silent parts' or other hidden locations.

I am not defending the government, just explaining from a technical perspective that you cannot mine in places like hospitals, schools, or mosques. Currently, most people mine in private residences. If the government wants to mine themselves, they certainly have more suitable locations that won't be discovered by the public.

Currently, Iran needs about 3,000 megawatts of electricity, but we do not have enough capacity. Electricity here is a matter of national security; once power outages occur due to insufficient supply, people will protest — which is extremely dangerous for the government. Therefore, the government must carefully manage energy supply.

Although cryptocurrencies like Bitcoin are often discussed as a means to evade sanctions, the government itself is not directly involved in mining; it is entirely private behavior.

Question: Where do ordinary people in Iran buy mining machines? From which countries do they import them? Are there intermediaries or companies assisting?

Answer: Most mining machines are smuggled into Iran, mainly from China. People use various Antminer models: S9, S9j, and even new water-cooled mining machines; along with the WhatsMiner series, such as M50, and various Avalon models, both new and old.

I know about these situations because we needed to maintain mining machines locally when we started the Bureau Miner project and later expanded to industrial mines. We sent colleagues to China for WhatsMiner training and invited Chinese technicians to Iran to train our team. Now we have about 80 trained technicians who can repair mining machines. Therefore, we have an in-depth understanding of the types of mining machines operating in Iran.

Question: So basically there is a black market for importing mining machines? Is there a legal channel for imports? I guess you need to obtain registered miner status from the government first?

Answer: Exactly. To operate legally, one must first apply for a mining license. Once approved, documents including a list of equipment, specifications, and the total required megawatts must be submitted to customs to import mining machines from places like Hong Kong or Dubai. After paying customs duties and import taxes, they can be used in mainland areas or free trade zones. Taxes apply in mainland areas, while free trade zones are tax-exempt.

I remember many Chinese companies operating in free trade zones in the past and having mining machines, but due to the government's inability to provide sufficient electricity, these mines were forced to close and have not resumed operations to this day.

Before the government officially regulated industrial mining, we had clients from Europe and China, and models from companies like WhatsMiner and Bitmain were running here, such as M3, M1, etc. But as sanctions intensified, they had to shut down all legal operations. Now, as I mentioned earlier, the scale of legal mining is only 5 megawatts. Although these sites use brand new mining machines, due to high electricity costs, they may be shut down soon — especially now during Iran's peak electricity usage period. Once there is a power shortage, the government will prioritize cutting off power to mining sites. Therefore, we may drop from 5 megawatts to zero.

Question: To clarify, is this 5 megawatts the total legal mining capacity nationwide, or is it limited to your company ViraMiner?

Answer: It is not limited to us. However, there are several departments within our group: Zero Miner focuses on maintenance, and we have a 24/7 support team; HashOne is our hardware repair center; we also developed the ViraPool mining pool, which is completely self-developed software, but currently, no Iranian miners are using it because they are concerned that their IP addresses will be recorded. People avoid domestic mining pools.

We also have a department for hosting mining machines, but currently, only Zero Miner and HashOne are operational. In the past, there were three to five teams responsible for operating and maintaining multiple mines, but now only one industrial mine is running.

Question: Let me stop here, I want to emphasize that Iranian miners are reluctant to use your mining pool because they are concerned about IP tracking. I find this very interesting.

Answer: Indeed. We haven't done any public marketing either. The mining pool was initially prepared for private companies working with us, and I didn't want to promote it publicly. A few years ago, when the government shut down the internet, Iran's computing power dropped significantly. That incident made me deeply realize Iran's contribution to global computing power.

At that time, there were about three or four active mining pools in Iran, such as MacD, ViaBTC, and Antpool. However, as sanctions intensified, some mining pools began to block Iranian users. For example, accessing Antpool now requires a VPN, while ViaBTC and EMCD are still operational.

As for our mining pool, it was originally intended to study mining pool economics — by analyzing raw blockchain data and code, we could gain a deep understanding of the mining ecosystem, such as tracking transactions, counting mined and held Bitcoins, and their flow. During early analyses, I even drew wallet diagrams to observe how funds were stored and flowed, which was very interesting. But now we have shifted to other projects.

For example, I don't know if the same is true in the US, but there are private companies providing retail electricity services. We recently created the first online electricity sales platform in Iran, focusing on innovations like this and other energy-related side businesses.

Question: The last two questions. First, back to the numbers: you mentioned that the currently active legal mining capacity is about 5 megawatts, while about 400 megawatts have been approved but not yet put into production. Why is this the case? Did the government set up additional obstacles, or is the registration process too complicated?

Answer: There are multiple reasons. As I mentioned, the government continues to raise electricity prices — even for a small scale like four megawatts; at the same time, they still enforce outdated and unrealistic regulatory requirements, making it difficult for miners to operate legally.

The registration process is complicated, fees are high, and miners don't even know how to use the Bitcoin they mine. If you want to reinvest the earnings, such as building a solar power station, the government initially supports it; but if you want to build a solar power station and a mining site at the same location, they will obstruct it. This deters people. We have been telling the government: if they want new infrastructure — whether solar or gas power generation — they need to encourage investment. Iran is facing an energy shortage, and new infrastructure is crucial, even if there are risks.

The global mining community is accustomed to the risks of price fluctuations and difficulty changes, yet they still seek new locations for construction and expansion. We also told the government: 'If you want to attract investment in solar or gas power generation, mining is one of the best ways.'

Iran has about 3,000 gas flares — which burn gas directly. If someone wants to connect for power generation for mining, the government says: 'No, we prefer to burn it.' The same goes for solar energy. We told them this is a golden opportunity. Even if one day Bitcoin disappears — for example, if Satoshi Nakamoto suddenly appears from somewhere and shuts down the network — this infrastructure will remain and can continue to generate electricity.

This is a rational long-term investment. Unfortunately, the government does not listen. They still want to control everything, for example, we still do not have a legal cryptocurrency exchange. In contrast, countries like the US quickly adjust laws to adapt to new technologies like blockchain, while here, the government's instinct is to restrict and control. They want to monopolize the benefits rather than share or cooperate, which does not work in today’s world.

Therefore, legal mining is very difficult. I can tell you — in three to four months, the situation will worsen. But they cannot completely stop it. The hidden technologies used by illegal miners are very advanced, making the government headache. Just three days ago, I met with some government experts and was amazed by the evasion techniques they showed me. Some methods are truly astonishing.