NEW YORK — The Coinbase users’ phones would get flooded with alerts. They would panic, thinking their cryptocurrency accounts had been compromised.

Then, they would get an email saying an employee with the company, the largest crypto exchange in the United States, would call with help. Sometimes, the email included the name “James Wilson.”

The users would follow the caller’s instructions, moving money to what they were told was a new, safer account that would be controlled only by them. At that point, prosecutors said, their funds vanished into the control of Ronald Spektor, a 23-year-old man who lived in his father’s home on the edge of the New York City borough of Brooklyn in Sheepshead Bay.

The Brooklyn district attorney’s office says about 100 users fell prey to his scheme, losing nearly $16 million in cryptocurrency, but they believe there could be more victims. Spektor emptied crypto wallets, authorities said, recruited helpers, laundered the money and laughed about it online.

On the encrypted app Telegram, Spektor posted as @lolimfeelingevil. He bragged, according to prosecutors, of how he lost $6 million in crypto by gambling but made millions more through swindles.

On Friday, Spektor appeared in state Supreme Court in Brooklyn in khaki pants and an oversize brown jacket, his hands cuffed behind him.

He was quiet while he was arraigned on a 31-count indictment charging him with first-degree grand larceny, first-degree money laundering and other counts.

Spektor, who has been held at Rikers Island since the beginning of this month, pleaded not guilty.

Boosters for years have promoted cryptocurrency as a transparent way to free money from the trammels of government regulation, allowing capital to move seamlessly across borders. President Donald Trump has declared himself the crypto president.