Bitcoin: How and Why

Started by xGhost, Jul 31, 2022, 10:02 AM

Previous topic - Next topic

xGhostTopic starter

If you ask people around you if they have heard anything about Bitcoin, then for sure everyone will answer: "oh yes, of course." For some years now, cryptocurrencies have been adjusted to religious norms, someone is making huge funds on them, and entire states do not know how to relate to new technologies.

However, what is it, how does it work, and why is it all needed? How is this better than existing payment systems and what does video cards have to do with it? This and more will be discussed in this article.
Table of contents

    Main idea



    Cryptocurrency rate

    Legislative regulation

Main idea

Imagine two partners: Tom and Kris. Kris loves to keep a record of all his transactions and for this purpose he keeps a diary for himself. The diary is a set of consecutive entries:

    Took 50 money from Robert

    Borrowed 8 money to James

    Borrowed 100 money to Tom

    Gave 130 money to Masha

    Borrowed 36 money to Roma


This way of doing business is highly convenient - at any time you can show the debtor the desired record. And besides, the entire history of monetary transactions is visible.

At some point, the cunning Tom sneaks into Kris's diary and replaces the entry "Borrowed 100 money for Tom " with "I bought buckwheat for 100 money." And one day, Kris looks into the diary to show Tom an entry about his debt, but with surprise he does not find the corresponding line. The diary has been hаcked. Kris can't see his funds .

To prevent this from happening again, Kris complicates the recording. He opens the computer and finds the md5sum program, which turns any text into a set of characters of a fixed length. Moreover, it does this in the most non-obvious way: if you change at least one letter in the ciphertext, then the output character set will be completely different.

Such a sequence is called a hash, and md5sum is called a hash function.

To be sure, Kris decides: "I will give the attackers a job: I will hash both the text of the new entry and the hash of the previous one." That is, each new hash is now associated with the previous entry! And where without the initial hash (any sequence of characters, such as da7c8) for the first line. Now the loan table looks like this:

    Took 50 money from Robert 69ab8

    Borrowed 8 money to James 27825

    Borrowed 100 money to Tom e709a

    Gave 130 money to Masha fdb876

    Borrowed 36 money Roma bd3d7


In the first paragraph "69ab8" is the hash for the initial hash "da7c8" and the entry "I took 50 money from Robert".

In the second paragraph "27825" - a hash for the newly formed hash "69ab8" and the entry "Borrowed 8 money for James".

In the third "e709a" - a hash for the previous hash "27825" and the text of this line "Borrowed 100 money to Tom ".

And so on similarly.

Now Tom will have to recalculate the hashes for all subsequent entries in order to change the third line to something else. Let's say there are 5-10 records ahead - tedious, but the goal is worth it. But if there are many more records, then there will already be difficulties with such a fraud.

Kris does not stop at this - there is never too much reliability. He adds a nonce to each entry in brackets - some number, due to which the hash necessarily ends with two zeros. The table turns into the following:

    Took 50 money from Robert(210) 69a00

    Borrowed 8 money to James(172) ff800

    Borrowed 100 money to Robert (654) e7f00

    Gave 130 money to Masha (323) a6c00

    Borrowed 36 money Roma (901) bd300


In the first paragraph "69a00" - a hash for the initial hash "da7c8" and the entry "I took 50 money from Robert".

In the second paragraph "ff800" - a hash for the newly formed hash "69a00" and the entry "Borrowed 8 money for James".

In the third "e7f00" - a hash for the previous hash "ff800" and the text of this line "Borrowed 100 money to Tom ".

And so on.

Now there is no need to hide the diary, the whole history is public, but changing any entry in it is too laborious for hаckers. Kris takes five friends as partners, with whom he shares his diary. For each new recording, they together begin to select the appropriate nonsense, so faster. The one who finds the coveted number first makes an entry in the diary and receives a small reward for this. In order for the guesser to receive a reward, the entry must end with the phrase "transfer X funds to user Y", where X is the reward to user Y for the chosen nonce.

