THE pattern is familiar. Computer geeks develop technology that threatens to overturn established markets and habits. Regulators then scramble to understand and tame the beast. This is what is happening in the financial world in the wake of an explosion of crypto-currencies. Over the past year the pool of virtual currencies has both deepened, from $30bn to $400bn, and widened, with the spread of “initial coin offerings” (ICOs, a form of fundraising in which investors in young companies are issued with virtual tokens). Hedge funds, students and pensioners have all been caught up in the crypto craze.

This worries authorities, because the crypto-sphere is far from risk-free. Valuations can leap and plunge: after a giddy rise, between December and February the price of bitcoin dropped from nearly $20,000 to less than $7,000. (It is now around $9,000.) Several ICOs have turned out to be scams. Legitimate tokens are in danger of being stolen. Some crypto-currency exchanges have been hacked.

In response, national authorities are starting to think seriously about a legal framework for finance’s unruly frontier. Regulators fret about how to classify ICOs and tokens (are they securities, or not?) and how to tax them. They want to stop their use for such evils as money-laundering and financing terrorism. And they worry about how to protect retail investors from the risk of losing their shirts.

Indeed, scarcely a day passes without a supervisor somewhere calling for tighter regulation, or taking action. On April 6th the Financial Conduct Authority in Britain warned firms offering services linked to crypto-derivatives that they were subject to its rules. On April 10th Taiwan’s finance ministry said it was planning crypto regulation aimed at money-launderers. On April 17th New York state’s attorney-general asked 13 crypto-exchanges for information about their operations, conflicts of interest and safeguards for customers.

Regulators are plotting together as well as separately. When the governors of the G20 countries’ central banks met in Buenos Aires in March, crypto was high on their agenda. They agreed that at present these assets are too small to be of systemic importance, but they committed themselves to extending standards to which financial institutions already adhere—such as know-your-customer (KYC) rules and procedures for monitoring unusual transactions—to the crypto-world, in order to thwart the illicit use of virtual currencies.

When bitcoin entered public awareness it was chiefly as a facilitator of anonymous, illegal sales on the “dark web” and as the currency of choice for online ransoms. Many in law enforcement thought its anonymity would make it ideal for criminals of all stripes. But until recently evidence of this was scarce. “The overwhelming view was that crypto-currencies had great utility to cyber-criminals but limited use to other criminals,” says David Carlisle of the Royal United Services Institute, a think-tank. Volatility and illiquidity limited their use for money-laundering. But evidence that crooks are making more use of them is mounting (see article).

The most logical parts of the crypto-infrastructure to regulate are the platforms on which virtual currencies are exchanged for ordinary money. Several countries, such as Australia and South Korea, already do this. The EU’s fifth anti-money-laundering directive, which was passed by the European Parliament on April 19th, also includes measures to regulate exchanges. But many places have no rules at all.

That may suit many crypto-entrepreneurs, but not all. Several exchanges are, for example, voluntarily implementing KYC standards (eg, by asking new customers to prove their identities), banning coins promising extra privacy or using software to monitor unusual transactions.

Agreed rules would help to tie exchanges into the mainstream banking system. Many of them currently choose unfussy jurisdictions or institutions, because conventional banks will not serve them. Lenders are wary both of credit risk and of abetting crime if exchanges don’t police users. Proponents of regulation say that once exchanges operate in a clear legal framework, those risks should be reduced and banks will take them on. That in turn will make it easier to keep an eye on exchanges.

Regulators disagree about consumer protection. Some see shielding investors from harm as their job; others think people should be free to gamble if this poses no wider risk. Many have warned investors to be wary of ICOs. Some authorities want both to protect consumers and to allow legitimate crypto-businesses to flourish in their jurisdictions. Gibraltar already licenses some crypto-companies. France is working on a system of voluntary licensing. Iqbal Gandham of CryptoUK, which represents some of Britain’s largest crypto-companies, believes such initiatives could help legitimate businesses gain access to banks and perhaps even advertising. “We also don’t want to have criminals on our platforms,” he says.

Authorities also worry about taxation. They spy a new source of revenue: because trading crypto can be lucrative, they are keen to levy capital-gains tax on any profits. And they fear losing existing income: virtual currencies might be used to hide money. Because most exchanges have operated in the dark, reliable data on crypto-evasion do not exist. Most countries are still working out how to define tokens, let alone tax them. Some are stepping up, however. In February Coinbase, an exchange, said it had unsuccessfully fought an American court order and would have to hand the identities of 13,000 customers to the Internal Revenue Service. Other exchanges have fled to offshore jurisdictions with more favourable tax regimes.

With so many poorly understood risks, some regulators think the only safe answer is to shut the whole crypto-sphere down. China, for example, has banned ICOs and exchanges. But elsewhere this is neither desirable nor practical (it requires tight censorship of the internet). Crypto-enthusiasts see parallels with the early days of the internet, when authorities also strove to control a new arena—and declared it a nest of criminality. Most countries have since decided that the web’s benefits outweigh its costs. It is too early to say whether this will be true of crypto-assets or the blockchain technology that underpins them. But it would be wrong to outlaw them before knowing the answer.