Bitcoin: Internet Funny Money or Prospective Game-Changer? A Mildly Biased Introduction

By Zach Danker-Feldman on ALTCOIN MAGAZINE

Zach Danker-Feldman
The Dark Side
Published in
16 min readFeb 14, 2019

--

Fraudulent. Massive Ponzi scheme. Gold for nerds. These are all terms used to describe the flagship cryptocurrency — Bitcoin — and it is not difficult to see why many subscribe to these views. The primary use cases for cryptocurrencies are currently dark market purchases and speculation. The key distinction here is that like the Internet in the ‘90s, this technology is still in its infancy and its potential is a toss up. This is not to say that it will succeed or fail in the long-term. As of February 12th, 2019, Bitcoin has fallen in value from around $20,000 in January 2018 to $3600 (Buy the dip [this is not investment advice]). Based on use cases and volatility, maybe the nay-sayers are correct in their assessment of Bitcoin. Let’s ignore price and usage though. Let’s look solely at the technology and its history in order to assess exactly why so many consider Bitcoin to be the most disruptive technology since the creation of the Internet.

Technical Note

As you read this post, you’ll notice I write both “Bitcoin” and “bitcoin” seemingly interchangeably. “Bitcoin” with a capital B is used to refer to the Bitcoin network, payment system, and ecosystem as a whole (‘The Bitcoin network is decentralized’). “bitcoin” with a lower case b is used to refer to bitcoin as a currency (‘I paid Bob in bitcoin’). Keep this in mind as you read on.

Built From the Fire

In 2008 on Halloween, a woman/man/group/alien that went by the pseudonym Satoshi Nakamoto discretely released a nine page white paper explaining a new form of decentralized currency called “Bitcoin.” This currency was then released on January 3rd, 2009 during the sweltering heat of the global financial crisis with the creation of the first block, or genesis block, that contained the message, “03/Jan/2009 Chancellor on brink of second bailout for banks,” referencing bank bailouts in the UK. Inventing this new technology was a process that likely took years to construct, and the timing of its release alongside the crisis was likely coincidental. That being said, the timing could not have better underscored the philosophy inherent in Bitcoin.

Nakamoto’s white paper laid out exactly what Bitcoin was in the first sentence with a high-level, broad statement:

A purely peer-to-peer version of electronic cash [that] would allow online payments to be sent directly from one party to another without going through a financial institution.

It sounds simple, but exchanging value on the Internet without the need for a third party was an issue that had never been cracked. That is, until Nakamoto solved it. How did he do it?

Oh boy, here we go.

A Dollar for a “Candy Bar”

To begin, here’s a hypothetical:

Imagine one night, you are at your friend Brian’s place. You’ve had a couple to drink and you’re a tad hungry. You see a Mounds candy bar, but it’s a Mounds bar, so, of course, you are initially repulsed. The shot of Cuervo you took a few minutes earlier, however, seems to be trying to convince you otherwise. With your inhibitions lowered, you sigh, grab it, and reluctantly enjoy the conflicting flavors and textures of mashed up coconut and chocolate. With your mouth covered in humiliation, and your stomach growling in disappointment, you immediately regret your decision. Worse yet, Brian was going to eat that and requests $1 in remuneration. You dig into your pocket and luckily find a crumpled dollar! You hand it to him and sit on the couch in embarrassment.

Easy enough, right?

Now imagine the same situation, but Brian doesn’t notice you took the “candy bar” until you are already home. He shoots you a text requesting $1 to pay for the Mounds you took. So you open your Venmo app and send him $1.

Again, easy enough right?

Think about the intermediate steps that take place between you sending the dollar and Brian receiving the dollar. Your bank looks at your account within its wider database, verifies that you have sufficient funds, deducts the dollar from your account, and credits it to Brian’s. You can monitor the movement of the $1, but it is entirely under the control of the bank, which you rely on to process the transaction properly. In virtually every digital transaction that takes place, there is trust in a financial institution. This was an essential third party due to one gargantuan dilemma: double-spending.

The Double-Spending Problem

Double-spending is a potential flaw within a digital cash scheme in which the same single digital token is spent more than once. In Scenario One, handing a dollar to Brian defeats the double-spending issue. You cannot hand that same dollar to Deborah the following day because you no longer have the dollar. The double-spending issue is inherently nonexistent.

Digitally, this issue is more difficult. Most digital resources (e.g. photos and software) can be copied or falsified, which is a slight problem, but nothing too drastic. When it comes to currencies, however, this is a deal-breaker. If one dollar can be copied and sent to multiple people, dollars will no longer have value.

