In 2008, the world's financial systems were in disarray. Depending on who you asked, there was always a different cause - predatory lending, artificially low interest rates, or maybe speculators. However, everyone knew it had something to do with the banks. Many went further and attributed the global economic situation to the bank's banks: central banks. These are institutions which control the supply of money for a specific currency. In America, this is done by the Federal Reserve, which uses manipulation of interest rates to influence markets and regulate the value of the US dollar.
An anonymous programmer, known only by the pseudonym Satoshi Nakamoto, developed a revolutionary idea that would remove central banks and even governments from the monetary system. It would be a decentralized peer-to-peer digital currency called Bitcoin (the capitalized form of the word refers to the software, whereas the lowercase is used when talking about units of the currency). As a hint to Satoshi'sTM motivation, the genesis block'sTM code contains the text 'The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.'
The code is open source so that the protocol's operation can be scrutinized. While it takes some knowledge in coding to fully comprehend it, anyone can freely read it. This is important, as the only hope a mysterious code coming from a pseudonymous computer programmer has is to stand on its own merit. If people are going to use a revolutionary new technology, they first need to trust it.
How does bitcoin mining work?
- Peer-to-peer systems first became popular with music sharing programs, such as Napster. Instead of each computer on the network getting files from a central server, the files were downloaded from other computers on the network called nodes. This form of decentralization leaves the Bitcoin network far less vulnerable to malicious attacks. Instead of attacking individual servers or organizations, a hacker would have to overpower the network in order to compromise it. This is referred to as a 51% Attack, where the attacker controls more than half of the computing power in the network. However, in order for this attack to succeed, the attacker must sustain that share of the hashing power, or the protocol will resume normal operation.
- In the wake of revelations uncovering just how much of our digital lives are monitored, it's no wonder that people are running to protect their privacy. Bitcoin addresses contain no data that can identify the owner on its own. In this way, bitcoins are anonymous. It should be said though that perfect anonymity is nearly impossible to obtain, and there are many things a user could do while using an anonymous money to unmask themselves.
- There have been a number of electronic currencies before Bitcoin which have failed. They were all centralized and were easily shut down. The benefit to a digital currency is the severe reduction in transaction costs and the ease with which international transactions can be made. As long as there is internet, bitcoins are easily sent and received.
Transactions to peers are processed and verified by a network of computers known as miners. The word “mining” is somewhat misleading. It implies that those who lend their computing power to the network are doing some meaningless work in order to “dig up” bitcoins. But without miners, bitcoin commerce could not take place. For their service, the Bitcoin software is designed to reward the people who mine. Currently, as a miner finds a block, that miner is paid a block reward, plus fees paid by users whose transactions the miner is processing. Every 210,000 blocks this bounty is halved, until the bulk of mining profits will come from transaction fees. This block reward serves two purposes. First of course is to incentivize mining. The next is to slowly put bitcoins into circulation up to the upper limit of 21 million. Anyone can be a miner with the right equipment and as more people do so, the network gets stronger.
How to do transactions?
To fully understand the nuts and bolts of bitcoin transactions, one must be familiar with things such as public-key cryptography and hash functions. But this will explain generally how transactions work. Let's say that you have one bitcoin (hereafter denoted by) you received and you're looking to spend it.
You find someone with a computer for sale for 0.85, so the two of you arrange a trade. On the surface, what happens is the seller sends you an address, which is a hash of a public key, not tied in any way to any personal details of the owner. From your wallet, you input the seller's bitcoin address and the amount to send. You click send. On the seller's end, they see an incoming unconfirmed transaction.
After a few minutes, the transaction gets confirmed by the network and the seller is now able to spend the bitcoins. But the beauty behind Bitcoin lies in the unseen. In public key cryptography, there are two keys, a private key and public key. Your wallet contains your private keys. These are your bitcoins. This should always be secured. Your public key is hashed and becomes your bitcoin address. It can be known by anyone, as it doesn't contain personal information or your private key.
In the example above, you received as a transaction (this is to illustrate a later point). This shows up in your wallet because the publicly available blockchain (the ledger of transactions, which all wallets contain) says that that single coin belongs to your address. When you input the seller's address and send 0.85, you announce to the network that you're doing so. At this point, the transaction is unconfirmed. But if you look at the transaction closely, you'llTM notice something strange. The output of the last transaction you did was, in other words, you received as one transaction. The protocol will make the input of your next outgoing transaction. Since you only want to spend 0.85, it sends the remaining 0.15 to an address you own, as a way of making change. So when you look at the transaction, you'll see multiple addresses associated with it. In this way, the paths of bitcoins can be traced across addresses through the blockchain.
Once it's announced to the network, the transaction is processed by miners whose computers are verifying that a) you own the bitcoins and b) you sent the bitcoins. But before a miner can add this new record to the blockchain, it must solve a complicated cryptographic hash (a kind of math problem). This is to keep the number of blocks added to the blockchain at a predictable rate (about one every ten minutes).
Additionally, as more hashing power is added to the network, the software is designed to automatically adjust the difficulty of these problems to keep that one block per 10 minute ratio. Remember, the blockchain is actually a part of your wallet, so it must be downloaded if you keep your wallet on your computer. If this constant rate wasn't maintained, the blockchain would quickly become so large that consumer computers wouldn't be able to contain it.
Once a miner solves this problem and adds your transaction to the blockchain, there is one confirmation on the seller's end. The next block to be found contains information about the preceding block and adds another confirmation to the transaction.