Bitcoin mining occurs at the farthest flung corners of the Earth, including countries you would never expect.
Take Iran, for example.
The country, strangled by international sanctions and under the boot of a theocratic autocracy, has a thriving underground bitcoin mining cottage industry. Iranians have long used cryptocurrency to breach the financial barriers erected by sanctions to make online purchases and to evade domestic capital controls.
Bitcoin mining plays a critical role here, as Iranians can tap cheap electricity to mine bitcoin and then convert it to stablecoins like USDT for savings and online commerce. As a result, illegal, guerrilla mining is widespread in the country, taking place everywhere from residences to jewelry stores and office buildings.
Underground mining is so large in Iran that ViraMiner CEO Masih Alavi estimates the market is near 2 GW, dwarfing legal mining’s 5 MW footprint. Now, if that figure sounds outlandish to you, you’re not alone – 2 GW is gargantuan, especially considering Iran produced roughly 42 GW in 2023.
Whether or not this figure is accurate, illegal mining certainly outweighs legal mining in Iran, so the country provides a fascinating case study as a country whose mining industry, humming away in the shadows, is dominated by retail actors.
The following transcript is excerpted from our recent Mining Pod with Masih Alavi, wherein he provides an overview of Iran’s unique bitcoin mining industry.
Can you give us a brief overview of the current landscape of Bitcoin mining in Iran? Can you provide a rough estimate in megawatts, or an exact figure if possible?
Sure. Before the government officially got involved in the mining industry, there were about 300 megawatts of mining capacity operating in Iran. After the government stepped in, I recall that around three dozen people initially applied for mining licenses.
Later, approximately 700 applications were approved for starting mining projects. But in the end, only about 300 of those were officially authorized by the government to operate industrial-scale Bitcoin mining facilities. However, currently, only about 5 megawatts of that capacity is actually operational.
If we consider all the issued permits, they collectively represent around 400 megawatts of capacity, but most of it isn’t operational right now.
So there are only five megawatts of active, legal mining in Iran?
Yes, legally. Just five megawatts. But illegally, there’s approximately 2,000 megawatts—about two gigawatts.
Wow—two gigawatts? That’s a huge difference. What do those illegal mining operations look like? How are they drawing that much power, and how are they managing to get away with it?
Actually, I remember seeing photos from the U.S. where people were running mining machines in their basements. It’s similar in Iran. We call them “silent parts”—people try to connect their machines to the power grid before the electricity meter, so the usage doesn’t get recorded. That way, the government can’t detect them.
They set up machines in their homes, and there are many of them. About two or three weeks ago, I saw an announcement from the government stating that they’ve discovered and fined around 800,000 illegal miners so far.
I also had a meeting just a few days ago with a division of the Energy Ministry called “Tavanir.” They told us that some people are still running older machines like the Antminer M3 and S9 illegally. It’s really wild. The numbers they mentioned were quite shocking.
I blamed the government for this situation. They introduced flawed policies in the beginning, especially by setting the wrong electricity tariffs for the mining industry. They treat Bitcoin like it’s printing money—literally, like printing U.S. dollars—and imposed the highest electricity rates on miners.
Because of that, it became very difficult to get a license, which pushed many people into illegal operations. And with the ongoing sanctions, many people prefer to take the risk and run their machines in basements or other hidden places to make money.
So it’s cheap enough for residents to mine using S9s and M3s? I mean, these are machines that are completely obsolete at this point.
Yes. When you mine Bitcoin and convert it to Tether (USDT), and then convert that to Iranian rials, it’s actually still profitable. Right now, even with an S9 or M3, you can make it work.
So that’s what you can earn if you’re paying the standard residential or business electricity rate. But what about if you’re mining under the official tariff rate—where there’s a specific tax or surcharge on the electricity? How much does that add to the cost? Does it make legal mining unviable for some people?
Yes, with these electricity and gas tariffs—because we also use gas to generate electricity—the costs are very high. Even though Iran is the second-largest gas producer in the world, gas for the mining industry carries one of the highest tariffs, just like electricity.
We can generate electricity either from the grid or by converting gas with engines or power plants. Then we connect the mining machines to that electricity. But both options are very expensive. Because of that, we often don’t have enough revenue to pay taxes.
According to government regulations, miners can be tax-exempt if their Bitcoin earnings are reinvested into the Iranian economy. However, the tariffs are so high that it’s difficult to afford anything beyond basic operations. People can’t pay for labor, facility rent, or even the legal and regulatory obligations. That’s why many have shut down legal mining operations and turned to illegal methods instead.
So now, as I mentioned earlier, only five megawatts of capacity is operating legally, while around 2,000 megawatts—or two gigawatts—is being mined illegally in Iran.
We talked about residential and basement mining, but what about industrial-scale miners? Do they operate small, scattered sites? Are there places they go to try to hide from the government?
I don’t have exact statistics on that, but I’ve heard of many examples. Instead of basements, people are using other kinds of spaces. For instance, just a few days ago, the authorities discovered mining machines in a general storage facility—it was quite surprising.
They’ve also found miners in office buildings. I remember about two years ago, they even discovered mining machines in the basement of a currency exchange. It was a big news story at the time. The operators claimed it was just a data center, not a mining operation.
When the truth came out, it caused a scandal for the management of that office. So yes, right now, people are trying to mine wherever they can. As you know, Bitcoin is trading at around $84,000 to $85,000 right now.
People also believe the price will rise even more in the coming months. Meanwhile, due to the ongoing negotiations between Iran and the U.S. over sanctions and nuclear issues, the value of the dollar has temporarily dropped here. But people expect that to change—one bad headline, one negative comment from President Trump, for example, and the dollar could surge again.
People are preparing for this volatility. They want to survive. Because of the impact of sanctions, people are looking for alternatives—like cryptocurrency—to survive in this struggling economy.
So, regarding payment rails for cryptocurrency: you mentioned that people mine Bitcoin, exchange it for USDT or other stablecoins, and then convert that into Iranian rials. Are there licensed exchanges in Iran where people can deposit crypto and have rials sent to their bank accounts? Or does this all happen under the table?
That’s a very good question. As of now, the Central Bank of Iran has not issued any licenses to cryptocurrency exchanges operating in the country. However, many of these exchanges do work in cooperation with security and law enforcement agencies, especially when it comes to investigating scams and related issues.
So, I wouldn’t call them entirely illegal, but they’re definitely not legal either. It’s a gray area. Despite that, about 18 million Iranians hold crypto assets, and there are around 300 to 600 digital exchanges in Iran. People use them to convert crypto into rials or to trade locally.
Because of sanctions, foreign exchanges—like Binance, Bybit, and others—will ban Iranian users if they find out they’re from Iran. That’s why people are relying on these domestic exchanges, even though they lack the depth and liquidity of international platforms. Still, they manage.
I believe that if sanctions were ever lifted, Iran would have massive potential to connect with global markets and exchanges. To give you an example, about 3–5 years ago, there was a major increase in gas prices here, which triggered public protests. In response, the government shut down the internet to curb communication and unrest. After that, global Bitcoin hash rate dropped by about 10 to 15%.
That incident revealed how significant Iran’s contribution was to the global mining network—even though most of it was happening illegally at the time. Since then, the government has tried to trace miners using IP addresses. But people here are smart—they use microchips in routers, VPNs, and other tools to hide or change their IPs. That makes it very difficult for the government to track them.
Some wealthier individuals even use Elon Musk’s Starlink to avoid surveillance altogether. They also bypass the electricity grid by using gas-powered generators—what we call “hot tapping”—to produce electricity and operate small underground mining farms.
Is it true that some people are mining in mosques? Maybe not inside the mosque itself, but on mosque property or in a basement?
No, technically that’s incorrect. In urban areas, there are transformers—what we call “transes”—and they have load limits. If someone tried to mine in a mosque or even a military base, it would overload the system and potentially cause explosions. So, mining in mosques isn’t feasible. People are instead setting up in what we call “silent parts,” or hidden locations.
Just to be clear, I’m not defending the government, but I’m speaking from a technical standpoint. You can’t mine in places like hospitals, schools, or mosques. Right now, people are mining in private homes. If the government wanted to mine, they have access to many better-suited locations that most people wouldn’t even know about.
Currently, Iran needs about 3,000 megawatts of electricity, but we don’t have that capacity available. Electricity is a national security issue here. When shortages lead to blackouts, people protest—and that’s dangerous for the government. They’re very sensitive about this.
Because of that, the government has to focus on managing the energy situation carefully. And although cryptocurrencies like Bitcoin are often discussed in the context of bypassing sanctions, the government itself isn’t directly involved in mining. Private individuals are doing that—not the state.
With so many people in Iran, including ordinary citizens, mining Bitcoin all over the country, where are they getting their hardware? Where do people in Iran buy mining machines? Which countries are they importing from? Are there brokers or companies that help with this?
Actually, most of the machines are brought into Iran through smuggling. Yes, smugglers bring them in—mostly from China. People here use many types of Antminers—S9s, S9j, even the newer hydro-cooled models. Hydro miners are also being used in Iran now.
There are also WhatsMiner models, like the M50 and newer versions, as well as various Avalon models, both new and used. A wide variety of machines are in use. I know this because, when we started our Bureau Miner project and later expanded into industrial farms, we needed to repair machines locally.
We sent one of our colleagues to China for training with WhatsMiner. Then a Chinese technician came to Iran to train our team. Now, we have around 80 trained technicians who can repair mining hardware. So yes, we have good insight into the types of machines currently running in Iran.
So there’s basically a black market for importing these machines. Are there any legal ways to import miners into the country? I assume you’d need to be a registered miner with the government?
Yes, exactly. If you want to work legally, you must first apply for a mining license. Once that’s approved, you submit documentation to customs that includes a list of your machines, their specifications, and the total megawatt capacity you’ll need.
You then import the machines from places like Hong Kong or Dubai. After paying the import duties and taxes at customs, you’re free to use them in two types of zones: mainland Iran and free zones. If you import into the mainland, you have to pay taxes. In free zones, however, you’re exempt from those import taxes.
I remember many Chinese companies used to operate in these free zones. They had machines running there, but when the government couldn’t provide enough electricity, those farms were shut down, and they are no longer active in Iran.
Before the government formalized industrial mining, we had customers from Europe and China. Even companies like WhatsMiner and Bitmain had machines operating here—models like the M3 and M1. We had good connections with those companies.
But after sanctions intensified, unfortunately, they had to shut down all their legal operations. Now, as I mentioned earlier, we’re down to just five megawatts of legal mining. Those sites are using brand-new machines, but because of high electricity tariffs, they might shut down soon—especially now that we’re entering Iran’s peak electricity demand season. If there’s a shortage, the government will cut off electricity to industrial mining first. So we may go from five megawatts to zero.
Just to clarify, is that five megawatts the total legal mining capacity in the country, or is it only associated with your organization, ViraMiner?
No, it’s not just us. But within our group, we have several divisions. Zero Miner is one of our subsidiaries focused on maintenance. We run 24/7 support teams and also operate HashOne, which is our central facility for hardware repair.
We also developed a mining pool called ViraPool. It was built from scratch, not just using an API—it’s fully custom software. Unfortunately, right now, no Iranian miners are using it because they’re afraid the government might trace their machines through it. So people avoid Iranian-based mining pools altogether.
We also have another division for hosting machines, but currently, only Zero Miner and HashOne are active. Before, we had three to five major teams handling operations and maintenance for multiple farms. Now, there’s only one industrial farm left operating in Iran.
Before I move on to the next question, I just want to highlight that point—the reason Iranians don’t want to use your mining pool is because they’re afraid their IP addresses might be logged. I find that really interesting.
Exactly. We also didn’t do much marketing for the mining pool. Initially, it was meant for private companies that were already working with us. I didn’t want to push it publicly because, a few years ago, when the government shut down the internet, we saw a significant drop in hash rate. That incident showed me how much hashrate Iran contributes.
At that time, about three or four mining pools were active in Iran—for example, MacD, ViaBTC, and Antpool. But after sanctions tightened, some of them began blocking Iranian users. For example, to access Antpool now, you must use a VPN. ViaBTC and EMCD are still operational here, though.
As for our pool, it was more of an experiment to understand the mining pool economy. Working with raw blockchain data and code gives you real insight into how the mining ecosystem operates—like tracking Bitcoin transactions, understanding how much has been mined and held, and how it’s sold.
When I was analyzing some pools early on, I discovered wallet graphs and saw how funds were being stored and moved. It was fascinating. But now, we’re shifting to other projects.
For instance, I don’t know if it’s the same in the U.S., but I know there are private companies there that supply retail electricity. We recently created the first online platform in Iran for selling electricity. We’re focusing on innovation—like that—and other side projects related to energy.
To wrap up, I just have two more questions. First, let’s revisit the numbers: you mentioned around five megawatts of legal mining capacity currently active, and about 400 megawatts approved but not operational. Why is that? Are there extra barriers from the government that prevent new sites from launching? Or is it just too difficult to complete the registration process?
It’s a combination of all of that. As I mentioned, the government keeps increasing tariffs—even for smaller capacities like four megawatts. At the same time, they’re still enforcing outdated or impractical regulations that make it hard for miners to operate legally.
Yes, the registration process is difficult, the tariffs are very high, and on top of that, miners don’t even know what they’re allowed to do with their mined Bitcoin. For example, if you want to reinvest your earnings into a new project, like a solar farm, the government is supportive—at first.
But if you say you want to build a solar farm and a mining farm together, they’ll block it. That discourages people from investing. We’ve been telling the government: if you want new infrastructure—like solar panels—you need to encourage investment. We’re facing energy shortages here, so new infrastructure is critical, even if it comes with risk.
People in the global mining industry are used to volatility and risk—from Bitcoin price swings to mining difficulty changes. Yet, they continue to seek out new places to build infrastructure and expand.
We’ve also told the government, “If you want investment in solar or gas-based power, mining is one of the best ways to attract it.” Iran has around 3,000 gas flares—just burning gas into the air. If someone wants to use that gas for mining by connecting it to a power plant and generating electricity, the government says, “No—we’d rather keep burning it.”
The same applies to solar power. We tell them this is a golden opportunity. Even if one day Bitcoin disappears—let’s say Satoshi Nakamoto comes out of nowhere and shuts it all down—the infrastructure will still be there. It can still generate electricity.
That’s a rational long-term investment. But unfortunately, the government doesn’t listen. They’re still trying to control everything. For example, we still don’t have legal cryptocurrency exchanges in Iran. In contrast, countries like the U.S. quickly adapt their legal systems to accommodate new technologies like blockchain.
Here, it’s the opposite. The government’s instinct is to restrict and control. They want 100% of the benefits and control, rather than a shared or cooperative approach. That doesn’t work in today’s world.
As a result, legal mining is suffering. And I’m telling you—within three or four months, it will get worse. But they can’t stop it entirely. The people working in the illegal mining space are using advanced techniques to hide from the government.
They’re very smart. Just three days ago, I had a meeting with some government experts, and I was blown away by the tactics people are using to avoid detection. Some of these methods are incredibly sophisticated.