Flexcoin, a Canada-based bitcoin bank, said it was closing down after losing bitcoins worth about $600,000 to a hacker attack enabled by flaws in its software code.

Flexcoin said in a message on its website that all 896 bitcoins stored online were stolen on Sunday. Its collapse came after Mt. Gox, once the world's dominant bitcoin exchange, filed for bankruptcy protection in Japan and said it may have lost some 850,000 bitcoins due to hacking.

"As Flexcoin does not have the resources, assets, or otherwise to come back from this loss, we are closing our doors immediately," Flexcoin said.

It later posted an update on its site saying that the attack exploited a flaw in its code on transfers between users and involved inundating the system with simultaneous requests to move coins between accounts.

"Flexcoin has made every attempt to keep our servers as secure as possible, including regular testing," it said, adding it had repelled thousands of attacks over the past few years. "But in the end, this was simply not enough."

The Alberta, Canada-based firm, which said it is working with law enforcement agencies to trace the source of the hack, said it would return bitcoins stored offline, or in "cold storage", to users.

Cold storage coins are held in computers not connected to the internet and therefore cannot be hacked.

Ironically, Flexcoin had said on February 25 it was not affected by Mt. Gox's closure. "While the Mt. Gox closure is unfortunate, we at Flexcoin have not lost anything," it had tweeted.

Bitcoin is a digital currency that, unlike conventional money, is bought and sold on a peer-to-peer network independent of central control. Its value soared last year, and the total worth of bitcoins minted is now about $7 billion.

According to Bitstamp, one of the largest exchanges for trading bitcoins, a bitcoin was valued at about $658 on Wednesday.

Japan mulls regulate bitcoin, if it has company

Meanwhile, Japan is setting out new rules for handling bitcoins, the first sign that the government is taking action after last week's collapse of Tokyo-based Mt. Gox, once the world's dominant bitcoin exchange.

The Diet will decide on Friday how to treat bitcoins under existing laws, said people familiar with the matter.

Banks and securities firms will not be able to handle bitcoin as part of their main business, suggesting the crypto-currency will be treated more as a commodity, like gold, said the sources.

Last Friday Mt. Gox filed for bankruptcy protection in Tokyo, saying it had lost bitcoins and cash worth some half a billion dollars due to hacker attacks on what it admitted was its lax computer system security.

Indeed, Bitcoin has inspired creativity among the criminal class, from outright theft by hacking to potentially using the crypto-currency in money laundering and bribery.

Japan is thinking of taxing bitcoin transactions, though how it would do that remains unclear, given that one of bitcoin's attractions is the anonymity of transactions. Also, the Finance Ministry has declined to get involved, saying bitcoin is not a currency and doesn't fall under its purview.

Japan doesn't want to go it alone in trying to get a grip on bitcoin. Any regulation of the crypto-currency should involve international cooperation to avoid loopholes, Vice Finance Minister Jiro Aichi said last week.

U.S. Federal Reserve Chair Janet Yellen has said Congress should look into legal options for regulating virtual currencies such as bitcoin.

Shanghai-based BTC China, the world's largest bitcoin exchange by volume, has imposed regulations to curb bitcoin trade weeks after Beijing banned financial institutions from trading in bitcoin due to the risks involved.

Israeli and Russian authorities have issued warnings against using bitcoin, saying treating it as a parallel currency is illegal. Britain, however, has supported bitcoin and is preparing to abort plans to tax bitcoin trading, the Financial Times reported.

Haaretz.com, the online edition of Haaretz Newspaper in Israel, and analysis from Israel and the Middle East. Haaretz.com provides extensive and in-depth coverage of Israel, the Jewish World and the Middle East, including defense, diplomacy, the Arab-Israeli conflict, the peace process, Israeli politics, Jerusalem affairs, international relations, Iran, Iraq, Syria, Lebanon, the Palestinian Authority, the West Bank and the Gaza Strip, the Israeli business world and Jewish life in Israel and the Diaspora.