How does the Bitcoin system work?

How does the Bitcoin system work?

I have been paying attention to Bitcoin since 2011, contributed code to altcoins, and am the author of yacoin-p2pool. I have basically studied the entire Bitcoin protocol, written a trading website, and followed Silkroad for a long time. I have witnessed almost half of the history of Bitcoin.

As Yuri said at the beginning of "Lord of War", "I'm just gonna tell you what happened." This article will use a lot of dry goods to describe what is happening.

Bitcoin Principles
Let’s start with a brief introduction to the principles of Bitcoin:

1. First, you need to know the concept of public key and private key (if you already understand it, you don’t need to read this part)

Public key and private key are terms used in asymmetric encryption, a branch of modern cryptography. Public key is usually used to encrypt information, and private key is used to decrypt information. Why is this so? Because when you watch TV dramas, telegrams are all symmetric encryption. The disadvantage of this encryption method is obvious. If someone knows the key and encryption method, they can decrypt it by following the encryption method in reverse. This situation did not change until asymmetric encryption. The public key is a key that can be made public to the world. For example, when you communicate with Google, you encrypt it with the 1024-bit public key given by Google, and only Google has the corresponding private key when sending it to Google. Only Google can decrypt it, thus ensuring the security of communication.


2. Bitcoin mainly uses ECDSA, which is the elliptic curve signature algorithm. This algorithm has two characteristics. Pay attention to these two points, which are crucial for the following

a. As long as you know the private key, you can calculate the corresponding public key;
b. If you have signed something with your private key, you can use your public key to check whether it was signed by you;


3. After the knowledge is prepared, let's start talking about Bitcoin transactions. Bitcoin actually has no wallet, only transaction bills. The entire Bitcoin is a pile of transaction bills.

for example:

Bill 1: Transferred from A to B, XXX bitcoins transferred
Bill 2: XXX bitcoins transferred from B to C and D
Bill 3 transferred from C to E, XXX bitcoins transferred
. . . .

Anyone who downloads the client can receive all the bills from the day Bitcoin was established, so as long as all the bills are downloaded, they will naturally know how much money should be left in each account (think carefully here)

4. The Bitcoin account is the public key just mentioned

5. I will start to post a Bitcoin bill below. This is the core part!!! Each bill is a piece of data. After you sign it, it will be sent to the entire network. The data structure is reversed into easy-to-understand Chinese explanation as follows:

FROM (who sent it, including two parts)
Previous tx: The ID of the bill for the money you want to spend. In other words, any money you spend should have been transferred to you by someone, and you need to show the ID of the bill
scriptSig: Your signature for this transaction is to hash the order with your private key. Only you can do this hash.

TO (Who accepts, consists of two parts)
Value: How much to send
scriptPubKey: The other party’s public key. A Bitcoin account is a public key.


6. After you sign the order, start sending it to the whole network. How to send it? Bitcoin communication is not that complicated. You can compare it to an IRC channel. However, unlike ordinary "IRC", any client is an "IRC" server. When you start the client, you will receive the client addresses with public IP addresses around you, which is the "server" list. This list is constantly refreshed and contains other Bitcoin users. So when you shout a word in this "IRC", people around you will hear it, and then spread it to the whole world.

7. After sending the signed order to the world, all clients that receive the order will verify whether your order is correct, such as verifying your signature to see if it was sent by you, and whether you have so much money (based on historical transactions, you can calculate how much money you have to spend)
If everyone has calculated that there is no problem with the transaction, the transfer is basically successful.

8. In fact, the other party has already accepted the Bitcoin, but if he wants to spend it, he needs the private key corresponding to the address (public key). So he can fill in the FROM header of the next order, Previous tx is the serial number of the transaction just now, and scriptSig is filled in with the hash signed by his private key.

And so on.

Mining
Then I will explain the mining part. I am trying to simplify the whole process to make it easier for everyone to understand, so I have specifically removed the mining and double-spending problems (counterfeiting currency, spending the same money twice).

In fact, after reading the above explanation, you will have a question. Since they are all transaction records, where did the initial money come from? The transaction must have the original part of the money, and that money comes from mining.

After mining, you will also get a transaction record, but FROM is very special, and the entire system also recognizes this FROM

In fact, the bill is attached to the block. After the bill is sent to the entire network, the entire network needs to calculate whether it is correct.
Didn’t we just say that the entire network will calculate together? According to Bitcoin regulations, the first one to calculate will receive a reward, which is the income from mining. Now the amount of this reward is 25 bitcoins, so...

I only have one PC, so I think it is too weak. So there is a mining machine. The function of mining is to calculate whether the Bitcoin transaction is correct. The purpose of the mining machine is to calculate faster than others.

