AFTER he was busted in 1974, Jeffrey Edmondson, a small-time dealer of marijuana, cocaine and amphetamines in Minneapolis, faced a daunting bill from the taxman for all his illicit income. He argued that he should be allowed to deduct $100,000 worth of business expenses, and a court agreed. Enraged, Congress revised the tax code in the early Reagan years, forbidding tax exemptions for drug traffickers. One unintended consequence of Mr Edmondson’s audacity persists four decades later: cannabis operations, now legitimate in many states, are forbidden from the usual business deductions and face crippling tax bills of as much as 70% of revenue.

That is just one of the weird results thrown up by the unique regulatory bind in which cannabis companies find themselves. For decades theirs was an underground enterprise, run by pacifist hippies and murderous drug cartels. And although 29 states have legalised marijuana—seven of them and the District of Columbia permit recreational use—the federal government still considers pot illegal. Marijuana retains the most restricted classification for drugs with “no currently accepted medical use”, so-called schedule one, along with substances like heroin, LSD and ecstasy. For that reason, companies cannot ship materials across state lines. Compliance fears limit access to bank accounts, forcing companies to hoard cash and conduct business via armoured van. Lopsided tax incentives force firms to integrate vertically, since some labour and administrative costs can be deducted for growing operations but not from dispensaries.

Specialised firms have cropped up in the regulatory lacunae between state and federal law, providing data analysis, human-resources management and compliance exclusively to cannabis companies, says Micah Tapman, managing director of CanopyBoulder, a business incubator. Supply-chain software called GrowForce is produced by MJardin, a Colorado company catering to other cannabis firms. In other industries, such drudgery would usually be outsourced to large firms specialising in analytics or human resources. But, fearful of the wrath of the federal government, they have stayed away, creating room for smaller operations. These service providers may have worried about the installation of Jeff Sessions—who once supported death sentences for twice-convicted drug traffickers in Alabama—as attorney-general. But since he came into office Mr Sessions has not rattled his sword much, and industry insiders say business is buzzing along. Northern Michigan University now offers a specialised marijuana degree.

Because of expanded supply and competition, the wholesale price of a pound of marijuana in Colorado has dropped from a peak of $2,000 in January 2015 to $1,300. Prices are seasonal, and tend to spike in ski season, when tourists partake in the local flora. Mexican drug cartels, facing lower prices, appear to be losing market share. Border seizures are down dramatically. Cartel skunk, a “commercial-grade” product, is also seen as inferior to domestically produced stuff, notes the Drug Enforcement Administration in its national drug threat assessment.

In addition to falling prices, firms find funding elusive. Investors remain skittish about the industry, and accessing American stock markets is onerous. Instead, firms are moving north to Canada, listing themselves on Canadian stock markets to raise capital, and then investing the funds in American companies. One such company, iAnthus Capital Holdings, has raised nearly $50m says Hadley Ford, the co-founder. Mr Ford, a Wall Street veteran, found the northern relocation curious at first, but eventually adjusted. “It’s like what John Dillinger said when asked about why he robbed banks,” he says. “’That’s where the money is.’”

Editor's note: Several alert readers wrote in to point out that the quotation about robbing banks attributed to John Dillinger should have been attributed to Willie Sutton. Sutton, for his part, denied coining the phrase. But given he robbed banks for 40 years, Sutton might not be the most trustworthy source about what he did or did not say.