China may be trying harder than ever to stomp out cryptocurrency mining. But one big corner of the crypto mining world — in mainland China — is thriving: the companies that manufacture hardware that enable crypto mining.

Exhibit A may be the rising fortunes of crypto mining rig maker Canaan — which is listed on Nasdaq but based in Beijing. It even made a rap song in October to show off its manufacturing muscles and its large Beijing office.

Canaan’s third-quarter report released Tuesday shows it recorded a net income of 467.2 million yuan (US$72.5 million) in the period, compared to a net loss of 86.4 million yuan (US$13.5 million) in the same period last year and a net income of 167.3 million yuan (US$26.2 million) in the second quarter this year.

The company’s total net revenues expanded by 708.2% year-on-year to 1.3 billion yuan (US$204.5 million), and was up 21.8% from the second quarter.

On top of selling mining rigs, Canaan continues to develop its self-mining business. Nangeng Zhang, chairman and CEO of Canaan, said in an earnings call following the release of the quarterly results the company had operated mining machines with a total computing power of about 32,000 terahahes per second at the early stage earlier this year, and now machines that can run up to 850,000 TH/s have arrived at its partnered mining facilities and are in the process of being deployed.

Zhang said the company has also entered into deals with its mining partners for 1 million TH/s of additional computing power, for which the machines are scheduled to be shipped to corresponding mining facilities by the end of January next year.

Canaan has bet big on Kazakhstan — a popular destination for Chinese crypto miners as they look for more regulation-friendly shores. It said in June it had launched its own crypto mining business in the Central Asian nation.

However, things are not necessarily looking good there. Kazakhstan is experiencing power shortages, and some of the legal crypto miners have faced electricity rationing, where miners have had to halt operations.

The energy minister of Kazakhstan, however, said earlier this month that the authority will not restrict power consumption for legal crypto miners, according to a government statement. The energy authority has proposed to cap the nationwide total electricity consumption for new crypto miners seeking technical permissions to connect to the power grid.

The latest data from the Cambridge Centre for Alternative Finance indicated that at the end of August, Kazakhstan came in second in terms of global hashrate share, accounting for 18.1% of the total, up from 8.2% at the end of April.

In response to the recent policy shifts in Kazakhstan, Zhang said the recent policies will likely promote a more sustainable development of the crypto mining industry in the country.

Zhang said its three largest customers in Kazakhstan are large-scale miners that have obtained the necessary approvals from the authorities to conduct mining business, and therefore ensure Canaan’s business development in the country. The policy will also likely prevent unqualified and small mining companies from conducting speculative and market disturbing activities, which could in turn benefit Canaan’s business, according to Zhang.

Canaan is expected to see more growth in the near future. The company said in the Tuesday report it is expecting total revenues to increase by a further 35% to 50% in the fourth quarter of this year.