The final form of Kris's diary is Bitcoin. This is a payment system that uses the unit of the same name to record transactions. A monetary operation, the result of which is recorded in the diary, is a transaction. The sequence of records in it (each of which is called a block) in it is a blockchain. The process of competition between Kris's friends for the selection of a suitable nonsense is mining, and the participants themselves are miners. Block write fee - transaction fee.

Bitcoin is very similar to gold, which cannot be copied - it can only be mined. But this is a highly costly process both in terms of time and resources. This is one of the reasons why gold is so valuable. However, if people participate in gold mining, then the computing power of computers provided by the participants in transactions is used in mining. Roughly speaking, there is only one way to get more Bitcoins: to process more transactions. Miners provide more and more computing power. Because of this, the demand for video cards and electricity is growing.



    An important feature of Bitcoin that has led to its popularity is the decentralized nature of this payment system. In other words, Bitcoin is not under the control of the state, organization or individual. The program code is completely open, and the participants of the system are scattered around the world. Anyone who wants to join can do it without obstacles. Transaction histories and fiat currency wallet balances are stored on special servers that belong to financial institutions. Such storages are often hаcked, which is rather unpleasant for ordinary users. There is nothing in the Bitcoin system that can control the data. Moreover, all data in this network is publicly available. And, as we saw above, it is almost impossible to change them.


    Unlike traditional financial systems, Bitcoin does not require you to authenticate with passport data at all. You are your address on the Bitcoin network. You can get as many addresses as you want. The ability to make financial transactions will depend only on whether there are enough funds on your account. And by the way, anyone can calculate the status of your account, but can not know anything about you, except for the history of transactions and the address of your wallet.


    You cannot change any block in the blockchain. It's practically impossible. Otherwise, a huge number of records on millions of computers around the world would have to be changed at the same time. Therefore, no transaction can be canceled or replaced with another.

    Limited issue

    Traditional fiat money has unlimited supply since central banks can always print as much funds as they need. Consider the analogy with gold. The more difficult gold is mined and the smaller its reserves, the more valuable it is. It is an inflation control mechanism. Bitcoin has implemented a similar mechanism: the system gradually reduces the number of bitcoins mined per unit of time. It looks like an inverse proportionality function. And yes, someday there will come a moment after which the number of bitcoins in the world will become a constant value. Just like the amount of gold reserves on Earth.

transparency, speed, cost, simplicity. If you send cryptocurrencies or information over the blockchain, the evidence of such sending cannot be changed or faked, since it is confirmed by hundreds of thousands of computers around the world. Many copies of this information are stored on these alike computers - and it is available for viewing by any user at any time. The entire transfer process takes a few minutes and costs ten times cheaper than a bank transfer. If you store funds and information in the blockchain, the records will never be lost or forged, any market participant can verify your financial solvency at any time. No third parties and intermediaries, only complete transparency and mathematical guarantee of the accuracy of calculations.

And how safe is it?

If we talk about the security of a payment system that is spherical in a vacuum, then Bitcoin is very reliable. Since 2009, since 2009, only one case has been recorded in which a code malfunction led to an error.
What happened there?

Potential threats still exist. For example, crаcking private keys and the so-called "51% attack".
hаcking Private Keys

To protect against fraud, all transactions are transmitted over the network along with a digital signature. It allows you to ensure that the message is successfully delivered to the selected address and that the message has not been modified.

The digital signature is created using a hashing algorithm and asymmetric encryption (you can read more about encryption here).

The principle of asymmetric encryption can be explained as follows:

Let each participant in the exchange of parcels have a personal lock and a key to it. If participant A wants to receive a secret package from participant B, then he sends him his castle. Participant B locks the lock on the secret package and sends it to participant A. Having received the package, participant A opens the lock with the key and receives the package. In this analogy, the public key is the lock and the private key is the key. hаcking a private key can make it possible to change the recipient's address or the contents of the package.

