比特幣採礦如何運作? 比特幣 and Crypto mining is the process in which you can obtain new digital tokens that are released. You can mine a block about every 10 minutes, the current return is 6.25 bitcoin per block. It currently takes significant computational power to mine bitcoin and that will only increase alongside the 哈希值(hashrate)上升而增加。

Simply put, miners are another node that connect to the network. Generally they do everything a node does but with one specific task. Besides propagating transactions and blocks, miners create new blocks by adding transaction records to the public ledger of past transactions.

挖礦過程

Block hash algorithm – Bitcoin and most Crypto currency mining uses proof-of-work function. Miners combine several inputs and hash it to produce the desired output (Block header hash). When we achieve the desired output, the network rewards us with newly generated Bitcoin and transaction fees. New bitcoin generation has similar characteristics to gold. However, rather than spending resources on gold mining, resources are CPU power, time, and electricity. Once all 21 million bitcoins are generated, miners will still have an incentive for transaction fees. Furthermore, the transaction fees are inflation free.

Below are the Block header inputs they hash (from BitcoinWiki):to show how block hashing works

 

需求輸出

The desired output is a 256-bit number that all Bitcoin clients share. The network accepts blocks with a SHA256 hash block header and is lower than or equal to the current target. In short the hash output value needs to have a certain number of starting zeros. The lower the target (the more starting zeros required), the more difficult it is to generate a block.

As you can see it is not a set mathematical problem, as the input changes. Some down to every few seconds and the inclusion of Nonce (Random Number), to be able to generate the right output is more like winning the lottery. The more hash power you have, the more attempts you have per second – like buying many lottery tickets.

難度

The difficulty in Bitcoin and Crypto Mining is the target. Ordinarily the network produces a new block every 10 minutes and the difficulty is adjusted every 2016 blocks. Usually it takes 2 weeks when each block is 10 minutes. After every 2016 blocks, the network compares the actual time taken against the 2 week benchmark, and adjusts the difficulty. When we mine blocks too quickly, the difficulty will go up and vice versa.

區塊生成費用(每生成新區塊的比特幣)

The block creation fee changes at every 210,000 blocks. Before, Bitcoin mining started with 50 Bitcoin per block, then decreased to 25 Bitcoin per block. Currently – 6.25. This will eventually decreased to zero at block 6,930,000 where all 21 Million Bitcoin will be generated and in circulation. Subsequently miners will only earn transaction fees on creating new blocks.

*Difficulty, Block creation fee and Data structures etc are governed by Bitcoin Protocol Rules.

交易費

If you add up the input and output on your transaction, you’ll notice there’s a difference. Namely the transaction fees the network pays miners for validation, doing the proof-of-work, and adding your transaction onto the blockchain. New blocks don’t have to include all of the outstanding transactions and miners can pick and choose what they include. The difference between all the inputs and all the outputs in the block is the transaction fees. In this case fees a miner earns on top of the newly generated Bitcoin for hard work and resources spent.

Therefore the higher the transaction fee, the more likely miner will include it (other words the higher the transfer). You can set the amount of fees you pay, some wallets decide for you. Lastly you pay transaction fees. It’s possible to pay nothing, however, it could take weeks, months, or possibly never be included in a block. I’m sure you’ve heard the saying “There’s no free lunch in this world”. Why would miners want to work for free on your transaction?

You can see the cost per transaction (in Bitcoin) in the Memepool 此處。.

This link provides a good visual representation of the whole process from encryption, transaction, verification, mining, to block and bitcoin generation. (NOTE: this image is dated and number of bitcoin generated per block has dropped to 12.5)

Thanks for reading our article on How does Bitcoin Mining Work. If you found this helpful don’t forget to subscribe to our newsletter.

What is Alpha Homora?

What is Alpha Homora? With the rise of DeFi and Yield Farming over the past summer of 2020, the total transaction volume of DeFi for

更多

Tidal X Genesis Block

Today we are ecstatic to announce another partnership with TIDAL. TIDAL is a multi-chain open market platform that allows for programmable insurance. So the platform

更多

什麼是 Kulupu?

What is Kulupu? A democratic project that allows the community to decide on the direction of the project based on an on-chain governance structure. The

更多

What is Keep3r?

On October 28th, a random article on Keep3r Network appeared out of nowhere. The article was written by Andre Cronje, founder of yEarn.Finance ($YFI). Andre

更多
通訊