Search This Blog

Friday, January 17, 2014

What is Bitcoin and How Does it Work?


Geeks have had their own “money” for some time, but typically it is within the context of online gaming. While this digital currency does possess intrinsic value, the market for it is usually limited to other gamers. However, 2009 gave rise to another form of digital currency, bitcoin, which has demonstrated some global demand as a medium for exchange.
Image credit: Zack Copley
Editor’s Note: we want to make it very clear right up front that we are not recommending that you invest in Bitcoins. It’s very likely that you will lose money.

How it Works

In its essence, bitcoin is a crypto-currency implemented entirely with open source specifications and software which relies entirely on a peer-to-peer network for both transaction processing and validation. We will briefly cover how this works (for more technical details, you can see the links at the end of the article), but we are primarily going to focus on the bitcoin economy itself.
A bitcoin is simply an SHA-256 hash (which is an extremely large number) in hexadecimal format. A person’s bitcoins are stored in a special file called a wallet, which also holds each address the user sends and receives bitcoins from as well as password/private key known only to the user, which is required before the bitcoins can be spent.
A bitcoin is spent/exchanged by initiating a transfer request from an address in the wallet of the payer to an address of the payee. A bitcoin address can be thought of as an email address (with bitcoin addresses being hashes instead of “readable” strings). A group of transactions (called a block) are broadcast to the bitcoin peer-to-peer to network for validation, which is tentatively completed once a single node generates a random SHA-256 hash with certain properties (starts with a specific number of 0 bits). Because an SHA-256 number is huge, the “search” for a suitable number requires an enormous amount of computing power – which is what the bitcoin peer-to-peer network provides.
When a suitable block hash is found, it is coupled with a nonce (a one-time number) and then broadcast to the peer-to-peer network. This resulting hash is then combined with the previous completed block hash along with the bitcoin(s) being exchanged, which creates a chain. This chain forms the “trust” of each bitcoin transaction, as each new transaction block is generated based on the unique hash of the previous. In fact, the entire history of every bitcoin transaction can be traced back through a single link chain.
As a reward for the node which generated the suitable hash, new bitcoins are created and/or any transactional fees are credited to the node’s address. The process of attempting to generate validation hashes is called mining, and it is the only way new bitcoins enter the economy.
Again, we want to be clear that this is a very simplified overview of how the bitcoin exchange works, but this gives a foundation for the topics we are covering in this article.

Transactional Security and Trust


By design, each bitcoin transaction is anonymous in the sense that only bitcoin addresses (hashes) are exposed. For additional anonymity, a bitcoin wallet can generate a new address for receiving future exchanges, hence making it very difficult, if not impossible, to trace every transaction performed by a particular individual.
As an additional security feature, the bitcoin transactional chain prevents bitcoins from being double spent. In order for a transaction to be undone, first the link in the chain which defines the target transaction would have to have a new hash generated, as well as every link after the target (as each transaction hash depends on the previous). Because the bitcoin network trusts the longest continuous chain and each suitable SHA-256 hash takes approximately 10 minutes to generate (more on this in a bit), an attack would require more computational power than all honest nodes… or an unheard of amount of luck. To ensure neither are feasible, a transaction block is not considered final until it is 6 links deep (which takes about 1 hour).

Bitcoin Mining

