After months of debate and speculation, Iran's government has officially recognised cryptocurrency mining as an industry.
As approved and notified by the government, mining cryptocurrencies is legal both inside and outside metropolises, in addition to free and special trade zones, provided applicants obtain a permit from the Ministry of Industry, Mine and Trade.
The electricity required by cryptocurrency miners will be provided either from the nationwide grid or through establishing new power plants outside the grid.
The electricity price offered to miners will be equal to the average rial price at which Iran exports its electricity to other nations, or to 70 percent of the average rial price at which the country ships off its natural gas.
The Ministry of Energy and the Ministry of Oil will calculate and announce the price in the near future. Iran operates three exchange rates. The average price of electricity and natural gas exports will be calculated using the rial rate that is decided in NIMA, an online currency system where Iranian exporters are obligated to sell their foreign currency earnings for rials.
"Using electricity or natural gas to mine cryptocurrencies is forbidden in peak consumption times," asserts the cabinet directive, which also calls on the Ministry of Energy to announce peak hours and combat violations through installing a grid of smart power meters.
The cabinet decisions come just over one month after various factions of the government, especially the Ministry of Energy, intensely cracked down on cryptocurrency miners who were accused of taking advantage of the country's cheap, subsidised power.
Miners, in return, said they were being scapegoated and called on the government not to miss out on the unique opportunity cryptocurrency mining provides to create jobs and attract foreign investments, especially given the harsh economic sanctions imposed on Iran by the United States.
The cabinet's directive further emphasises that using electricity and gas provided at household, agricultural or industrial grades is forbidden and will be met with legal action if found out.
Use of clean and sustainable sources of energy is permitted and falls under the jurisdiction of the Ministry of Energy, the government said.
A new, uncertain start
"As a whole, this is the start of something positive since it legalises important aspects of cryptocurrencies," Hamed Salehi told Al Jazeera. He researches cryptocurrency and blockchain.
"This means that people active in this field will no longer run the risk of being slapped with accusations of criminal wrongdoing," he said.
In recent months, various state actors, including the cyberpolice, have sent mixed signals about the legality of using cryptocurrencies. Those signals confuse stakeholders.
In late January, the Central Bank of Iran (CBI) published a draft cryptocurrency regulatory framework that proposed legalising limited use of cryptocurrencies within the confines of the country's foreign currency laws. At the time, however, it outlawed using cryptocurrencies as a local method of payment.
The government's August 4 directive seemed to back that proposal. It said employing cryptocurrencies is permitted if users accept the risks involved, and also banned using cryptocurrencies as methods of payment inside Iran.
But with all the additional expenses the directive introduces for miners, it could very well render the fast-growing industry profitless, therefore driving capital flight.
The government envisions mining farms as productive industrial units, so unless they export their mined cryptocurrencies and repatriate export yields, they will have to pay taxes.
"Final costs remain to be seen, but if they turn out to be too high, miners will immediately shift their whole operations abroad to more friendly neighbouring destinations, including Georgia, Armenia or even Iraq," Salehi said.
According to him, the worst scenario would be if professional actors quit the mining industry and are replaced by a large network of ordinary citizens who will each install a handful of devices at home seeking easy profits.
In late July, the Customs Administration designated a category for cryptocurrency mining devices, which paved the way to legalise their imports in the foreseeable future.