Scan to download
BTC $76,218.77 +0.08%
ETH $2,357.12 -0.56%
BNB $632.62 -0.22%
XRP $1.44 -1.38%
SOL $86.81 -2.16%
TRX $0.3281 +1.23%
DOGE $0.0958 -3.34%
ADA $0.2510 -3.34%
BCH $445.41 -1.13%
LINK $9.38 -1.81%
HYPE $44.03 +0.55%
AAVE $111.18 -4.44%
SUI $0.9652 -4.03%
XLM $0.1695 +0.15%
ZEC $323.27 -3.30%
BTC $76,218.77 +0.08%
ETH $2,357.12 -0.56%
BNB $632.62 -0.22%
XRP $1.44 -1.38%
SOL $86.81 -2.16%
TRX $0.3281 +1.23%
DOGE $0.0958 -3.34%
ADA $0.2510 -3.34%
BCH $445.41 -1.13%
LINK $9.38 -1.81%
HYPE $44.03 +0.55%
AAVE $111.18 -4.44%
SUI $0.9652 -4.03%
XLM $0.1695 +0.15%
ZEC $323.27 -3.30%

A Brief Interpretation of the Principles and Challenges of Cryptocurrency PoW Mining

Summary: Proof of Work (PoW) is used in some of the largest cryptocurrencies, but that does not mean it is the most efficient or secure system.
Crypto Valley Live
2020-12-17 22:26:32
Collection
Proof of Work (PoW) is used in some of the largest cryptocurrencies, but that does not mean it is the most efficient or secure system.

This article was published on November 26 on the public account Crypto Valley Live, by Jerry Qi.

When I was a seventh-grade student, I was already fascinated by the world of cryptocurrency. At first, I thought it was simply a free money generator; as long as I let my laptop run Crypto-mining software like a whirlwind, it would give me free cryptocurrency.

In the end, my laptop did generate cryptocurrency, but only a very, very small amount.

What I was doing with my laptop was essentially "crypto mining."

A brief interpretation of the principles and challenges of cryptocurrency PoW miningSource: btcwires

"Mining"

You may have heard of the cryptocurrency Bitcoin and a term called "mining" associated with this type of cryptocurrency.

Cryptocurrency mining, simply put, is the process where miners or individuals use devices to perform "work" that supports the blockchain network in order to earn cryptocurrency rewards.

A brief interpretation of the principles and challenges of cryptocurrency PoW miningA small P2P network sketch on OneNote

Blockchain: It is a distributed record or distributed ledger that records the actions of people on the network. Therefore, for the blockchain network of cryptocurrency, the function of the blockchain is to record individual transactions on the network.

In this article, I will take Bitcoin as an example to interpret the meaning behind mining.

Returning to the topic of miners' "work." In order for miners to earn Bitcoin rewards, the simple "work" they need to do is to verify transactions on the Bitcoin blockchain.

During verification, miners will perform a series of checks to ensure that the assigned transactions are legitimate and that the participants in the transaction do not spend the same amount of cryptocurrency twice. For example, when Joe sends 12 Bitcoins to Brandon, and Brandon tries to send 7 Bitcoins to Tony and 8 Bitcoins to Max, this would be considered a fraudulent transaction because 7+8>12. The situation I just described is an example of the "double-spending problem": Brandon is trying to spend the same Bitcoin twice.

Once miners have verified between 0-4 megabytes of Bitcoin transactions (approximately 1500-3000 transactions), which is roughly the maximum size of a block, they have completed the easier half of the work to earn Bitcoin rewards. However, the task before verification is the most complex, qualifying miners to verify transactions.

The Luck Factor in Mining

By being the first to solve a string of calculations, known as creating a Proof of Work. Creating a Proof of Work is the process that requires the most computational power from miners. (I will explain later why it is called Proof of Work)

To understand the Proof of Work algorithm, you must first be familiar with the term "hash" in blockchain.

The way the network detects tampering with blocks in the blockchain is through their hash values; a long string of numbers and characters defined by the information in the block. By passing data through a hash function, such as SHA-256 used by Bitcoin, a sequence is generated for that specific input. This means that if the input data changes even one character, the output hash will change completely. Additionally, a hash is an encryptable but non-decryptable result, so it cannot be used to retrieve the original data, only as a way to verify whether the input data for the hash is the same.

Creating a Proof of Work requires miners to run a hash algorithm to "guess" the appropriate answer to the problem. For the Bitcoin blockchain network, miners must be the first to create a hash value that meets certain requirements, known as the "target hash."

The necessary information to guess the target hash exists in the block header of the new block. It includes: block version number, timestamp, hash of the previous block, and target hash value.

A brief interpretation of the principles and challenges of cryptocurrency PoW mining

Sketch of the guessing process on OneNote

The answer to the target hash is generated by the hash of the previous block, the transaction data of the current block, plus an integer from 0 to 4,294,967,296 (referred to as nonce), which is then put into the hash algorithm.

If the answer meets the requirements of the target hash, the block will be added to the blockchain. The miner who first verifies the transaction and finds the nonce that is added to that block hash will receive the Bitcoin reward. Otherwise, they will continue to try to find a valid target value.

Due to the randomness of the hash algorithm, we need to make a large number of random guesses to determine the value that meets the target hash.

A brief interpretation of the principles and challenges of cryptocurrency PoW mining

