What is Bitcoin?

Photo by Dmitry Demidko on Unsplash

What is Bitcoin?

Bitcoin is a stack of technologies and concepts combined to create a virtual digital currency ecosystem. The bitcoins are the units of currency circulating in the bitcoin network, they are created through the mining process done by nodes in the bitcoin network called “miners”. The bitcoin protocol stack is open source and easily accessible via a variety of devices including laptops and smartphones. Bitcoin is called a cryptocurrency because the technology includes features from cryptography to ensure security over the network which makes it the perfect form of money for the Internet. Users of bitcoin own private keys that enable them to prove ownership of transactions in the bitcoin network, unlocking the value to spend it and transferring it to a new recipient. Those keys are often stored in a digital wallet on each user’s device. Possession of the key that unlocks a transaction is the only prerequisite to spending bitcoins, putting the control entirely in the hands of each user.

A ledger of transaction

Forget about all the above forget about all you know about money and currencies. Let’s imagine that you and your friends are trying to keep track of payments, let’s say you exchange money to pay for rent or bills, so you create a communal ledger in which you record your transactions and to make it accessible to everyone, you decided to publish it into a website where every one of you can add new lines. At the end of every month, you’re all good together look at the list of transactions and settle up.

Digital signature

The way a digital signature works is that everyone generates what’s called a private key or secret key (sk) and public key (pk) pair.

Double spending problem

Digital signatures remove a huge aspect of trust, but even if we were to use this we still need to rely on an honor system, of course, I mean you are mainly trusting that everyone will follow through and settle up in cash at the end of each month, but what if for example Aicha owns Ahmed a big amount of money and by the end of the month she refuses to show up and pay. To prevent people to take out more than they take in, we can maybe start the month by having everyone pays for example 100$ and make sure no one spends more than there is. And for example, if Ahmed tries to pay Aicha 50$ and pay Abdo 50$, and then tries to pay Youssef 50$ that shouldn't be possible, this last transaction shouldn’t be possible, and that’s is called the double-spending problem.

Digital currency

Now as we said before, we need to know the entire history of transactions, so in the next step, we are going to remove the connection between the ledger and the physical dollar. In theory, if everyone in the world was using this ledger, we can spend our whole life sending and receiving money in this ledger without having to convert to real dollars, let’s refer to the quantities of bits of units on the ledger as Digital Currency or “DC” for short. You are of course free to exchange DC for real dollars. For example, Ahmed gives real 5 dollars for exchange Youssef will send Ahmed 500 DC and will add it to the communal ledger.

Decentralized peer to peer network

We mentioned before that we are going to deploy the ledger into a public website where anyone can add new lines, this requires trusting a central location, who will host the website, and controls the rules of adding new transactions. Otherwise, we can remove this central website and have everyone keep their copy of the ledger. We can have a decentralized peer-to-peer (P2P) network, where participants interact directly with each other with no intermediary or a middle man.

Cryptographic hash function

At a high level, the solution that bitcoin offers is to trust whichever ledger has the most computational work put into it. It involves what’s called the cryptographic hash functions, the general idea that if you used the computational work as a reference to which ledger to trust you can make it so that fraud in transactions would require an infeasible amount of computation. Let me first explain what a hash function means. A hash function takes as input any kind of message or file, and the output is a string of bits with a fixed length like 256 bits, the output is called a hash or the digest of the message, the digest although it looks random, it is not, in fact, it always gives the same output for the same given input. SHA256 is one of the novel hash functions.

Proof of work

We need to come out with a hard problem or puzzle to solve, so that if we gave a hash function input of a list of transactions with a special number it should give an output with special criteria. What if this criterion is 256 bits that start with 20 bits of zeros. How hard do you think it’s going to be to find the special number?

Blockchain

The way this work, is that we first organize the ledger into blocks, where each block contains a list of transactions and a proof of work so that the hash of the entire block is 256 bits that start with 20 zeros, we will later discuss how we systematically choose the number of zeros.

Miners

Now we will answer a previous question, how Bitcoin is created? like we previously discussed, Blockchain is a series of blocks linked together, anyone in the world can be a block creator, which means a creator must listen to transactions requests, collect them into a block and do the computational work to solve the problem and find the number that makes the hash of that block start with 20 zeros, and once they find it, they broadcast the new block they found, and the block creator gets rewarded for his work, the reward is a special transaction that is added, let’s say that the reward is 10 DC. And that is how digital currency is created. It’s a special transaction that doesn’t come from anyone and it doesn’t have to be signed.

Block rewards

All of the bitcoin ultimately comes from block rewards, in the beginning, these rewards were 50 BTC per block, after every 210 000 blocks, which is about every 4 years, that reward gets cut in half.

Source: https://www.forextime.com/education/forex-tutorials/bitcoin-block-rewards

Difficulty target

We set the number of zeros to 20 this number of zeros is the way the actual Bitcoin protocol works to periodically change the difficulty target so that all the computation in the network will find blocks approximately every 10 minutes. So the more miners added to the network, the challenge gets harder and harder. The block time in Bitcoin is set to 10 minutes, but other newer versions of cryptocurrencies have a shorter time.

Who invented Bitcoin?

I hope that what you previously read made you appreciate Bitcoin technology, I find it to be a genius solution that challenges the current money system. But weirdly enough nobody knows who invented it. In 2008, a person or a group of people used an alias named Satoshi Nakamoto and published a paper titled “Bitcoin: A Peer-to-Peer Electronic Cash System”.

Cryptocurrency

Bitcoin is a cryptocurrency, as mentioned before, Bitcoin uses a lot of cryptography to reduce the trust needed between participants. Hence the name ‘cryptocurrency’. Cryptocurrencies wouldn’t exist without the advances in cryptography.

Conclusion

Congratulation, you have now a general understanding of Bitcoin technology. Of course, there is a lot of technical details that we skipped to keep this article as simple as possible. But this should be enough to consider for yourself if you want to join the Bitcoin tribe as a miner, investor, or a simple user.

REFERENCES:

  • Satoshi Nakamoto Bitcoin: A peer-to-peer electronic cash system 2008.
  • 3Blue1brown, https://www.youtube.com/watch?v=bBC-nXj3Ng4&t=631s.
  • “Mastering Bitcoin by Andreas M. Antonopoulos (O’Reilly). Copyright 2014 Andreas M. Antonopoulos, 978–1449374044.”

--

--

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
Aicha Fatrah

Aicha Fatrah

Software Engineer | Technical Writer | IT Enthusiast