In Scenario Two, the double-spending issue is solved through the use of a central intermediary. During each transaction, the identities of both parties are verified by the bank, your account is checked to verify that you have sufficient funds, and then the $1 is transferred to Brian’s account. Only money traveling through a trusted intermediary is trusted to not have been double-spent and a massive infrastructure has been built around this core concept.

In 2008 however, a revolutionary premise was introduced that defeated the double-spending issue, while also removing the need for a central intermediary.

Bitcoin: A Trustless Network

In a typical system that utilizes a third party, transactions of data always pass through a central server. In most monetary systems, this means that a currency issued by a central bank is maintained by financial institutions that maintain the security and integrity of the system.

This creates a strong reliance on a single entity, which creates a significant point of failure. As referenced in my previous post, this honey pot of data and responsibility can be directly attacked, shut down, improperly handled, etc, and the consequences can be dire. Furthermore, it creates friction, restrictions, and fees in many scenarios.

Bitcoin is a peer-to-peer network that disregards this use of central servers entirely.

Recall the previous scenario concerning the Mounds bar (still tough to believe? Just keep reminding yourself it’s hypothetical). You settle on paying Brian in bitcoin, so you open your computer and open up your digital wallet login.

You enter your public key and your private key.

  • Your public key allows you to receive bitcoin. Think of your public key as your house. Everyone can see it and if anyone wants to send you mail, they need to know this address.
  • Your private key allows you to send bitcoin. Think of this as the literal key to your house. This gives you access to all of your belongings and all of the mail people have sent you. Most importantly, it allows you to mail what you own to others.

You enter Brian’s public key and the amount you want to send him. You sign the transaction with your private key as a digital signature that confirms you are the owner of the address in question. You double check all of the information, then press “Send.”

As a peer-to-peer network, this transaction has many potential problems to hurdle, including the aforementioned double-spending issue alongside a slew of others. How does the Bitcoin network solve this?

Blockchain technology.

Blockchain Technology

In short, a blockchain is a tamper-proof database secured by cryptography (i.e. the study of encoding information in such a way that only authorized parties can access it and those who are not authorized cannot) that acts as an accounting ledger keeping track of digital assets. It is an ever-growing, self-clearing, open, distributed database that is maintained and secured by a network of individuals and businesses around the world that run nodes. These independent entities are known as miners and can be anyone that would like to be involved. Now, this group is not securing this network out of the goodness of their hearts. They are financially incentivized to secure it due to how Bitcoin was programmed. Furthermore, this is not a cooperative activity because these miners are competing for a financial reward that is awarded on average every 10 minutes.

After you press “Send” to send $1 in bitcoin to Brian, you are now waiting for the transaction to process and clear by being added to a block that is then added to the blockchain. At any given time, many transactions are publicly broadcasted to the Bitcoin network, but none of these transactions are considered valid until they are contained within a block (i.e. page in the ledger) that is added to the Bitcoin blockchain. In order to be added to the blockchain, a node must validate the transaction (ensure it doesn’t illegitimately manufacture new bitcoin, doesn’t double-spend, etc.), pick up the transaction, insert it alongside numerous others into a block, and race to complete a complex mathematical puzzle before every other node in the network. This is where the competitive aspect comes in.

In order to ensure the security of the network, a consensus protocol must be used to ensure that all nodes agree on the network’s ever-growing history. The Bitcoin network utilizes the proof-of-work (PoW) consensus protocol

Mining in the 21st Century

Let’s simplify this scenario in order to show how this transaction would function. Your transaction, alongside 4 others, has been broadcasted to the network and you are waiting for it to be added to the blockchain.

Now, imagine Cesar is a miner in the mining network.

After these transactions are broadcasted, Cesar compiles the transactions into a candidate block, quickly checks that they are valid, and begins to attempt to solve the complicated computational puzzle before any other nodes. The computational puzzle — known as a cryptographic hash algorithm — used to secure the Bitcoin network is based on the SHA-256 hash function. This function takes an input variable of random size — known as a nonce — and runs it through the SHA-256-based algorithm. This produces an alphanumerical hash (i.e. output code) of fixed length.