Source: Investopedia

Even though finding the nonce is already quite difficult, there are ≥ millions of other individuals on the same network competing with you, making the chance of a device obtaining a Bitcoin reward similar to winning the lottery. Therefore, you can increase your chances by boosting processing power or using multiple devices to achieve a faster Hash Rate (units include: KH/s, MH/s, GH/s, etc.).

The term Hash-rate can be explained as a measure of how fast one or a group of devices can compute numbers and verify transactions (a measure of computational power).

Consensus Mechanism

In a decentralized P2P network like the Bitcoin blockchain, there are no central figures, and decisions can only be made based on different consensus mechanisms. Consensus mechanisms not only validate transactions but also establish the purpose of mining.

A brief interpretation of the principles and challenges of cryptocurrency PoW mining

Source: Wikipedia

There are many forms of consensus mechanisms, but they all aim for the same goal: "to verify and ensure the authenticity and integrity of records" (Source: Tech in Asia).

Currently, there are three main mechanisms: Proof of Work, Proof of Stake, and Proof of Authority. In this article, I will focus on the consensus method of Proof of Work.

Speaking of mining, this summarizes how the Proof of Work model works: individuals first create a Proof of Work, then they verify Bitcoin transactions to ensure that the records in the blockchain are authentic. However, before verifying transactions, let’s delve into the purpose of Proof of Work.

The History and Purpose of Proof of Work

The idea of Proof of Work emerged in 1993, proposed by Cynthia Dwork and Moni Naor in a paper (On Memory-Bound Functions For Fighting Spam), which explained different methods to prevent spam. The focus of this paper was the idea of sending emails through computational power.

For example, if you want to send me a message via email, you must prove that you spent, say, 30 seconds of computational power just to send me that message.

Due to the speed of modern computers, in this case, spam messages/emails/transactions became a significant problem. However, by setting a "price" for each operation, spam can be significantly reduced.

A brief interpretation of the principles and challenges of cryptocurrency PoW mining

Example of verifying diligent keys on OneNote

In short, the "prover" proves to the "verifier" that they have invested a certain amount of computational power within a specific time interval.

As time progressed, Bitcoin's creator "Satoshi Nakamoto" modified the idea of having Bitcoin miners generate data fragments, which is the more challenging part. It became easy for others on the network to verify whether it truly meets the target hash value, as they only need to pass the required data through the SHA-256 algorithm.

Through this Proof of Work system, the security of systems like blockchain can be guaranteed, and a verification consensus can be established, as the actual verification of blocks will be done by a device that has invested significant computational power. This provides the network with an economic reason to maintain fairness and integrity.

How Does This Work?

For example, if a fraudulent transaction occurs and is approved, users will become "hesitant" to use other cryptocurrencies and will lower prices. Economically speaking, miners, who are the ones "producing" Bitcoin, would be unhappy due to the price drop. Meanwhile, only miners with sufficient computational power can trigger fraudulent validations. Therefore, the motivation for miners will shift towards protecting transactions to ensure that the coin price does not drop.

Disadvantages of the Proof of Work Mechanism

Although Proof of Work is used in some of the largest cryptocurrencies (Bitcoin, Ethereum, etc.), this does not mean it is the most efficient or secure system.

A brief interpretation of the principles and challenges of cryptocurrency PoW mining

Source: BBC

Power Consumption

The process of Proof of Work requires a significant amount of work because computers simply guess the correct answer through brute force using all possibilities. This method wastes a large amount of electricity and resources. On a larger scale, imagine all miners around the world trying to "mine" for Bitcoin rewards while wasting resources, contributing nothing to the network if they do not guess the nonce first.

Contradiction to Decentralization

Due to the high electricity costs of mining, miners have established central mining farms that control most of the block validations. This almost renders the idea of P2P decentralization useless, as it means only controlled miners would agree to attack the network.

Electricity costs also encourage miners to cluster in areas with lower electricity costs and higher profits to conduct mining activities, centralizing decision-making power.

Alternatives to Proof of Work

As mentioned above, there are other consensus mechanisms that can replace PoW. For example: Proof of Stake, Proof of Authority, and Proof of Capacity.

Proof of Stake determines transaction validators based on the amount of currency in the validators' wallets.

Imagine a group of people buying lottery tickets. The more tickets you buy, the greater your chances of winning. This is similar to Proof of Stake; if you have the most cryptocurrency in your wallet, you will have the greatest chance of becoming a validator and receiving rewards.

Proof of Authority determines transaction validators based on an individual's "trustworthiness."

Imagine a group of people selecting a few of the most trusted and reputable individuals to validate the validity of transactions.

Proof of Capacity determines validators based on an individual's contribution to the network's memory space.

This mechanism allows contributing nodes on the network to share memory space, so the more memory a contributing device has, the greater its chances of becoming a validator and receiving rewards.

These methods require significantly less computational power, allowing for more energy-efficient transaction validation.

Conclusion

  • Mining is the process of validating and generating Proof of Work.

  • Generating Proof of Work allows miners to validate transactions.

  • Generating Proof of Work is a process of digital guessing and coercion.

  • Proof of Work wastes electricity; besides Proof of Work, there are other methods, such as Proof of Stake, Proof of Capacity, and Proof of Authority.

Related tags
warnning Risk warning
app_icon
ChainCatcher Building the Web3 world with innovations.