MedMen, a Los Angeles-based chain of marijuana dispensaries, can't trade on Wall Street because cannabis is illegal in its home country.

So it listed in Canada.

MedMen started trading this week on the Canadian Securities Exchange, or CSE.

They're not alone. US cannabis companies are heading north to list on stock exchanges in Canada, where there's no federal ban on marijuana sales. Medical marijuana is legal there, and the country is in the process of legalizing recreational marijuana, too.

It's a two-way street. Some Canadian cannabis companies have come south to list on Wall Street exchanges, because they're not subject to the same restrictions that keep US pot growers away.

In the US, medical marijuana is legal in 30 states, and recreational is legal in 10. But US cannabis companies can't list on US stock exchanges or even get basic financial services, because marijuana is prohibited by the federal government.

Related: Celebs are jumping on the marijuana brand wagon

"There are no straight roads and there are no clear paths," said MedMen CEO Adam Bierman.

Chand Jagpal, chief financial officer for Prime Harvest, a California-based cannabis cultivator, said his company is in the process of listing on the CSE through the reverse merger of a company called ME Resource Corp.

"From the Canadian perspective, it's not an illegal activity, from the US perspective, it is," said Jagpal, who's originally from Vancouver.

The CSE is jokingly referred to as the "cannabis stock exchange" because 76 of its 379 companies are in cannabis.

"Yes, yes, we've heard that one," Richard Carleton, CEO of the CSE, said of the nickname. He said he lists companies "operating within the boundaries of what is a tightly regulated state framework."

Some analysts say it's in the best interest of the United States to resolve the legalization issue on a federal level.

"If the US doesn't get its act together and resolve this federal-state conflict, we're going to lose a business that should rightfully be ours," said Troy Dayton, CEO of The Arcview Group, a market research firm in cannabis.

Related: IRS collects billions in pot taxes, much of it in cash

A few Canadian cannabis companies have made it onto American exchanges.

Canopy Growth (CGC), a Canadian cannabis company, started trading on the New York Stock Exchange on May 24.

"You can list here [in the US] if you're not breaking any of the rules in any of the jurisdictions that you operate, and I don't break any rules because I don't operate in any jurisdictions where it's federally illegal, which unfortunately includes the US," said Bruce Linton, CEO of Canopy, which is traded on the Toronto Stock Exchange under the ticker WEED.

MedMen planted roots in Canada in March. The company had conducted a reverse takeover of Ladera Ventures, a shell company already on the CSE, and avoided having to file an Initial Public Offering. It also formed a partnership with Canadian cannabis producer Cronos Group (CRON), which joined the Nasdaq in February.

"It's a very unique system," said Charlie Alovisetti, a lawyer with Vicente Sederberg, which advises investors and businesses in the cannabis industry. "Canadian investment is appealing because it allows you to get your foot in the door in the Canadian cannabis industry, while remaining on the right side of the federal law."

Last year, Constellation Brands (STZ), a US company that owns alcoholic beverage brands including Corona beer, paid $190 million for a 10% stake in Canopy Growth Corp., a Canadian cannabis producer.

The NYSE and Nasdaq declined to comment for this story, but they confirmed that because marijuana is legal there, Canadian cannabis companies are not banned from Wall Street exchanges.

Related: Canada could make billions from legal pot

US exchanges are losing out on fees associated with listing, and US banks are losing out on financing, according to Jason Zandberg, an analyst who covers Cronos for PI Financial.

"Exchanges like the CSE are becoming relevant in North America whereas three or four years ago the CSE wasn't even relevant in Canada," he said. "We have seen many businesses that have embraced the cannabis sector and have surpassed their competitors that have not."

There's a lot of money being left on the table with marijuana. The US market is bigger than Canada's, even with federal prohibition.

In Canada, medical marijuana revenues totaled less than $500 million last year, according to New Frontier Data, which analyzes the industry. But that's expected to grow. Lawmakers are working to end federal prohibition of recreational marijuana this year, which could fuel a $6 billion market by 2024, according to New Frontier Data.

But that still wouldn't top the US, where state-by-state marijuana revenues totaled $8.3 billion last year, according to New Frontier Data. It's expected to reach nearly $22 billion by 2025.