In order for a block to be added to the blockchain, the hash it produces must be less than a target hash, which means that a successful hash must begin with a certain number of zeroes. This hash is exceptionally difficult to find because similar to what I mentioned in my previous post, this algorithm is dramatically influenced by every bit of data within the block (e.g. changing a “.” to a “,” will create an entirely new hash that is vastly different). To put the difficulty of this in perspective, a human can potentially solve three hashes a day. A 1500 watt ASIC (Application-Specific Integrated Circuit) can compute tens of trillions of hashes per second (let that sink in). These ASICs have raised the difficulty of finding valid hashes and led to exceptionally low target hashes. As an example, Block #562917, which was mined on February 13th, produced this hash:

00000000000000000015b872d608ae98c775de0fb9127df30ac4aab2c655d5e9

Keep in mind that the Bitcoin network produces a new block every 10 minutes on average, so this target hash changes based on the overall amount of power being used by the network of miners in order to maintain this average. When the amount of power used in the network rises, the number of possible successful hashes for any given candidate block decreases (i.e. the difficulty increases). This difficulty adjustment occurs every 2016 blocks, or approximately every 2 weeks.

To simplify this, a brief analogy:

Think of searching for hashes as pulling the lever on a slot machine that’s only allowed to have one winner every 10 minutes. Each lever pull costs a quarter, which can be compared to the cost of mining a certain number of potential hashes for a candidate block. Furthermore, as more players join, the likelihood that any given player wins the payout falls.

With all of this in mind, let’s look back at Cesar’s mining effort. Imagine the the target hash is 000621.

You can see that Cesar input three nonces. The first two produced hashes that were greater than the target hash, but the third nonce produced a hash that was less than it. If Cesar finds this nonce before every other miner in the network, he is permitted to add his block to the blockchain. Furthermore, notice the extra transaction at the bottom of the candidate block. If Cesar’s block is added to the blockchain, he is also permitted to add a newly minted 12.5 bitcoins to his own wallet. As of February 13th, this would be approximately $45,300. Miners also earn a small amount from transaction fees as well.

It is important to note that when Satoshi created Bitcoin, he established a decreasing block reward that is known as a halving. Originally, miners received 50 bitcoins, but this was coded to be halved every 210,000 blocks. In 2140, when 64 halving iterations have occurred, approximately 21 million bitcoin will be in existence and block rewards will cease to be an incentive. Bitcoin will then run entirely on transaction fees.

For now and the foreseeable future however, block rewards will be the primary incentive that miners in the network compete for. By extension, it is the incentive that directly influences the level of security of the network.

With the PoW consensus protocol, CPU power is the resource used to secure the Bitcoin network. When bitcoin falls in value, miners may leave the network as the cost of CPU power surpasses the expected profit from mining. Conversely, as bitcoin increases in value, so too does the value of discovering and mining new blocks; consequently, more miners join the network and increase the CPU power. This increases the difficulty of finding the next block and brings about one of the most important aspects of the Bitcoin blockchain.

Honest Nodes and the Longest Chain Rule

From the Bitcoin White Paper:

[The Bitcoin blockchain forms] a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they'll generate the longest chain and outpace attackers.

In short, the Longest Chain Rule states that the chain with the highest block height (i.e. difference between the first block and any given block in a blockchain) has the most accrued CPU power and is therefore the blockchain that miners should continue to add to. What does this mean?

Imagine that the block prior to Cesar’s block addition is Block #50. Furthermore, imagine that when Cesar added his block (Block #51(a)) to the blockchain, Node B also solved the hash algorithm and added his block (Block #51(b)) only a few seconds later, creating two soft forks. Technically, both blocks are Block #51 in the chain for the time being.

In order to rectify this situation, the miners would choose which block to work off of. Some may choose Cesar’s and some may choose Node B’s, but all will continue to search for the next block until Block #52 is found and added to exactly one of the forks. Suppose Node C decided to work off of Cesar’s block. She quickly checked the validity of Cesar’s PoW hash, solved her block’s hash algorithm first, and added her block (Block #52) to the blockchain.

Cesar’s block is now included in the chain and miners that worked on Block #51(b) will switch over to the longest chain. Node B’s Block #51(b) is now considered an orphan block and the transactions within it that were not also contained in Cesar’s block are now considered unconfirmed transactions. These unconfirmed transactions are returned to the pool of transactions that miners will include in subsequent blocks. As blocks are added in perpetuity to the blockchain, countless other orphan blocks are born, as seen in red:

