A 24-year-old trader bilked his downtown employer out of $2 million dollars worth of bitcoin and Litecoin over a two-month period last year, according to federal prosecutors.

Joseph Kim is the first person ever charged in Chicago with wire fraud stemming from the burgeoning cryptocurrency trading industry, the U.S. Attorney’s office announced Thursday.

In September 2017, managers at Consolidated Trading LLC moved Kim from their bond group to a new cryptocurrency group as the company ventured into the industry, according to the criminal complaint.

Kim soon transferred 980 Litecoins valued at $48,000 from a Consolidated account to his personal account, prosecutors said. Kim told a curious company director that he made the transfer only as “an intermediary holding space” for safety reasons, prosecutors said.

By the end of November, he had pocketed more than $3.2 million in bitcoin transfers from company accounts to cover his own trading losses, though he returned about $1.2 million of it, prosecutors said.

When company officials confronted Kim in November, he wrote in an email that “until the end I was perversely trying to fix what I had already done,” according to the complaint.

“I can’t believe I did not stop myself when I had the money to give back, and I will live with that for the rest of my life,” Kim allegedly wrote.

Neither Kim nor Consolidated management returned messages seeking comment.

Cryptocurrency markets have expanded over the last decade as hundreds of the digital units — all independent of a central bank — have come into circulation across the internet. Some of those markets have boomed over the last year, and in December 2017 they were made available on U.S. exchanges. A single Litecoin valued about $225 as of Thursday evening, while a bitcoin was worth nearly $10,000.

Kim is a University of Chicago graduate who started working at consolidated in July 2016, and he also briefly worked as a cryptocurrency trader in South Korea, according to his LinkedIn profile.

Another Consolidated employee told FBI investigators that Kim indicated he was a “degenerative gambler,” prosecutors said.

Kim could face up to 20 years in prison if convicted of the single count of wire fraud. He is scheduled to appear in federal court Friday morning.