The operators of the only bitcoin mine in Missoula County, Montana, thought they were doing everything right. They set up shop in an abandoned mill on the edge of town, made a plan to recycle the computers when they conked out, and contracted with a nearby dam for cheap renewable power. Sure, it might be a warehouse full of energy-intensive computers and cooling systems, designed to churn out digital money day and night. But it would be a low-carbon, low-impact operation all the same.

Gregory Barber covers cryptocurrency, blockchain, and artificial intelligence for WIRED.

Not so fast, said county officials. They pointed to a different culprit: a giant coal plant halfway across the state. If energy from the dam went to bitcoin mining, they said, the county as a whole would wind up using more coal. In April, officials required all future mines to build their own renewable power.

Missoula County was on the right track, says Christian Stoll, an energy researcher at the Technical University of Munich. In a paper published Wednesday in the journal Joule, his team takes a closer look at the energy consumption of bitcoin mining, based on where miners are located and the types of machines they are using. “Coal is fueling Bitcoin,” he says. “The question is how to prevent it, and that’s up to local regulators.”

Bitcoin mining, a process called “proof-of-work,” involves a global network of machines racing to solve complex math. In return for helping to keep the network secure, the solver receives bitcoin. When it comes to measuring energy use, the global nature of that activity makes it difficult to study; it’s hard to know what kinds of machines are running, where they’re located, and the fuel used to supply the electricity.

Those unknowns have led to wildly varying estimates. One study said that growth in bitcoin mining alone could result in a 2 degree Celsius increase in global temperatures. But others say such estimates are inflated as miners increasingly flock to sources of cheap renewable energy, like hydropower.

Stoll’s team was able to take a more granular look thanks to a stroke of good timing. Last year, three Chinese makers of mining hardware, responsible for producing nearly all of the world’s machines, filed for initial public offerings. In the process, they disclosed a trove of technical details and data about market share that’s usually kept under wraps. Poring through those documents, the researchers could assemble a look at what kind of equipment is being used and where.

Another advantage: Bitcoin isn’t as decentralized as it looks. Gone are the days of anonymously mining bitcoin on your home computer. Today, the network is dominated by a handful of “pools,” which coordinate their efforts. By locating the IP addresses of the pools’ servers and devices, the team found it could develop a rough geographical footprint of bitcoin mining.

Adjusting for factors like the size of the mining facilities (bigger ones can be cooled more efficiently) and the average emissions in popular regions for mining, Stoll’s team estimated Bitcoin’s CO 2 emissions at about 22 megatons per year. That puts it somewhere between the annual emissions of Jordan and Sri Lanka. Or, to put it another way, it’s roughly the carbon footprint of the Kansas City metro area. (Yes, that should tell you we use a helluva lot of energy in this country.) That’s actually on the conservative end of other, more alarming estimates. Factoring in other crypto coins that use similar proof-of-work algorithms---Ethereum, Monero, zCash, and others---the emissions figure could roughly double, Stoll says.

Not everyone is on board with that conclusion. In a separate report published this week, Christopher Bendiksen of CoinShares, a blockchain industry research group, argues that most estimates undersell the role of renewable energy in bitcoin mining. It has to do with centralization, he says. Just like the data centers run by big tech companies, bitcoin miners with means can choose to build where there’s the cheapest energy, which often happens to be renewable. Miners have thus flocked to be near dams in places like the Pacific Northwest and upstate New York, and hydrothermal plants in Iceland. CoinShares estimated some 74 percent of bitcoin mining is powered by renewables.

LEARN MORE The WIRED Guide to Bitcoin

The main source of disagreement? “China is the key piece here,” says Stoll. The Chinese dilemma looks a bit like Missoula’s, but on a far more massive scale. While China is responsible for the majority of mining, it’s split between two different worlds, energy-wise. In southern China, especially the mountains of Sichuan province, miners take advantage of cheap and abundant hydroelectric power. But the other Chinese mining mecca is Inner Mongolia, which runs on coal. CoinShares estimates 80 percent of Chinese mining takes place in the wider Sichuan region. But based on interviews with miners and IP data from the largest Chinese mining pool, Stoll arrived at a lower number---about 58 percent.