As this chain becomes longer, it becomes more secure because in order for an attacker to alter data in past blocks, she has to redo the proof-of-work. Unless she can solve hash algorithms for her new blocks at a faster rate than the network, her new chain will not pass the longest chain. This essential characteristic of the blockchain ensures that past data in this ledger will not be maliciously altered and is among the most significant reasons that the Bitcoin blockchain itself has never been hacked. With that said, there are hypothetical means of attacking this network. I will touch on one such malicious attack that was mentioned in my previous post.

Don’t @ttack Me

I mentioned earlier that the enormity of the Bitcoin mining network plays an essential role in securing it’s blockchain. The importance of this stems from its capacity to deter any actors from attacking the network. Attacks are possible though, and the most widely known attack on a blockchain that can occur is a 51% Attack.

For this attack to succeed, a miner, or more likely a group of miners, would pool their resources in order to produce a CPU output greater than that produced by all other miners in the network combined. Because mining is essentially a game of slots, this group of miners will have the upper hand and likely generate blocks at a quicker rate than the rest of the network. This can have dire consequences.

Suppose that contained within Cesar’s block was not only your transaction with Brian, but also a transaction between a restaurant and a patron for a meal, and a transaction of $1 million dollars in bitcoin for cash between an exchange and a person.

Furthermore, assume that all nodes have equal CPU output and that Nodes C, D, and E decide to collude. This gives them 3/5 of the networks output. They pool their resources and mine blocks at a faster rate than the rest of the network, eventually catching up to Cesar’s Node and Node B, and passing them.

As you can see, every block on the previous chain, including Cesar’s block, is nullified and the new longest chain is validated because it has the most accumulated work. This attack allows miners in control of the majority of CPU power to block transactions and double-spend coins among other potential maneuvers. This means that if the patron had already eaten at the restaurant and the transaction was not included in the new chain, the patron would have received a free meal. Or slightly worse, if the $1 million transaction took place already, it could be left out of the new chain and the bitcoins would remain in the person’s wallet. The exchange would have a $1 million loss as a result.

The problem the attackers would face in this scenario is that not only does the likelihood of success fall exponentially the further behind the attackers begin their mining attack, but in undermining the network, bitcoin should fall in value. If a group of miners owns over 51% of the CPU power in the network, they are actually incentivized to continue mining honestly and profit from the generation of new coins rather than undermining the network and their own wealth.

Despite these potential pitfalls, it must be reiterated that Bitcoin has never been hacked, and the longer it survives and thrives, the more secure it gets. As the first iteration of a brand new technology, this cannot be overlooked.

Conclusion

Whew, that was a lot. Hopefully you stayed with me for at least most of this post. If not, just be sure to keep a few key points in mind:

  • Bitcoin uses the proof-of-work consensus protocol to secure it’s network. Nodes mine Bitcoin independently for a financial incentive and in pursuing this incentive, they support the security of the network.
  • Only those blocks that contain these three conditions will be included in the blockchain: (1) Only valid transactions are contained within the block; (2) The hash is valid and less than the target hash; (3) The block is contained within the longest chain. Upon meeting these conditions, the block’s miner is awarded newly minted coins.
  • Nodes vote with their CPU power, indicating their acceptance of legitimate blocks by working on extending them and rejecting illegitimate blocks by refusing to work on them. Only the longest chain with the greatest accrual of CPU power is considered valid.
  • In reference to my previous post on decentralization, everything mentioned has two overarching implications: (1) Bitcoin is a trustless system where there is no need to trust others involved in a transaction; (2) There is no central point of attack because bitcoins are stored locally.

As a final note, I wanted to highlight one of the coolest features of Bitcoin. When Satoshi created Bitcoin, in the spirit of decentralization, he made it’s software code open source. This has allowed anyone interested in doing so to audit Bitcoin’s code and create their own new protocols and cryptocurrencies. The ultimate result has been a nascent ecosystem of innovation with an ethos of collaboration and cooperation that was previously not possible on this scale. It gave us the likes of Ethereum, ZCash, and Maker. Who knows where this industry will end up, but based solely on the ethos, development, and excitement in the space, the future looks very bright.

Thanks for reading! If you learned something, please click and hold the “Claps” icon on the left. Cheers!

ZDF

P.S. To anyone I may have hurt with this post, I apologize. Please know that the views expressed on Mounds bars are purely my own and I would love to have a constructive conversation on the appeal of this candy. Please shoot me an email at drown_mounds_of_mounds_underground@moundsmassacre.com.

Follow us on Twitter, InvestFeed, Facebook, Instagram, LinkedIn, and join our Discord and Telegram.

Read about our upcoming Altcoin Magazine Mastermind Event here.

--

--