Money Laundering
Many people who talk about Bitcoin cannot explain the problem of money laundering unless they are really experienced, and this problem is related to the essence of Bitcoin. Why Bitcoin can be used for money laundering is also determined by the characteristics of Bitcoin. I have explained the Bitcoin bill above. It is only 1 in (FROM) and 1 out (TO). In fact, the Bitcoin protocol allows countless ins and outs, as long as the total amount of FROM is equal to the total amount of TO. In order to understand it more vividly, I have found a transaction with multiple FROMs and multiple TOs from the actual Bitcoin transaction record. The screenshot is as follows. The link is here https://blockchain.info/zh-cn/tx/2a93e411d7cc829675d93fe2cd18fe32c89d8833757cede9d27d8fb2485ef968



After understanding all of this, let's look at a transaction like this: If a person A who is engaged in drug trafficking wants seller B to pay, he can make a transaction like this: there are countless innocent people on the left, just one drug buyer, and there are countless innocent people on the right, just one seller.



When the FBI knows the account of the drug seller, in order to find the source, they need to trace back countless innocent people and verify whether they are the buyers one by one. In reality, such transactions can be repeated hundreds of times, so it becomes very difficult to trace the source of the money in the end, because it may involve tens of thousands or hundreds of thousands of people, and these people may be distributed in various countries around the world...

Some people may wonder, you are just talking here, are there any websites that really provide money laundering services? Yes! And it is very famous. It is one of the wallet services provided by the website http://blockchain.info - shared address (as the name suggests, shared address, public address, let Bitcoin go around in the public address, black and white mixed together). For details, please see the description on its website: Send Shared - Blockchain.info Chinese report see: Blockchain launches Shared Coin money laundering service

Up to now, the cumulative transfer amount on http://blockchain.info is more than 40 billion US dollars. As for how much of it is black and how much is white, it is actually hard to tell. In a sense, people who invest in Bitcoin and speculate on Bitcoin are the "white" people mentioned above, innocent people. Their money is mixed with drugs, arms, and terrorists' money, and they are actually part of it.

For more information about money laundering, you can read this Bitcoin summary . I am also the author. It contains the FBI's PDF on Bitcoin money laundering, and also gives a typical example - the drug trading website Silk Road (which was closed by the FBI two days ago), and how this website achieves anonymity.

gamble
Gambling is the second pillar of Bitcoin, mainly because of a website, SatoshiDICE, which is translated into Chinese as "中本聪色子". This website is similar to lottery, but unlike all previous lotteries, it uses Bitcoin's blockchain to develop an algorithm that makes it impossible for people to cheat when placing bets on its website. The algorithm guarantees fairness, and there will definitely be no such thing as the double-color ball scam, so it is very popular among gamblers, and it only charges a commission on transactions. Data from June showed that the transaction amount of this website accounted for 51% of all Bitcoin transactions. Gambling website SatoshiDice: accounted for 51% of all Bitcoin transactions in June 2013

summary
Because of the two "hard needs" of money laundering and gambling, Bitcoin will not die in a short time, or it will collapse and then rise again in the secondary market, because there are A-share market makers, who are interest groups, and will keep Bitcoin active. Bitcoin can also be shorted, and they can manipulate it easily. The China Securities Regulatory Commission cannot control them, so they can keep using the same tricks. The people who really use Bitcoin to launder money simply exchange the money into the Bitcoin black box and exchange it out immediately after washing. The whole process probably does not exceed a few minutes.

The Chinese role

The first type of people are those who make and sell mining machines. Basically, all mining machines in the world, whether they are foreign brands or Chinese brands, are all made in China. For example, the famous Butterfly Miner (BFL) is produced in China, not to mention Dr. Pumpkin Zhang. There are also people who make mobile phones in Huaqiangbei. There was a period of time when copycat phones were not profitable, and the mobile phone industry was oversupplied, so many mobile phone manufacturers changed the boards to mine.

The second type of people are miners. The world's largest mining group is in China, and the computing capacity of mining machines in China accounts for a large part of the world. Chinese people have unique conditions for mining - public electricity, and some people use the clusters of their units to mine.

The third category is those who run trading websites. Take Bitcoin China, the owner of Bitcoin China, Yang Linke, as an example. So far, the trading volume of btcchina has jumped to the first place in the world. The three major exchange companies in China and a futures trader 796 Xchange have monopolized the world's Bitcoin trading. The total daily trading volume is about 1 billion to 1.5 billion. The A-share Industrial and Commercial Bank of China has a daily trading volume of 100-200 million yuan.

The fourth type of people are the bankers. The recent rise of Bitcoin led by China is their work. These people come from A-shares. They are called the daily limit death squad in the A-share market. Such a bunch of crazy people entered an unregulated market. The consequences can be imagined. There are reports that the former members of the Delong Group are involved in Bitcoin: Chinese tycoons are the biggest speculators

