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.