Cryptocurrencies from the Inside Out

In this first of a series of articles on trading cryptocurrencies, we discuss the basics of crypto and the blockchain technology behind them.


The history of cryptocurrencies is short but significant. Here, we will discuss the core technologies of bitcoin and the other current generation of cryptocurrencies including blockchain, cryptography and decentralized systems. In later installments we will discuss the crypto markets and specific projects. Finally, we will develop mechanical trading strategies for these markets. 

Bitcoin was not the first virtual currency. Attempts to establish virtual currencies go back to 1990. Here’s a brief history. 


Crypto Forerunners 

The concept of digital virtual currencies came into existence when electronic money corporation DigiCash Inc. was founded by David Chaum in 1990. DigiCash transactions were unique in that they were anonymous due to a number of cryptographic protocols developed by Chaum. The company had made a brilliant product.

In 1993, Chaum invented the digital payment system eCash, which was perfectly suited to send electronic pennies, nickels and dimes over the Internet, as transaction fees for small payments using credit cards were simply too high. However, DigiCash declared bankruptcy in 1998.

Next, we had e-gold, founded in 1996 this digital currency was promoted as a digital currency backed by actual gold. At its peak, it claimed to have five million account holders. 

The currency failed to stay clear of people who used it for illicit activities. The company was investigated repeatedly for money laundering and eventually worked out a plea bargain and suspended operations in 2009, and then restarted two years later. Continued attacks on the platform by cybercriminals and use of e-gold as favored currency by extortionists and money launderers led to its downfall.

In 1998, WebMoney was created as a digital currency, however, it was not decentralized. WebMoney was based out of Moscow and offered many financial services including peer-to-peer payment solutions, merchant services, online billing and payments, and even Internet-based trading platforms. WebMoney competed with e-gold and attracted many users, some for illicit activities from e-gold after it was shut down. However, WebMoney made changes to its services soon after that to prevent its usage for illegal activities. It currently supports a number of international currencies including the British pound, U.S. dollar, Russian rubles and even bitcoin.

Then we had Internet cash, which started in 1999 and collapsed in 2001 after the Internet bubble broke. Internet cash had patented technology for a secure Internet payment system that was based on consumers using a personal identification number. It also pioneered web-based electronic cash that verified transactions without the use of credit cards. 

Liberty Reserve, a Costa Rican-based digital currency launched in 2006, was a botched attempt to create a centralized anonymous money transfer business. It allowed users to open accounts on the platform and without verification and send money to anyone. This platform even allowed the user account to hide their information from the people they were receiving funds from. Platforms like these became popular for cybercriminals. Liberty Reserve was forced to shut down in 2013 by authorities from multiple countries including the United States under the Patriot Act and its promoters were jailed for money laundering and supporting illegal activities. 

Perfect Money, founded in 2007, is another digital currency platform that works with multiple currencies including the U.S. dollar, euro, British pound and bitcoin as well as others. Perfect Money’s business increased when Liberty Reserve started to be restricted. Perfect Money offers services similar to Liberty Reserve, such as no requirement for verification. However, it is not available in the United States or for U.S. citizens located anywhere in the world.


The Birth of Bitcoin 

In October 2008, just as the financial crisis stated to accelerate, a person or a group of people under the alias of Satoshi Nakamoto published a paper called “Bitcoin: A Peer-to-Peer Electronic Cash System,” that laid out what would become bitcoin. The paper contains all of the key concepts we know today as core technologies: Blockchain, proof of work, decentralization, immutability, payment verification and a double-spend problem. Even the concept of the 51% attack was discussed. 

Nakamoto released the first version of this software that launched the network and the first units of the bitcoin cryptocurrency, called bitcoins. Nakamoto released the Version 0.1 of bitcoin software on Sourceforge on Jan. 9, 2009.

This new attempt of virtual money was different than all the earlier attempts because it was decentralized and completely supported by its own community by design.

Nakamoto claimed that he began working on the code in 2007. Bitcoin by its very core design was able to handle a broad range of transaction types. The implemented solution enabled specialized codes and data fields from the start, which was a precursor of smart contracts through use of a scripting language.

Nakamoto created a website with the domain name bitcoin.org and continued to collaborate with other developers on the bitcoin software until mid-2010. Around this time, he handed over control of the GitHub repository network and handed over all the information required to keep the project moving to Gavin Andresen. This required transfer of several related domains to various prominent members of the bitcoin community, and he walked away from the project. Before this time, Nakamoto made all modifications to the source code himself.