The fifth type of people are hackers. The representative of them is the website http://souku.pw/ . In early November, this website began to sell personal information by number. Basically, if you enter your frequently used ID, you can immediately search for your ID card and even Alipay account information. This website uses Bitcoin payment, but the website owner may have been scared and closed down after two days. Words are not enough. For details, you can see: Where does the data on the "Social Worker Database" website come from? http://www.v2ex.com/t/88317 90% of Bitcoin traders in China are hackers? There are a lot of useful information and screenshots in it

The sixth type of people are long - term Bitcoin investors, represented by Li Xiaolai and Shenyu. They are bullish in the long term, do not trade much, enter the market very early, and basically make a fortune

The seventh type of people are short-term Bitcoin speculators, who buy and sell Bitcoin on major trading websites every day. I have communicated with these people on the BTC-E trading channel for a while, but I still cannot understand why anyone would choose such a risky market.

future

Crash issues

Bitcoin will exist for a long time because there are many things related to black, and these black things are often unable to be completely eliminated because of the inherent darkness of human nature. For example, the dealers will make long-term profits from this. Their trick is nothing more than raising the distribution and shorting with high leverage. They make money when Bitcoin rises and they also make money when it falls. When it falls, they collect chips for another round, and continue like this, that's all (they will be caught if they manipulate the stock price in A-shares, but they are like fish in water here, haha). The long-term crazy rise and fall will attract the attention of various media, so more people will enter the market. Doesn't Bitcoin China trading platform know that Bitcoin is manipulated? Doesn't MTGOX, the largest foreign trading platform, know that Bitcoin is manipulated? Will the dealers who operate in it withdraw obediently and stop interfering? Will some media that have received money stop reporting? Will China's crazy speculators become rational in the foreseeable future? These questions can only be answered haha. It would be strange if the regulatory authorities did not take action.

The problem of sudden rise and fall

There are several reasons why Bitcoin’s volatility is a problem:

· Increase in users. For example, recently, something that was originally in a very small circle was suddenly exposed to billions of people. Anything that consumes so many media resources to be exposed has brought a lot of money to Bitcoin.

· Most of the newcomers brought by the media are speculators. The characteristic of speculators is that they overestimate the appreciation potential of Bitcoin. If the real users of Bitcoin (such as the black market mentioned above) increase by 100% on average each year, speculators will flock in and may overdraw the growth prospects of Bitcoin in the next few years, blowing it to 10,000%, which is what Greenspan called a bubble. In the stock market, this is called digesting the good news in advance, which means that the current Bitcoin price has already taken into account the appreciation potential in the future. This is like taking out a loan to buy a house and overdrawing the salary for the next 20 years. What will happen if the salary is slightly interrupted?

· Banker. This has existed for a long time, and everyone knows that there is a banker, especially this wave of rise is inseparable from the banker.

The impact of government policies, especially in China, because China’s Bitcoin trading volume accounts for a large proportion of the world’s total, so naturally the Chinese government’s policies have a significant impact on Bitcoin.


I have experienced Bitcoin going from $5 to $30, then falling to around $2, then to $90, and then falling again. Later, it was sideways for several months because there were no new users in those months, and new entrants were tired. Old users were too lazy to trade when they saw the sideways trend, and the market makers were trading in waves. The subsequent surge was the result of media hype, a large influx of newcomers, and the manipulation of market makers.

So Bitcoin is not without stability. In a stable state, the time it takes for money launderers to exchange money in and out should be very short, and the impact of price fluctuations is not too great. The premise for Bitcoin to be stable is:

The market is big enough that no dealer or exchange can monopolize the transaction. If one dealer sells short, another big trader may hold the exact opposite opinion. When the market is big enough, a 1% fluctuation actually has a big impact (such as gold, foreign exchange, stocks, and futures). A 1% fluctuation in a large market is the same as a 30% fluctuation in a small market.

The media will not make as much of a fuss as it has recently. Bitcoin users will stabilize, and the daily transaction volume will remain at a relatively fixed scale, rather than growing exponentially like it is now.


It is currently impossible to regain a steady state in the short term:

In 2011 alone , the daily transaction volume of Bitcoin China was only 10,000 yuan, and last year it was only 30 million yuan. This year, it has reached 400 to 500 million yuan a day. It is unclear what the transaction volume will be next year, and it is difficult to predict how big the market will be next year;

There are still many people holding a large amount of Bitcoin . It can be said that there is a serious wealth inequality in Bitcoin. These people are potential people who can cause Bitcoin to soar or plummet. But then again, once they sell their chips, although they make money on the one hand, they also lose control on the other hand. If they want to continue to speculate, they can only buy chips in the market themselves, which also carries the risk of being trapped;

