Help:Introduction

From Bitcoin Wiki
Revision as of 06:43, 8 September 2011 by Prcarter (talk | contribs)
Jump to navigation Jump to search

The purpose of this page is to provide a general overview of the Bitcoin system and economy.

Basic Concepts

Currency

Alice is far away from Bob and wants to buy his Alpaca socks. In return, she wants to send him a dollar. A dollar bill is a piece of paper which is very easy to create (by those who can), but which is accepted by people in exchange for valuable products and services in the real world, such as the socks Alice wants to buy. One simple thing Alice can do is put a dollar bill in an envelope, mail it to Bob, and then wait for Bob to send the socks to her.

Banks

Another thing Alice can do is to "wire" the money to Bob. She can do that by first giving her dollar bills to an institution called a bank, the job of which is to safe-keep Alice's dollar bills and, in return, to give Alice a written promise (called a "bank statement") that, whenever she wishes, she can come to the bank to take back the same number of dollar bills that she deposited. Since the money is still Alice's, she is entitled to do with it whatever she pleases, and the bank (like most banks), for a small fee, will do Alice the service of "giving" the dollar bills to Bob instead of her. This could be done by sending a person to Bob's door, with Alice's dollar bills in hand (or, better, fresh new dollar bills, if Alice's dollar bills are in bad condition), but usually it is done by Alice's bank by giving the dollar bills to Bob's bank and informing them that the money is for Bob, who will then see the amount in his next statement, or, if he is in a hurry, the next time he contacts his bank asking about how much money they have for him.

Since banks have many customers, and bank employees require money for doing the job of talking to people and signing documents, banks in recent times have been using machines such as ATMs and web servers, that do the job of interacting with customers instead of paid bank employees. The job of these machines is to learn what each customer wants to do with his/her money and, to the extent that it's possible, act on what the customer wants (for example, ATMs can hand cash). In the end, there is very little human involvement in this process, most of the time. The people can always know how much money out of the money that the bank is safe-keeping is theirs, and they are confident that the numbers they see in their bank statements and on their computer screens stand for the number of dollar bills that they can get from the bank at any time they wish. They can be so sure of that, that they can accept those numbers in the same way they accept paper dollars (this is similar to the way people started accepting paper dollars as they accepted gold or silver).

However, the fact that machines are used does not change the structure of this system, which is, as it was, based on a central authority (the bank) which is responsible for keeping records about how much money belongs to whom. Everybody has to rely on this central authority to be honest (i.e. to say the truth about how much money they are safe-keeping in total, or at least to make the paper money available upon demand from the owners). Also, every person has to identify him/herself to this authority, by giving his/her real name, in order to be allowed to get their paper bills back or to send money to another person.

Bitcoin is a system of owning and voluntarily transferring amounts of so-called bitcoins, in a manner similar to an on-line banking interface, but anonymously and without reliance on a central authority to maintain account balances. These bitcoins are valuable because they are useful, they are limited in supply and because producing them requires spending real resources such as electricity and CPU time.

Bitcoin Basics

Creation of coins

The creation of coins must be limited for the currency to have any value.

New coins are slowly "mined" into existence by following a mutually agreed-upon set of rules. A user "mining" bitcoins is running a program that searches tirelessly for a solution to a very difficult math problem whose difficulty is precisely known. The difficulty is automatically adjusted regularly so that the number of solutions found globally, by everyone, is constant: an average of 6 per hour. When a solution is found, the user may tell everyone of the existence of this new found solution, along with other information, packaged together in what is called a "block".

Blocks contain 50 bitcoins at present. This amount is an incentive for people to perform the computation work required for block generation. Roughly every 4 years, the number of bitcoins that can be "mined" in a block reduces by 50%. Any blocks that are created by a malicious user that do not follow this rule (or any other rules) will be rejected by everyone else. The result is that no more than 21 million bitcoins will ever exist.

Because the "mining" incentive to put fourth the computational power to create blocks will eventually diminish, miners will some day pay for their hardware and electricity costs by collecting transaction fees. The sender of money may voluntarily pay a small transaction fee which will be kept by whoever finds the next block. Paying this fee will encourage the miner to include the transaction in a block more quickly.

Transferring a coin

To guarantee that an eavesdropper, Eve, cannot access other people's bitcoins by creating transactions in their names we use a public key system to make digital signatures. In this system, each person, such as Alice and Bob, has a pair of public and private keys which he/she stores in a safe wallet. Only the user with his secret private key can sign a document, such as the transaction to give some of his bitcoins to somebody else, but any one can validate the signature using the user’s public key.

Suppose Alice wants to send a bitcoin to Bob.

  • Bob sends his public key to Alice.
  • Alice adds Bob’s public key along with the amount she wants to transfer to a message: a 'transaction' message.
  • Alice signs the transaction with her secret private key.
  • Alice broadcasts the transaction out over the bitcoin network for all to see.

(Only the first step is actually completed by a human. The rest is done by the bitcoin client software.)

As a result, anyone who knows the public keys of both Alice and Bob can now see that Alice agreed to transfer the amount to Bob, because nobody other than Alice has Alice's private key. Alice would be foolish to give her private key to other people, as this would allow them to sign transactions in her name, removing funds from her control.

Later on, when Bob wishes to transfer the same bitcoin to Charley, he will do the same thing:

  • Charlie sends Bob his public key.
  • Bob adds Charlie's public key along with the amount he wants to transfer to a message: a 'transaction' message.
  • Bob signs the transaction with his private key.
  • Bob broadcasts the transaction out over the bitcoin network for all to see.

Only Bob can do this because only Bob has the private key that corresponds to the public key Alice included in the previous transaction.

Eve cannot change who the coins belong to by replacing Bob’s public key with her public key, because Alice signed the transfer to Bob using her private key, declaring that the coins which belonged to her now belong to Bob, and Alice's private key is kept secret from Eve. So if Charley accepts that the original coin was in the hands of Alice he will also accept the fact that this coin was later passed to Bob and now Bob is passing this same coin to him.

Preventing double-spending

The process described above does not prevent Alice from using a coin in more than one transaction. The following process does. This is the primary innovation behind Bitcoin.

  • Details about the transaction are sent and forwarded to all or as many other computers as possible.
  • A constantly growing chain of blocks that contains a record of all transactions is collectively maintained by all computers (each has a full copy).
  • To be accepted in the chain, transaction blocks must be valid and must include proof of work (one block generated by the network every 10 minutes).
  • Blocks are chained in a way so that, if any one is modified, all following blocks will have to be recomputed.
  • When multiple valid continuations to this chain appear, only the longest such branch is accepted and it is then extended further.

When Bob sees that his transaction has been included in a block, which has been made part of the single longest and fastest-growing block chain (extended with significant computational effort), he can be confident that the transaction by Alice has been accepted by the computers in the network and is permanently recorded, preventing Alice from creating a second transaction with the same coin. In order for Alice to thwart this system and double-spend her coins, she would need to muster more computing power than all other bitcoin users combined.

Anonymity

There are no bitcoin "accounts" to set up, no e-mail addresses and no user-names and passwords to give, just for owning bitcoins. Each balance is simply associated with a randomly generated public-private key pair and the money "belongs" to whoever has the private key and can sign transactions with it. Moreover, those keys do not have to be registered anywhere in advance, as they are only actually used if and when there is a transaction involving them. Transacting parties do not need to know each other's identity in the same way that a store owner does not know Bob's name is Bob when Bob goes and buys groceries with cash.

A Bitcoin address mathematically corresponds to a public key and looks like this:

15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC

Each person can have many such addresses, each with its own balance, which makes it very difficult to know which person owns what amount. In order to protect his privacy, Bob can even generate a new public-private key pair for each individual transaction. The Bitcoin software encourages this behavior by default. Continuing the example from above, when Charlie receives the bitcoin from Bob, Charlie will not be able to identify who owned the coin before Bob (not without asking Bob).

You have completed reading our Bitcoin introduction!

Where to see and explore

You can directly explore the system in action by visiting the Bitcoin Block Explorer. The site shows you the latest blocks in the block chain. The block chain contains the agreed history of all transactions that took place in the system. Note how many blocks were generated in the last hour which on average will be 6. Also notice the number of transactions and the total amount transferred in the last hour (last time I checked it was about 64 and 15K). This should give you an indication of how active the system is.

Next, drill into one of these blocks. Start by noticing that the block's hash begins with a run of zeros. This what made making it so difficult; a hash that begins with many zeros is much more difficult to find than a hash with few or no zeros. The computer that generated this block had to try many Nonce values (also listed on the block's page) until it found one that generated this run of zeros. Next notice the line titled Previous block, each block contains the hash of the block that came before it, this is what forms the chain of blocks. Now notice all the transactions the block contains. The first transaction is the income earned by the computer that generated this block. It includes a fixed amount of coins created out of thin air and possibly fee collected from other transactions in the same block.

Drill into any of the transactions and you will see how it is made from one or more amounts coming in and out. The fact that there can be more than one incoming and outgoing amounts, allow the system to join and break amounts in any possible way allowing for any fractional amount needed. Each incoming amount is a transaction from the past (which you can also drill to) coming from an address of someone and each outgoing amount is addressed to someone and will be part of a future transaction (which you can also drill too if it also had already taken place.)

Finally you can drill into any of the addresses and see what public information is available.

To get an impression of the amount of activity on the Bitcoin network, you might like to visit the monitoring websites Bitcoin Watch and Bitcoin Monitor. The first has general statistics on the amount and size of transactions, while the latter shows a real-time visualization of events on the Bitcoin network.

See Also