General Discussion
In reply to the discussion: I'm trying to understand the phenomenon of Bitcoins, virtual currency. [View all]DanTex
(20,709 posts)The explanation below is watered down to be (hopefully) understandable, so some of the details are not exactly right, but basically this is how it works.
A bitcoin is a form of electronic money which is managed peer-to-peer. What does that mean? Well, electronic money means that there are no pieces of paper, just entries in computers. So owning a bitcoin simply means that there is an electronic record somewhere (where? I'll get to that soon) that says, for example "panader0 owns bitcoin number 172365123"
.
Peer-to-peer means that there's no central database that contains the list of who owns what bitcoins. Instead, copies of the list are maintained on a bunch of computers simultaneously, across the internet. This way, there is no single point of weakness that anyone can hack into and steal all of the bitcoins.
If you want to pay me a bitcoin, you would send out a message saying "panader0 transfers bitcoin 172365123 to DanTex" to other computers on the network, which will then update their ownership lists, and pass on the transaction to more computers, until the whole network is updated to reflect my ownership of the bitcoin.
In order to preserve anonymity, you don't own bitcoins under your real name. Instead you create a "bitcoin address," kind of like an email address. This address has a private cryptographic key that only you know, and so only you can create a valid message to transfer bitcoins from your bitcoin address.
Another issue to overcome is "double spending," meaning what is to prevent you from transferring the bitcoin to two different people. The answer is that a bitcoin transaction is not confirmed until it gets placed in what is called a "block" of transactions. Being placed in a block means (roughly) that a majority of the computers on the network have accepted the transaction and updated the ownership lists accordingly (that's a bit of an oversimplification, but this is the idea). After a bitcoin transaction makes it into a block -- which takes 10 minutes on average -- the new owner can now transfer the bitcoin to another owner if he/she wants to, and so on.
About "bitcoin mining." One question you might have is, why would anyone want to run a computer that keeps track of the bitcoin ownership list? Another question you might have is "who creates the blocks that verify transactions"? This is where bitcoin mining comes into play.
A computer doing bitcoin mining will gather messages about bitcoin transactions since the last block, and then search for a large number (key) such that, in combination with the list of new transactions, the key fits a certain pattern. The math involved is such that the only way to do this is basically brute force: just keep searching for a key that works until you find one. When such a key is found, the computer that found it broadcasts it out, along with the transactions that accompany it, to the other computers on the network. At that point, the other computers verify that the key and the transactions match the specified pattern, and accept this block, and start working on the next one.
In order for the whole bitcoin scheme to work, it is necessary for a bunch of computers to keep track of transactions and try and find keys to create new blocks. If nobody tried to create new blocks, no transactions would be verified, and the whole thing would get stuck. So, in order to reward people for devoting computational resources to this, whoever finds a new block gets ownership of some new bitcoins. The term "bitcoin mining" refers to the process of searching for keys to try and create new blocks, and in so doing taking ownership of the new bitcoins. Bitcoin mining has both a selfish motivation (to get a new bitcoin), as well as a contributing to the overall functioning of the bitcoin network.
Hopefully this helps a bit.