One very import aspect is the controlled rate at which block hashes are generated, which is called mining. By design this is, on average, every 10 minutes. However, because computing power in the peer-to-peer network can fluctuate as new nodes enter/leave the network and/or computational power of those nodes increase due to hardware improvements, the difficulty of the validation hash has to adjust accordingly.
To accomplish this, the bitcoin network adjusts the requirements for a “suitable” block validation hash. As we stated above, a block validation hash must have a specific number of leading zero bits, so in order to adjust the time on average it takes to generate a valid value, the number of leading zeros required adjusts accordingly. As more computing power is added to the processing network, the number of leading zeroes increases (making it more difficult to find a value). Alternately, if the computing power decreases, the number of leading zeroes required decreases as well (making it easier to find a value).
Quite simply, the more nodes (or more specifically, the number crunching available) in the system, the harder a hash is to generate. Considering the SHA-256 hashes are generated via brute force, the mining process consumes an enormous amount of processing power. Additionally, there is no guarantee that any particular mining node will ever generate a suitable hash (and, hence, collect the newly generated bitcoins and/or transaction fees) as it is simply “luck” that a particular node finds a suitable value first.
The rate at which bitcoins are rewarded is controlled as well. The system has a hard limit of ~21 million bitcoins. This limit will be reached around 2140. At this time, when miners are no longer rewarded with the creation of new bitcoins, the incentive will move solely to transaction fees.
It should be noted that mining is an extreme computational process that will quickly run up your electricity bill. So much so that current mining software doesn’t even run on CPUs because they are too inefficient. Rather, it uses GPU’s (down to a science) or specially designed chips. There are even custom-designed mining boxes. Mining is treated as big business and, unlike distributed computing networks, isn’t something you can simply repurpose your spare machine for.

An example of a custom built bitcoin miner. (Image by: Mirko Tobias Schaefer)

Bitcoin Strengths

Anonymity and privacy
Perhaps the biggest strength of bitcoin is that it is virtually anonymous. Because bitcoin transactions are sent from hash address to hash address (which, recall, can be changed from transaction to transaction), it is possible for the two parties involved to be completely unknown to each other. For a somewhat comparable analogy, think of it as sending cash in the mail to a PO box where the return address is another PO box. Due to this aspect of bitcoins, it is very very difficult to build a profile of any single user. In many ways, with regards to privacy, it is better than cash.
Additionally, because there is no central processing authority (as the peer-to-peer network handles this), it is impossible to lock anyone out of the system.
No required transaction fees (for most transactions)
Unlike when you use a credit card where the processor (e.g. Visa, Mastercard, etc.) charges a transaction fee which the merchant has to pay, bitcoin currently has no such required fees on most transactions.  Because transactions are processed by the peer-to-peer network, which is rewarded by the system with the creation of new bitcoins, a reward for the processors (miners) is built-in.
So why would you choose to pay a transaction fee? Currently, the only practical reason would be to prioritize the block the transaction is included in. As stated above, a transaction is not considered “official” until it is 6 blocks deep, and when a transaction is being considered for inclusion in a block, a heavily considered factor is the transaction fee associated with it. Because mining (processing) is motivated by earning bitcoins, including a transaction fee is a sure way to bump up the priority of a particular transaction.

No governing authority (hence, not subject to easy taxation)
Quite simply, bitcoin is currently not recognized as an official form of money by any government, therefore any “payments” or “income” in the form of bitcoins are not taxable. You can think of it as a barter system where you don’t “pay” for something with bitcoins, rather you “trade” bitcoins for it. In the same sense that if you were to trade 3 apples for 3 oranges, the oranges you received are not taxed (practically speaking).
Admittedly, this is a very simplistic explanation (and the same could be said for cash transactions), but bitcoin has an advantage of not being recognized as actual money when it comes to taxation.
However, an important point to keep in mind is that if/when bitcoins are converted to actual currency (for example US Dollars), then the resulting income could be subject to taxation.

Bitcoin Weaknesses

