Soon, legal marijuana businesses may have a better place to put their cash than a safe or a duffel bag: In the bank.

The wonders of the US constitution have created a situation where 20 states allow marijuana to be used or distributed, but the drug is still illegal according to federal law. That puts legal marijuana businesses in those states in something of a pickle: They can open a business but they can’t open a checking account. While federal law-enforcement officials have been ordered to overlook farms and dispensaries that obey state law (and even, then they don’t always), bank regulators didn’t have a similar exemption until today.

In two new guidance documents, the Treasury department’s Financial Crimes Enforcement Network (Fincen) and and the deputy US attorney general gave banks a carefully worded go-ahead for doing business with marijuana firms. Essentially, as long as a bank determines that a marijuana business is obeying the regulations of its state, and isn’t violating one of eight principles outlined by the attorney general—like providing marijuana to minors, funneling money to a criminal organization, using violence, or trafficking marijuana to states where it is illegal—the bank can take it on as a client.

The rub, however, is that the bank will need to file regular Suspicious Activity Reports detailing all the transactions made by these customers. (A failure to file a SAR about a client exchanging bitcoin for drugs is one reason that crypto-currency entrepreneur Charlie Shrem has been indicted by federal prosecutors.) Banks doing business with marijuana firms will have to file “marijuana limited” SARs with Fincen, basically recognizing that yes, this is illegal, but it exists in a grey area. If, however, they suspect the marijuana business of breaking local laws or violating one of the attorney general’s eight principles, they have to file a “marijuana priority” SAR telling federal officials what they think is going on and likely inviting further investigation.

Because filing these SARs goes above and beyond the regular anti-money laundering checks banks have to perform for most businesses, and because the legal ground around this conflict is so untested, most observers don’t think the largest national banks will start handling payroll for your local weed shack just yet. But the fledgling industry is pleased nonetheless; the executive director of the National Cannabis Industry Association called the decision “a huge victory.” Doing business entirely in cash isn’t just a hassle; keeping that much cash on hand also invites crime, so marijuana advocates see the government’s decision as first step toward bringing the industry into the light.

The other winner will be the smaller local credit unions and banks in Washington and Colorado, the two states that legalized recreational marijuana use last year. These institutions are more likely to take on the risk of working with marijuana businesses, and likely better placed to evaluate and underwrite that risk. One forecast by Arcview Market Research suggests legal marijuana could add $2.57 billion to the US economy this year; seizing a chunk of that pie could be a very lucrative move for a small bank with an eye on the main chance.