Canada’s federal and provincial governments stand to rake in at least $675 million a year ($500-million U.S.) by legalizing — and taxing — weed, according to new analysis released ahead of the official unveiling of Justin Trudeau’s marijuana legislation.

The analysis by the C.D. Howe Institute suggests that the government would be able to take a significant bite out of the black market, as long as they don’t set marijuana taxes too high.

The Trudeau government is expected to introduce a bill on Thursday that’ll outline their plan for legalizing weed, with the goal of making marijuana legal on or before July 1, 2018.

The Trudeau government is expected to introduce a bill on Thursday that’ll outline their plan for legalizing weed.

The study makes its predictions assuming that the government will only apply the existing existing provincial and federal sales taxes to marijuana.

That assumption breaks down a key choice the Liberals will have to make: Squeezing out the black market or generating revenue through taxes.

Most indications thus far suggest that the government is looking towards a dedicated tax on marijuana, on top of the sales taxes, one that could push prices higher than what the black market is charging.

A study released last year, conducted by a task force appointed by the Trudeau government, recommended a minimum price or dedicated tax for marijuana, based on how potent the marijuana is. The report recommended the government “conduct the necessary economic analysis to establish an approach to tax and price that balances health protection with the goal of reducing the illicit market.”

To be competitive with the illegal market, Wyonch argued, legal weed must be priced similarly.

Heavy taxes will ensure the black market continues to thrive, while lower taxes will mean little revenue and “consumption of marijuana may increase due to low prices and a newly accessible legal supply,” wrote Rosalie Wyonch, a policy analyst with the C.D. Howe Institute. The benefit of lower taxes, however, is that they’ll discourage the illicit market, therefore ensuring more regulated product.

To be competitive with the illegal market, Wyonch argued, legal weed must be priced similarly: If legal weed is priced $1 higher than illegal weed, about 35 percent of the market would stay unregulated

Wyonch estimated that if current prices remain the same — around $9 per gram, adjusted for potency — the government would pull in about $675 million a year, and control more than 90 percent of the weed market. That figure would depend, as well, on a willingness for consumers to pay a premium for a legal product.

If Ottawa were to raise taxes a little higher, with the aim of raising $1 billion per year, the black market would survive at about half of its current size, the report estimates.

“On one hand, higher cannabis prices discourage consumption, especially among young Canadians who are likely to be more sensitive to price.”

In 2018, an estimated 4.6 million people over the age of 15 will use cannabis — 655 metric tons of it — at least once, according to projections from the parliamentary budget officer. By 2021, this number to could jump to 5.2 million — 734 metric tons.

The projections, released in November of last year, also acknowledged the trade-off.

“On one hand, higher cannabis prices discourage consumption, especially among young Canadians who are likely to be more sensitive to price,” said the report. “On the other hand, higher legal cannabis prices provide a disincentive for current users to transfer to the legal market. The higher the premium for legal cannabis over the illicit price, the more Canadians will purchase cannabis on the illicit market.”