Possible Government Interference
Any time something new comes around and challenges the status quo, the government is going to get involved to make sure that things remain the way they are supposed to be. The fact is that the US government, and other governments, are looking into BitCoin for a variety of reasons, including some legitimate reasons like money laundering and terrorist funding.
Just in the last few days, the US government has started seizing some accounts from the biggest BitCoin exchange. More is likely to come in the future.
No monetary sovereignty
Perhaps the biggest weakness of bitcoin is that it is not a “recognized” sovereign currency, that is, it is not backed by the full faith of any governing body. While this could be seen as strength, the fact that bitcoin is a fiat currency which is accepted only on the perceived value of other bitcoin users makes it highly vulnerable to destabilization. Simply put, if one day a large number of merchants who accept bitcoin as a form of payment stop doing so, then the value of bitcoin would fall drastically.
Deflationary by design
A knock on the bitcoin design from an economic perspective is due to the fact that the number of bitcoins which will be generated has a hard limit of ~21 million. Inherently, this means the economy is deflationary by design, which can make it an ideal target for speculators and hoarders.
Although bitcoins can be spent in increments of .00000001 (meaning a single bitcoin is made up of one million “cents”), an economy where the supply of money cannot keep pace with the demand is very susceptible to recessions and depressions. For example, if speculators held a large percentage of bitcoins solely for the purpose of investment, those bitcoins are not cycling through transactions which means less money is available to change hands. When there is a demand for bitcoin transactions, but not enough currency in circulation to fill that demand, a recession occurs. Eventually, as more bitcoins end up in the hands of speculators, the economy will grind to a halt as no new bitcoins are able to enter the system (a depression). While this is not a foregone conclusion, is it certainly quite possible (and some economists may argue virtually inevitable).
Lack of recourse
The bitcoin network has no built-in protection mechanisms when it comes to accidental loss or theft. For instance, if you lose your bitcoin wallet file (think corruption or drive failure with no backup), the bitcoins held in that wallet are lost forever to the entire economy. Interestingly, this is an aspect which further exacerbates the limited supply of bitcoins.
Additionally, if your wallet file is stolen or compromised and the bitcoins contained within it are spent by the thief before the rightful owner, the double spending protection mechanism built into the network means the rightful owner has no recourse. Unlike if, for example, your credit card is stolen, you can call the bank and cancel the card, bitcoin has no such authority. The bitcoin network only knows that the bitcoins in the compromised wallet file are valid and processes them accordingly. In fact, there is already malware out there which is designed specifically to steal bitcoins.
Black market appeal
A central principle to the design of the bitcoin system is that there is no single transactional processing authority – rather this is handled by the peer-to-peer network as a whole. As a result, no single address or, more specifically, user can be locked out of the system. Combine this with the inherent anonymity of transactions and you have an ideal medium of exchange for nefarious purposes.
While this is not exactly a weakness in bitcoin, the unintended consequence of its usage for dubious purposes could be considered one. In fact, the US Treasury Department recently applied money laundering rules to bitcoin exchanges, no doubtedly, for this precise reason.

Subjects of Debate/Controversy

Here we are going to indulge a bit of controversy surrounding bitcoin. While these topics of conversation are interesting, most everything in this section is conjecture and should be taken with a grain of salt.
Enigmatic developer
The primary designer of the bitcoin specification is a “person” named Satoshi Nakamoto. Person is put in quotes here because it is currently unknown who this is. Satoshi Nakamoto could be an actual person, an internet handle, or a group of people, but nobody actually knows. Once their work of designing the bitcoin network as well as contributing to most of the open source software which drives it was complete, they essentially disappeared.
Extreme financial advantage for early adopters
As mentioned above, new bitcoins are generated on an average of every 10 minutes, which gives a decided financial advantage to early adopters who participated in the mining process. Because the difficulty of finding a suitable block hash scales with the amount of computing power, the fewer the number of miners there are, the better chance they have of being the recipient of new bitcoins. From here, simple deductive reasoning immediately leads to the conclusion that these early adopters (developers) could accumulate bitcoins at an extremely rapid pace which would be practically impossible once the bitcoin network garnered significant public attention.
“Pump and dump” scheme
Bitcoin has gathered enough attention to warrant an exchange between bitcoins and actual currency. During the course of the several years it has been in existence, like any traded commodity, the “price” of a bitcoin has fluctuated. However, bitcoin does seem to be quite susceptible to high peaks followed by almost an immediate drop (which you can see if you look at the price history over the course of a year).
Of course, this is not indicative that bitcoin is designed as a “pump and dump” scheme – as, again, any traded commodity could be subject to this – however, the pattern has certainly appeared many times over the relatively brief lifespan of bitcoin.

Conclusion

There is no doubt that bitcoin is an intriguing concept which has actually gathered some internet merchant acceptance. Interestingly, one person is willing to accept bitcoin as payment for their home. Whether or not bitcoin can stand the test of time remains to be seen, but the more attention it gets, the better it seems to catch on.
If you have any personal experience with bitcoin, please tell us about it in the comments.

No comments: