One of the country’s top central bankers says the Bank of Canada is going to start the work to build its own digital currency as a backstop should the day arise where cash is no longer king.

In a speech in Montreal, deputy governor Timothy Lane said Tuesday there isn’t a compelling case to issue a central bank-backed digital currency right now.

But the timeline to create one is long enough that the Bank of Canada is beginning work in the event cash is no longer used for most transactions.

Lane said such as situation could erode competition in the financial services sector and payment privacy, as well as exclude marginalized populations from fully participating in the economy.

He added the bank could issue its own cryptocurrency if private digital currencies or those offered by other central banks become widely used in Canada and erode the Bank of Canada’s ability to manage monetary policy.

There are still several steps to go through before the Bank of Canada can issue a digital offering, including settling on the technology to use and getting the legal authority from Parliament to do so.

“It is clear that technology is changing the world around us. And while we cannot perfectly predict the future, we can certainly plan for contingencies,” said Lane, based on a text of his speech released in Ottawa.

“This includes readying ourselves in case a decision is made some day to issue a Bank of Canada digital currency.”

The Bank of Canada has spent six-plus years researching the economic and technological impacts of the growth of volatile digital currencies like Bitcoin, and more recently watched the growth of “stablecoins” that maintain a stable value, as the name implies, and are backed by currency holdings.

Lane says these stablecoins — of which there are about 150 worldwide — have a better prospect for widespread adoption, including Facebook’s proposed Libra that the social media giant plans to launch.

As it stands, the Bank of Canada can design, issue and distribute the bills Canadians hand over when buying a cup of coffee, but it doesn’t have the legislative authority from Parliament to offer a digital currency.

Discussions are expected to begin with the Finance Department about the scope of any legislative changes, and how that might affect the design of a central bank digital currency.

“Of course, even such a shift toward a cashless society does not automatically mean the bank would issue a (digital currency),” Lane said in the speech to a financial technology conference in Montreal.

“That’s a choice that Canadians and their elected representatives would need to make at the time.”

There are also important design options for the central bank to consider, including how to prevent money laundering and terrorist financing and ensure a digital currency doesn’t promote a bank run.

Other issues to manage include how to allow anyone in the country to use the digital currency, including people who don’t have bank accounts or those living in remote communities where online access is limited.