Bitcoin and Blockchain basics

Image for post
Image for post

Several years ago a revolutionary technology called blockchain showed up on the scene. It’s probably the biggest invention since the creation of the Internet. The first cryptocurrency using the blockchain was Bitcoin and since then, thousands of other alternative coins arose.

Blockchain has no central point of failure, so it’s very difficult for authorities and corporations to control or regulate it.

In this article we are going to take a look at the inner workings of the blockchain technology, its security, ways of storing bitcoin, and the meaning of the Bitcoin halving that happened last week.


Cryptocurrencies represents a type of decentralization, which takes the power over money away from the banks. Thanks to the blockchain, no institution can directly tamper with the cryptocurrency progression.

One of the primary goals of the Bitcoin blockchain is to provide people with a secure way to store money, so if another financial crisis was to come, your funds would stay safe and independent of the banking system.

Blockchain is a globally distributed ledger, implemented as a chain of blocks. Each block stores the completed transactions using strong cryptographic functions in a way that it’s practically impossible to hack.

Almost anything can be saved on the blockchain, and it’s possible to do so without any third parties — the value is transferred directly between people and nobody is taking any fees, at least not directly (more on that below). Everything that was stored in the blockchain will remain unchangeable and permanent due to the high cryptographic security of the blockchain.

It‘s politically and architecturally decentralized, so it cannot be controlled or regulated by any institution. It’s divided into multiple computational units, typically a global network of computers. But logically it is centralized, because it behaves like a single entity, like a powerful supercomputer — doing only a single set of tasks.

Bitcoin “Halvening”

Bitcoin is created when a new block is mined. More precisely, the reward is given to the miner who found the right “solution of the block” (hash). The reward is currently 6.25 bitcoin + all of the transaction fees in the block. The reward is halving every 210000 blocks (so every 4 years (1 block ~= 10 minutes)), so next time it will be 3.125 bitcoin in 2024. Presumably the price of bitcoin will be way higher at that time.

(Previous block reward was 12.5 BTC, so 12.5BTC@9395USD = 117,437 USD)

The transaction fee can be specified by the user, but the miners will of course prioritize the higher fee transactions, because it means a higher reward for them. When you use a low fee, you can wait dozens of blocks (or hundreds of minutes (1 block ~= 10 minutes). In any case, it’s still a better score than bank payment has — you have to wait anywhere between a few days to a few weeks, considering the overseas payments.

Alternative coins (altcoins), i.e. Litecoin or Dogecoin have the time on the block set to lower values, LTC is on average 2.5 minutes and DOGE a minute.

Difficulty and Mining

Solo mining is already obsolete today. The difficulty of finding one bitcoin on your own, using your hardware, is about the same as searching for one particular seed of sand on the whole Planet Earth. That is why the miners started to form groups, so-called pools, where is their computational power shared for mining bitcoins. When they are successful, the found coin is democratically shared between everyone, depending on the work done.

The current computational power of the Bitcoin blockchain is ~120 Exahash/s. That means you would need at least 60 Exahash/s super-computer to do the 51% attack.

The strongest super-computer in the world, Summit, operates on 144 Petaflops. Taken that 1 hash/s is ~12700 flops/s, you would need a few million super-computers to change ONE transaction in the blockchain.

New services are being created utilizing this new niche market, where you can share your GPU‘s computational power to this pool and obtain financial rewards (a lot of the services are scams though).

Image for post
Image for post

The total amount of bitcoin that we will be able to ever mine is set to 21 million BTC. After the last block is mined the mining does not stop, but the blocks will no longer provide a reward in bitcoin, but only in the fees put inside them by clients. There are some theories about Bitcoin switching to the Proof of Stake algorithm (instead of Proof of Work — you have to prove you have put some work into confirming the transaction, like electricity/money — if that was not the case, anyone could confirm even erroneous or badly intended transactions).

In Proof of stake there is no need for mining, the transactions will be confirmed using a distributed consensus algorithm on all nodes. The proof is the age of your coins, amount of coins, or any other significant metric. A higher amount can mean more weight to your vote. Ethereum will start using PoS with Ethereum 2.0 (launch date set to July 2020).

Wallets and private keys

Every wallet, be it a software wallet (Bitcoin Armory, Electrum) or hardware wallet (Ledger Nano S, Trezor) holds one or more private keys. These private keys are mathematically entangled to all of the bitcoin addresses generated for this wallet.

Image for post
Image for post
Ledger Nano S (CC1)

The private key is a signature, which allows you to spend coins held in the wallet. That’s why it’s crucial to store the key safely and in multiple places — anyone who knows the key has access to all of your crypto funds. However, if you forget the key, you will probably never be able to access the coins in the wallet again.

In the case of a software wallet it‘s wise to back up the key, be it on a paper, or to write it in a book and hide it in a safe place. In the case of the HW wallet, which holds the key inside we can use the same steps as with the SW wallet and use additional protection in the form of locking it into a trezor. Well, then you can have the HW wallet Trezor („a safe“ in Czech, the language of its creators) hidden in the safe.

Bitcoin private key is a 256-bit number. Most wallets use 12–24 English words, from which is the private key derived using a hash function. The key is generated using asymmetric cryptography, so it’s primitive to create an address (public key) from the private key, but almost impossible to find the private key from the address.

Written by

INTP, Master’s degree in comp-sci, Creator, indie game developer, director, writer, photographer. I like BJJ, Jungian psychology, mythology and memes.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store