Among the winners in the bitcoin and cryptocurrency gold rush, an unexpected one:

Cops.

They seize bitcoin and ethereum — digital currencies — from alleged criminals, hold it for a while as the market rises, and sell it at an inflated price.

"They are the unintended beneficiaries of a bull market," said Robert Frommer, senior attorney at the Institute for Justice, which fights to end civil forfeiture, the controversial process where cops can take money from anyone they suspect is breaking the law.

How does the government get rich off bitcoin's rising prices? Take a step back.

In San Francisco in 2013, The Dread Pirate Roberts — boss of Silk Road, a darknet market selling cocaine and fake drivers licenses — was sitting in a library with an open laptop when cops tackled him.

In 2017, Alexandre Cazes — founder of AlphaBay, a market selling counterfeit currency and AK-47s — was in his house in Bangkok when cops rammed a car through his front gate and collared him.

The government also tackled and collared something more valuable than their bodies: their bitcoin.

They worm their way into the wallets holding the digital cryptocurrency. After some bureaucratic rigmarole, they auction the bitcoin off.

While they're holding the bitcoin, sometimes for years, the price rises. (Occasionally it falls, but mostly not.) The government ends up making way more money than they thought.

The cash gets distributed among various law enforcement agencies according to a complicated process. (Some goes to victims, but in the case of a darknet drug deal, who's the victim?) Law enforcement made about $50 million off Dread Pirate Roberts, although they could have made much more*. They seized about $8 million off Cazes. (The Dread Pirate Roberts got life in prison. Cazes hung himself in a Thai jail.)

In total, the fuzz has taken about $1 billion in bitcoin from all kinds of people. That's a lot of money for law enforcement, and it increases in value nearly every day they hold it.

It also creates a perverse incentive for them to play fast and loose with the rules. In fact, they've pulled some strange maneuvers that make you wonder how this bitcoin wealth is going affect the way police investigate cyber-crime.

A deep investigation by Fortune magazine shows how shadowy the government is when it comes to seized bitcoin and other cryptocurrency. From bad accounting to documented fraud, the government's handling of bitcoin is the kind of disarray and dumbassery you'd expect from an irresponsible drug dealer, not the world's most advanced authoritarians.

For starters, there's not enough accounting. The government doesn't say for public consumption how much bitcoin it's seized — either online, on paper or in a secret file in some bunker. It's at least in the hundreds of millions of dollars. But no one knows.

"I'm not sure they even know how much they have," Fortune magazine reporter Jeff John Roberts says.

Second, where there is, in fact, a decent record of their seizures, bitcoin seems to vanish into thin air. The government has seized way more bitcoin than it's auctioned.

From the story:

Fortune turned up several instances of coins whose seizure was documented but whose sale was not. Court filings from 2014, for instance, show the IRS seized 222 Bitcoins from a marijuana dealer in Texas, but there is no documentation of its sale. Likewise, there is no auction record for 50.44 bitcoins seized by the Secret Service in 2014 from a couple who ran an illegal drug and money-changing site.

So that's $2.3 million in bitcoin that's just gone in some hole somewhere. Fortune says that corruption is the exception, not the rule, and that the bitcoin will probably turn up eventually. But while it's stuck in the government's purse, it's rising in value.

Plus, dirty shit's gone down before, as some agents were just straight up stealing the cryptocurrency from alleged bad guys. While snagging the Dread Pirate Roberts, two agents got caught skimming bitcoin from his account; bitcoin now worth millions. The agents are now in jail. But did others agents get away with it?

The line between cops and criminals is never thinner than when it comes to civil forfeiture, a baffling legal loophole that was supposed to punish drug dealers but that that adds up to legal theft from all kinds of people. Last year cops commandeered $1.6 billion in money and stuff from suspects across the country, most of it from people who were never charged with a crime.

"There doesn't need to be a conviction, there doesn't need to be an arrest," said Frommer. "Civil forfeiture is one of the biggest threats to property rights in America today, including your rights to digital currency."

To reiterate: last year, the cops took more stuff from people than the criminals, as $1.6 billion was more than we lost in all the robberies and burglaries in the entire country combined. Cops protect people from theft, but civil forfeiture shows they also commit it. Civil forfeiture is like if a baker baked you a cake but ate all your Girl Scout cookies, or a mechanic fixed one car, but poured gasoline on your other one and lit it on fire.

We'd fire those bakers and take our car repair business elsewhere. But cops have a monopoly on fighting crime, and civil forfeiture lets them corner the market on stealing stuff with no worries about getting caught.

The darknet is moving on, to a cryptocurrency called monero, which is supposed to be harder to trace. But civil forfeiture won't stop.

"Civil forfeiture will always lead the government to figure out new ways on seizing and profiting from the seizures," Frommer said. "Whatever is the next big currency, they'll seize that as well."

*In 2013, cops seized 144,000 bitcoins from the Dread Pirate Roberts. That was worth $29 million then. They planned to exchange them for dollars around that time, and by holding on to it for a while, eventually sold them for $48 million. Not a bad profit for the government. But the government should've held on to this bitcoin as long as they could. If they had held onto them until now, the Pirate's booty would be worth $1.2 billion. Yes: they missed out on a billion dollars. Private buyers have done better. The genius buyer was Tim Draper, a venture capitalist, who bought 30,000 of the Dread Pirate Roberts' bitcoins in 2014. His buying price wasn't revealed. But if he paid fair market value of $500 each, his $15 million investment has now turned into $261 million.