Bitcoin has been on a tear this year.

The virtual currency, which is exchanged anonymously via an online peer-to-peer network, might be starting to go mainstream, as the recent involvement of a U.S. partner suggests.

And while there has been a lot of increased interest in Bitcoin as of late, given its meteoric rise, there's still one big problem, as this week illustrates.

On Monday, a technical glitch caused a "flash crash," causing Bitcoin to tumble 23 percent.

Click to enlarge Bitcoincharts.com

Prices have, as the chart shows, mostly recovered from the incident.

What exactly happened, though?

The glitch that sent Bitcoin tumbling Monday is the result of the unique structure of the Bitcoin exchange.

Timothy Lee wrote a good explanation of what caused the incident at Ars Technica:

The core of the Bitcoin network is a shared transaction register known as the blockchain. Approximately every 10 minutes, a new block is created containing a record of all Bitcoin transactions that occurred since the previous block. Nodes in the network, known as miners, race to "discover" this next block by solving a cryptographic puzzle. The winner of this race announces the new block to the other nodes. The other nodes verify that it complies with all the rules of the Bitcoin protocol and then accepts it as the next official entry in the block chain, starting the race anew.

It's essential for all miners to enforce exactly the same rules about what counts as a valid block. If a client announces a block that half the network accepts and the other half rejects, the result could be a fork in the network. Different nodes could disagree about which transactions have occurred, potentially producing chaos.

That's what happened on Monday evening. A block was produced that the latest version of the Bitcoin software, version 0.8, recognized as valid but that nodes still running version 0.7 or earlier rejected.

In other words, there may be a few kinks to work out before Bitcoin is ready for the type of interest it is seeing right now.

ConvergEx Group strategist Nick Colas wrote in a recent note that what is happening in the Bitcoin market is actually an instructive lesson on global economics.

"What’s interesting to note is why BTC prices plummet, which they did in the back half of 2011," says Colas. "The cause was a very short-lived hack attack on one Bitcoin 'Wallet' company out of Japan, which caused the price to drop from $27 down to $2 in a few months."

The cause of this week's crash was different, but the key takeaway is the same: "Confidence in money as a store of value is the ultimate driver of its value, both in the cyber and real worlds."