Nakamoto left a message in the first two blocks of bitcoin which reads, “The Times 3 January 2009 Chancellor on brink of second bailout for banks.” The text refers to a headline in The Times of London published on Jan. 3, 2009. This is why we believe that the genesis block timestamp of 18:15:05 GMT on Jan. 3, 2009 is actually correct. This block is unlike all other blocks in that it doesn’t have a previous block to reference. This required the use of custom code to mine it. Timestamps for subsequent blocks indicate that Nakamoto did not try to mine all the early blocks solely for himself. 

Nakamoto was the main miner of early bitcoin and was awarded bitcoins at genesis and for 10 days afterwards. Except for test transactions, these remain unspent since mid-January 2009. The public bitcoin transaction log shows that Nakamoto’s known addresses contain roughly one million bitcoins. As of April 17, 2018, this has a value of more than $8 billion. This would make this person one of 200 richest persons in the world, if indeed it is  just one person. 


Understanding the Technology of Bitcoin

The blockchain is immutable and distributive, which makes it almost impossible to hack, and it also solves problems like double spending (see “Building blocks 1,” above). 

The data plus the previous hash is used to create the hash for the next block. Think of the block chain as a kind of spreadsheet with recalculation only for the current block that is being written on. All other blocks cannot be changed. If we try to change the content of a block, it will recalculate the new hash and break all of the future blocks because the previous hash does not match them, and if we update the previous hash it would require recalculating all new hashes (see “Building blocks 2,” above). 

Another protection of this system, which did not exist in previous cryptocurrencies before bitcoin, was the fact that it was a distributive system. Every node on the system has a complete copy of the blockchain. This means that if someone tries to change a given blockchain, change data, recalculate hashes and fix the change going forward, it would not work because the system would detect that the chain is different than what the majority of the other nodes have and fix that chain. This is how the distributive feature of the network helps with security. 

Bitcoin uses what is called a SHA256 algorithm to create its hashes. A hash function is a one-way encoder you can’t reverse. It also has what is called the avalanche effect, which means small changes in content create large changes in the hash value. 


What is Mining?

Mining is a way of processing transactions on the bitcoin network. Mining has gotten more computer-intensive over time and now to mine bitcoin you need specialized hardware called the ASIC machine to do it. Other currencies like bitcoin cash or ethereum can still use a graphic card (GPU). 

In bitcoin there is a concept called a Mempool (memory pool), which contains all of the transactions. Remember that everyone gets a complete copy of the blockchain Mempool. Bitcoin creates rules. Remember our discussion of the SHA256 algorithm? It creates a hash value. In bitcoin, if we just allowed any old hash they would be mined out in a few days. Because of this, they created rules. For example, currently bitcoin requires a hash with 18 leading zeros. Mining is finding a hash value that meets the rules for a given subset of transactions. Beside this rule, there are many others. Back in the earlier days of bitcoin, individuals would mine. Today mining pools exist where groups of people pool their resources together to find a solution. Mining pool software intelligently split the work to avoid duplication between members of the mining pool. 

The odds of finding a given valid value are extremely small, currently, there’s a chance to randomly find a valid hash. This is why we need mining pools and it’s also why it’s so hard to change and process enough blocks to attack the system. You would need more that 50% of the hash rate to attack the system; this is called the 51% attack. Then you could change enough blocks fast enough to make your blockchain with the invalid blocks valid. In addition you would need to do other things like isolating yourself while building your blockchain. This is also why different exchanges and processors of bitcoin require so many confirmations to make a transaction valid. 

“Block & tackling” (above) explains several different concepts in the blockchain, but we would want 18 leading zeros, not four — we are using four to keep our graphics simpler. All the contents of a block — timestamp, nonce, data and previous hash — are used to calculate the new hash. The nonce can change from 1 to 4 billion and is the one thing miners change to produce a valid hash. Let’s suppose we have a mining pool and can run 4 billion nonces in less than a second. The timestamp will update every second; this number is number of seconds since Jan. 1, 1970. 

Another thing that can be changed is which transactions are included in the block. The pools try different combinations of these to be the first with a valid block. Then miners work to verify the block. If there is a tie, miners continue to mine the block and the one that has the longest chain of blocks where one miner or mining pool wins becomes the part of the new blockchain. 

For bitcoin, hash rate is king. In fact, the current number of hashes per second on the bitcoin network is about 20 million trillion. In addition, every 2,016 blocks, which on average is about every two weeks, bitcoin becomes more difficult to mine because the valid hash values lower. As of this writing, the reward for finding a valid block is 12.5 bitcoin, which is split among the mining pool or the node that finds it. The person or pool will get the transaction fees. In case of a pool, the amount of the bitcoin each person receives is based on their hash rate (see “Divvying up the spoils,” below). 

Over time, 100% of bitcoin will be created (21 million coins) and there will be no more bitcoins to mine, which will occur roughly by 2140.

 

Page 1 of 2