Private keys are associated with bitcoin addresses using the SHA-256 hashing function. It gives the cipher as a sequence of 256 bits. That is, 2^256 = 10^77 hash variants are possible. At present, the computing power of all the computers in the whole world would not be enough to sort through all the options in a reasonable time.

Attack 51%

The principle of this attack is as follows: while the attacker has more power at his disposal than the rest of the network, he can not confirm other people's blocks, confirming only his own, which means he can receive 100% of all new bitcoins and block any transactions at his discretion.

In the early stages of cryptocurrency development, such a threat is highly significant. At the moment, such an attack on the Bitcoin network requires computing power many times greater than the power of all supercomputers from the TOP-500 rating (the 500 most powerful supercomputers in the world). After the mass transition of miners from video cards to integrated circuits specially designed for bitcoin mining, protection against such an attack has become even stronger. In addition, with such a break, attackers do not have the opportunity to conduct any transactions at their own discretion, since they do not have other people's private keys necessary to sign transactions.

There is a similar "Sybil attack" in which attackers can avoid real nodes on the network if they create enough fake or identical (Sybil) identifiers. They can then refuse to accept or transmit blocks, effectively blocking other users on the network. Consensus algorithms such as Proof-of-Work and Proof-of-Stake do a good job of dealing with this threat.

The security of a payment system does not mean complete security of its use. There are a huge number of examples of successful attacks on crypto exchanges using Bitcoin and similar cryptocurrencies.

How is this possible if the Bitcoin algorithm is so reliable? It's simple, almost all committed attacks, hаcks and thefts in the field of cryptocurrencies are somehow related to the vulnerability of the infrastructure: cryptocurrency exchanges, wallets and third-party private key storages. No one cancels the human factor: for some attackers, it is enough to have the gift of persuasion.

Therefore, it is worth remembering that if a thief stole the keys from your pocket, this does not mean that he will definitely pick your lock. But on the other hand, no matter how cool the lock you have, it will be bad if you lose the key to it.

Legislative regulation

The legal regime for bitcoin varies considerably from country to country. In some countries, bitcoins are recognized as a currency of account (for example, in Germany), in others (for example, in Japan), Bitcoin is legal tender with a purchase tax. In some countries (for example, in China), bitcoin transactions are prohibited for banks, but allowed for individuals (but at the same time the country leads in the field of mining due to the presence of the largest production capacities).
In Switzerland, cryptocurrencies are subject to the alike rules as foreign currencies, and this country is one of the most favorable jurisdictions for Bitcoin startups.
    The following users thanked this post: Sevad


There is only one big "but!" in all this beauty: the value of money is determined not by its own value, but by solvency. And it is determined, if quite roughly, by the presence of goods for this money.
Many goods - deflation, little goods - inflation. And the fact that the central bank can print as much money as it likes, so there is no direct evil here. If your salary today 100 bucks and you can buy 100 packs of butter for 1 ruble each, and tomorrow one pack of butter costs 10 bucks, but your z.p. became 1000 bucks, then nothing will change. The ratio of money to goods remained the same. There can be many reasons for issuance. One of which, for example, is the launch of the economy as such.

When the product is already manufactured, and the buyer has nothing to buy it yet. And a cash advance is made. Later, the surplus money supply can be withdrawn in various ways. But, I repeat, money in itself is useless in the same way as in most cases gold is useless, lying dead weight in banks and only a fraction of a percent of the production involved in jewelry and radio electronics.
Therefore, receiving a manufactured product (spent abstract labor) in exchange for mining is an absolutely unnatural transaction. In mining, only the speculative component "oh, if I had invested in cue ball in 2009, today ..." can attract. After all, the exchange rate is the exchange rate, but someone has to make your Bentley too. What would you offer him in return? Hours of calculations in search of the coveted number?

As for anonymity, here's how to look. If I am a terrible bandit, then it is not at all necessary for me to know that this particular bitcoin wallet is yours. It is sufficient for me to know that you have cue balls. And then offer you arguments so that you share them with me. But my bitcoin wallet is not mine at all. And the fact that you transferred something to someone there. Yes, there was nothing like that.