Bitcoin and blockchain. How does it work?

Blockchain is a chain of discrete blocks containing information and organized chronologically. Each block consists of a string of 0 and 1 (binary code). The string can be a number, an email address or a bank account. So, when you start adding these discrete blocs, you get a list. These blocks are interconnected with each other with what is called cryptographic hash. By design, block chain is “unhackable” because the data contained cannot be modified. Once the data has been recorded, it is not possible to change it retroactively without modifying the following blocks, making the network collapse. This makes blockchain suitable to track important data that cannot be temper450_1000ed with after it has been recorded like votes or money transfers.

In 2008 Satoshi Nakamoto presented his idea to create a currency that would not be physical, but digital, based on bits. Hence, Bitcoin.

When you pay digitally, in PayPal for example, your bank verifies that in your account there is the needed money to make the payment. Therefore, we depend 100% from these banks. Another concern with common payment method is privacy. When paying online with you credit card, you need to state your name to be able to make the payment, unlike with cash.

Bitcoin works peer to peer (P2P), like common torrents. When you download a movie from Pirate Bay (do not do that, it is illegal), the movie is not stored in a central server, but spread around different computers. When you have your torrenting program open, you allow other downloaders to get access to the movie and download it. This way, you do not depend on a single server but you rely on a group of computers. This increases the reliability of the system, as it is very unlikely that all of the computers will fall off the internet at the same time.

To keep track of the amount of Bitcoin that everybody has, there would be a need for a master record that intakes each transaction made by each person since the beginning. This record would be public, allowing users to track each bitcoin. Users could see through which accounts a bitcoin has gone through. The anonymity is kept intact as we do not know who the bitcoin belongs to. This universal record is called Blockchain.

Blockchain is a sequence of blocks that make reference to the last block and to the next. It is distributed globally, making it secure and public. It is nearly impossible to modify passed records and as long as there are users, the blockchain is kept safe. Each block contains transactions and they are created by the community. Each user can add blocks to the Blockchain, documenting each transaction. These members of the community are called miners. When a miner verifies a transaction, he sends it to the rest of the miners, so they can verify it and add it to the chain. This way, it gets decentralized.

Bitcoin is based in a number of rules.

  1. Blocks are made of text. The text consists of the information of the transaction. Party A sent X amount of money to Party C. Party A lost X. Party C won X.
  2. Each block is about 1MB in size and it will consist of as many transactions as fit in it. Approximately 2000 to 2200.
  3. Each 10 min a new block will be created, so the blockchain will increase by one block each minute. This will also put a cap in the amount of transactions per unit of time. 2000 to 2200 per 10min. 3-4 transactions per second. This is not even close to the amount needed to support a financial system, which is a bit cap limiting the potential of Blockchain.
  4. The miner who creates the block, will get a reward for doing so. The first block to be created rewarded 50 bitcoins to its miner, and every 210 thousand blocks, the number would divide itself by 2. Currently, you get rewarded 12 bitcoins for each block. This generates competition to mine blocks.
  5. From each block, a hash will be generated. A hash uses some data to create a unique identifier. You can generate one here. They have the curious property that if you know the algorithm that generated it, you can, knowing the initial text, generate the hash again. On the other hand, knowing the hash, it is very difficult to work backwards and find the text that generated it.
  6. Each block contains the hash from the previous block, the date and time of creation, the transaction of compensation to the miner that created it and all the transactions that fit in it to complete one megabyte. On top of this information, it will also contain a mysterious data that I will talk about later.

If we go to here we can see all the information about the block, with all the transactions that are included in it. On the right, we can also see the previous and next block. This little detail makes blockchain practically impossible to hack.

 Because of the characteristics of blockchain, each time a new block is created, it gets checked by other miners and added into the chain. In this case, if someone wanted to add a block with double spending for example, other miners would detect it and not accept the block into the chain. The only way to do this would require the hacker to get in control of more than 50% of the mining computers, in which case he would be able to add and delete blocks however he wanted to. A way of doing this would be spreading a virus around computers to make them mine in a fraudulent way. So, in theory, blockchains are hackable, but practically impossible. There have been reports of viruses spreading around the network that “steal” computing power from the infected computers. Then, hackers would use that power to mine more bitcoins.

Satoshi also thought of this and based his solution in the proof of work protocol (POW) The original paper can be found here. This idea was developed to avoid spam. Let us see an example.

Sending mails is very cheap. You just need a sender, receiver and your content, which is text. It does not require lots of data, and so the temptation to send thousands and thousands of mails as spam is big. Therefore, in the 90´s, the POW was developed. This was a series of complicated mathematical calculations that the server asks the sending computer to solve, forcing the computer to consume more resources and making sending huge amounts of spam not viable. POW had some problems when being implemented in mail servers, but as an idea it was very interesting.

 Satoshi knew about POW and so, he decided to implement it in blockchain. By making a rule that the hashes have to have a certain and variable number of 0`s at the start, the only way left to guess the hash is to make multiple tryies until the hash has that needed ammount of 0’s at the start. This avoids the hashes from being completely random, and hard to create. As the blockchain develops, the amount of 0`s increase, making the process longer and more costy. Creating fraudulent hashes is so power and hardware consuming that it becomes inefficient. The amount of 0’s at the start of the hash is defined as “difficulty”. It has been statistically designed so that it takes 10min to create a block. Each 2016 blocks, the difficulty is checked to see if it needs to be increased or decreased. The process of finding a valid hash is referred as mining. Each miner, when he/she finds a valid hash, is rewarded with bitcoins. This is how new bitcoin are created.


 The use of bitcoin gives the seller and buyer complete anonymity. Thus, bitcoin started to be used in black markets like The Silk Road in the dark net (this site does not exist anymore, although there are someproxies). Even though the accounts where bitcoins and other cryptocurrencies are deposited are anonymous, the tracking of a bitcoin is very easy to do. At all times, each bitcoin can be traced back and see what accounts it has been deposited in. Therefore, a very logical application would be asset management. Traditionally, trade processes have been expensive, especially cross-border. With smart contracts, like the ones presented by the creator of Ethereum, would make the whole process easier and more transparent.

With these smart contracts, where property is defined digitally, smart loans can then be put in place. People with poor credit ratings could use these contracts to receive liquidity in form of a digital currency, and in exchange, post their property as collateral. There is not a big company that has yet found a big market share, but as the technology keeps developing, more news will follow.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s