Canaccord Genuity Group Inc.’s third-quarter earnings got a major lift from a flurry of deals in the Canadian cannabis sector, which helped the investment bank see its net income rise more than 500% year-over-year.

The Toronto-based financial services and advisory firm reported adjusted net income before taxes of $50.3 million for the three-months ended December 31, compared to $7.8 million during the same period in 2016.

That works out to earnings per share for the fiscal third quarter of $0.31, well above the $0.17 expected by analysts surveyed by Thomson Reuters.

It also earned revenue of $309.4 million, marking a record for the organization.

“Canaccord Genuity was the leading independent investment bank in Canada for calendar 2017 by a wide margin for both number of transactions and total amount raised, and this business continues to be active with numerous transactions in the blockchain and cannabis sectors,” said its chief executive officer Dan Daviau in a letter to shareholders.

Daviau said the primary driver was its capital markets division, which participated in 141 transactions globally including several large transactions in the marijuana sector for companies such as Aurora Cannabis Inc.

The investment bank was also kept busy by growing interest in blockchain, participating in transactions for firms such as Global Blockchain Technologies.

But financing activity was particularly brisk in the cannabis sector as firms raised cash to gear up for the legalization of the drug for recreational use in Canada later this year.

Smaller investment banks such as Canaccord have been the beneficiaries of Canada’s burgeoning cannabis industry, while the country’s biggest banks — many of which have ties to the U.S. where medical pot remains illegal under federal law — have been reluctant to serve them.

And in January, U.S. Attorney-General Jeff Sessions rescinded an Obama-era memo that suggested that federal lawmakers would not intervene in states where the drug is legal, which allowed legalization of the drug to flourish in several states. Sessions said he would leave it to federal prosecutors in those states, such as California, to decide how aggressively to enforce federal law.

That same month, the Bank of Montreal participated in a $175-million bought deal for licensed marijuana producer Canopy Growth — which does not have any U.S. exposure — marking a big shift in policy for the country’s biggest financial institutions.

Daviau said Wednesday that Canaccord is “happy” the big banks want to enter the sector.

“(It) just adds further credibility to the sector, improves valuation, broadens distribution,” he told analysts on a conference call.

He also noted that most of the money Canaccord makes in the cannabis sector comes from “helping little companies grow to be very big companies.”

“We don’t pursue bank competition in that area,” he said. “Quite frankly, we’d welcome it. But they wouldn’t stand a chance.”