A bitcoin exchange in South Korea has gone out of business after being hacked, highlighting the perils of trying to cash in on this year's stunning boom in digital currencies.

Seoul-based Youbit said it was filing for bankruptcy after cyber-thieves stole nearly a fifth of its clients' holdings in an attack Tuesday.

It's the second time this year that Youbit, which allows customers to trade bitcoin and other digital currencies, has been hit by hackers.

In April, thieves made off with 38 billion won ($35 million) in digital currencies. The company didn't say how much was taken in the latest heist or how exactly it happened.

Related: What is bitcoin?

South Korea's Korea Internet and Security Agency said Wednesday that it was working with police to investigate this week's Youbit hack, but that it didn't yet know who was responsible.

Youbit said that its customers would get back about three-quarters of the value of the digital currencies they had stored in accounts with the exchange. The rest will be refunded after bankruptcy proceedings, it said.

Bitcoin's history is littered with cases of trading platforms coming under attack.

Earlier this month, hackers stole more than $70 million worth of bitcoins from digital currency platform Nicehash. Last year, Hong Kong-based exchange Bitfinex was briefly shut down after hackers stole more than $60 million in bitcoins.

Related: More than $70 million stolen in bitcoin hack

Tim Wellsmore, director of threat intelligence at cybersecurity firm FireEye, said bitcoin exchanges had been slow to respond to the threats posed by hackers.

"As the prices of bitcoin and similar virtual currencies continue to appreciate, we expect greater interest from attackers seeking to steal it," he said.

Bitcoin's price (XBT) is now more than 15 times as high as it was at the start of the year.

Suspicion for this week's Youbit hack could fall on North Korea.

South Korean police have accused North Korean hackers of targeting at least four different exchanges this year that trade bitcoin and other digital currencies in South Korea.

North Korea has previously denied any role in international cyberattacks.

Related: North Korea may be making a fortune from bitcoin mania

Bitcoin, which offers layers of anonymity, has long been a magnet for criminals.

Unlike traditional currencies like the U.S. dollar, digital currencies don't fall under central bank control and are largely unregulated.

South Korea has become a hotbed of bitcoin activity. On a given day, the country can account for about 20% of worldwide trading in the cryptocurrency.

Bitcoin is in such high demand there that traders can end up paying a premium of between 15% and 20% compared with prices elsewhere.

Related: Bitcoin futures trading just got a lot bigger

Youbit was a small player in the market, which is dominated by Bithumb, a much larger exchange.

With so many small South Korean investors diving into bitcoin, authorities are getting worried about the potential impact of a crash.

The government earlier this month said it was forming a special task force to study the "cryptocurrency problem."

-- Jake Kwon and Hannah Kang contributed to this article