What is blockchain?

In short, the blockchain is equivalent to a decentralized digital ledger that records a series of data. These data are organized into blocks, protected by cryptography, and arranged in chronological order.

The earliest models of blockchain were built in the early 1990s. At the time, computer scientist Stuart Haber and physicist W. Scott Stornetta used encryption to protect data from tampering.

This achievement of Haber and Stornetta inspired many computer scientists and cryptography enthusiasts to study the blockchain, which also promoted the birth of the world’s first decentralized electronic cash system (ie the first cryptocurrency ) – Bitcoin.

Although blockchain technology preceded cryptocurrencies, it was not until 2008, when Bitcoin was born, that the former gradually gained acceptance. Since then, public interest in blockchain technology has grown, and cryptocurrencies have grown in popularity.

Blockchain technology is mainly used to record cryptocurrency transactions, but it can also record various digital data and can also be applied in other fields. The oldest, most secure, and largest blockchain network is Bitcoin, which has been carefully designed with a balanced blend of cryptography and game theory.

Go to Binance Official Website

How does blockchain work?

In the cryptocurrency world, we can think of a blockchain as a chain of stable blocks, each of which stores a series of previously confirmed transaction data. The blockchain network is maintained by countless computers, so its main function is to act as a decentralized database (or ledger). In other words, all participants ( nodes ) in the blockchain maintain a copy of the blockchain data, maintain good communication with each other, and ensure that everyone is always on the same page (or block).

As such, blockchain transactions take place in a global peer-to-peer network, propelling Bitcoin to become a decentralized, borderless, and censorship-resistant cryptocurrency. However, most blockchains do not require any trust mechanism and are considered to be trustless systems. Bitcoin also has no independent regulator.

Almost all blockchains are centered on mining, which is inseparable from hashing algorithms. Bitcoin uses the SHA-256 algorithm (Secure Hash Algorithm 256 bits), inputting a string of any length can produce an output of the same length. The output result can be called a “hash value”, which is always 64 characters (256 bits).

Therefore, no matter how many times “mining” is repeated, the same input always produces the same output. However, if the input changes slightly, the output can be quite different. Therefore, the hash function is deterministic, and most cryptocurrencies are designed with a one-way hash function.

Such functions determine that the user cannot reverse the input based on the output result. The only way is to guess, but the probability of guessing is very small. This is one of the reasons why the Bitcoin blockchain is safe and secure.

Now that we understand the function of the algorithm, let’s illustrate how the blockchain works with a simple transaction example.

Suppose Alice and Bob are two bitcoin holders, and Alice owes Bob two bitcoins.

In order to repay Bob two bitcoins, Alice broadcasts this transaction information to the miners of the whole network.

In this transaction, Alice informs the miners of Bob’s address and the amount of bitcoins being transacted and attaches a digital signature to her public key. This signature is generated by Alice’s private key, which allows miners to verify that Alice is the actual owner of these bitcoins.

After confirming that the transaction is true and valid, miners can put this transaction information and other transaction information into a block and try to “mine” this block. The block is operated through the SHA-256 algorithm, and the result of the operation must start with a certain number of “0” before it can be determined to be valid. The number of “0” depends on the “difficulty” of the operation, which changes with the computing power of the entire network.

In order to correctly output the expected number of “0” hashes, miners add a ” nonce ” to the block before running the encryption algorithm. A slight change in this value can completely change the result of the operation, and miners must try different random nonces until they get the correct hash value.

Every time a block is mined, the miner broadcasts the information of the new block to the whole network, so that other miners can confirm the validity of the block. After that, they will add the information of the valid block to their blockchain, indicating that the transaction is complete. However, miners still need to add the hash value of the previous block to the new block, and finally connect all the blocks to form a veritable “blockchain”. This is very important and reflects the role of trust in the system.

Each miner stores an exclusive copy of the blockchain on a personal computer and reaches a consensus: the blockchain with the most computing power must be the longest. If someone wants to change the transaction information in the previous block, the hash value of this block will also change, causing the hash value of all blocks after this block to change. He has to redo all the previous calculations to convince others that his block information is correct. Therefore, if miners attempt to tamper with block information, they must invest more than 50% of the computing power of the entire network, which is almost impossible. Similar cyber attacks are therefore called 51% attacks.
This model of requesting computer operations to generate new blocks is called Proof of Work (PoW). In addition, there are other mechanisms, such as Proof of Stake (PoS), which do not require huge computing power support, consume less power, and attract more users to participate.

Go to Binance Official Website