Bitcoin has impacted the national order and will inevitably be suppressed. Before it matures, the biggest risk may come from governments. The governments have many strategies to adopt, including prohibiting transactions, using large amounts of computing resources to attack, destroying the Bitcoin protocol, and allowing national teams to enter the market for manipulation. Facing a country, Bitcoin is still very weak.


Deflation problem

You can't stop more speculators from A-shares from entering the market. In addition, the total amount of Bitcoin is limited, and there is long-term deflation. So in terms of the time scale of "years", Bitcoin will rise, and in the short term it will fluctuate greatly. As for whether to invest? This depends on personal preference. Some people don't like risks, so they can use Yu'ebao's reverse repurchase of treasury bonds. Some people really have no place to invest their spare money, so they can buy one or two meals for fun, but they have to wait until the market is down (just like stocks, when everyone is talking about it on the streets and alleys, when everyone thinks it will not fall, when everyone wants to buy it, it is often the last frenzy).

Possible hidden property issues

Due to the well-known property problem of officials in China, Bitcoin may become a tool for hiding property. However, there is no precedent for this at present. We will wait and see. Why do I have this concern? Because there is such a thing as brain wallet. You can search this keyword yourself, or you can read Bitcoin tutorial: How much do you know about brain wallet passwords? Simply put, brain wallets have the following characteristics: as long as you remember a unique string (a poem + your ID, your favorite sentence + phone number, whatever you write), or know a special file (such as the last file on the Windows installation disk), you can generate a Bitcoin wallet (a pair of public and private keys) according to the hash value of this string or a specific file. Only you know and can use this wallet. So for those who run away with money, they no longer have to worry about the money being confiscated at home, buried in the ground and dug up, carrying gold and being blackmailed by local snakes, carrying diamonds and not being easy to exchange, all they need to do is remember a sentence, and then they can exchange it and spend it in any corner of the world. Don’t you think it’s scary?

The problem of being used by extremist forces

Finally, the biggest question about Bitcoin is whether it will become a source of funds for terrorists. Once it is used by some extremist forces in Xinjiang, the consequences will be disastrous. Therefore, the country should track this thing for a long time and formulate a regulatory plan as soon as possible. Otherwise, it will not only have an impact on the financial order, but it may also cause political problems.

appendix
Many people are concerned about the issue of short selling. In order to give everyone a more intuitive understanding of how far Bitcoin's financial derivatives have developed, I have taken a few screenshots.
Buy more, leverage about 10 times
Short selling, also leveraged by 10



Short selling, also leveraged by 10
Bitcoin trading of Shanghai Composite Index futures


Bitcoin trading of Shanghai Composite Index futures
Buy and sell IPO-issued Bitcoin stocks


Buy and sell IPO-issued Bitcoin stocks
Margin Trading


Margin Trading


It is said that the exchange recently intends to conduct direct cash exchange (which is equivalent to bypassing the Hong Kong Monetary Authority), so the issue of Bitcoin is very complicated and is more like an unregulated, highly speculative financial derivative with money laundering functions .

renew:
Half a year later, a lot of things written in this article have been confirmed, including the central bank's further tightening of regulatory measures on Bitcoin. After no one was interested in it, the price of Bitcoin rose to US$680 (bitstamp price, if MtGox was still there, the premium would be even higher). This is a highly speculative game, and the ups and downs will continue. Let's wait and see.

 

From: Zhihu


<<:  A famous domestic company was blackmailed by hackers and needed 20 bitcoins to settle it

>>:  Altcoins in the “Entertainment Circle”

Recommend

Face analysis: what is the husband and wife look like

Face analysis: what is the husband and wife look ...

What does a mole on the sole of the foot mean?

There are many "moles" on each of our b...

How to read a man's forehead

The forehead can judge a person’s status; so, how...

XML Gold Launches Instant Transfer Service for Purchasing Bitcoin

According to foreign media reports, XML Gold, a d...

What does a mole on the left corner of the eye mean?

The meaning of a mole on the left corner of the e...

What kind of body shape is the most likely to cause loss of wealth?

Everyone wants good fortune. In addition to hopin...

The most difficult aspects of leadership for employees

The most difficult aspects of leadership for empl...

No matter what happens, you should take a photo first.

In the past, when mobile phones were not popular,...

What does it mean to have two moles on the left palm?

Although we all have moles on our bodies, it is r...

Different times have new interpretations for “broken palms”!

I often hear friends around me talk about broken ...

Are men with round faces good-looking?

Character is not only a characteristic of a perso...

What is the character and fate of a girl with dimples?

What is the personality and fate of a girl with d...