我们知道,比特币的挖矿实际上就是找出符合0的个数的Hash值,如下图:
We know that Bitcoin's mining is actually a search for a zero-digit Hash value, as follows:
那么比特币挖矿收益是怎么计算的呢?
How do you calculate the profits of bitcoin mining?
这个问题居然在网上找不到明确的中文解释,矿叔从Bitcoin官网上找到了一些资料,精简后,解释如下:
The problem was not clearly explained online in Chinese, and Uncle Mine found some information on the Bitcoin website, which was streamlined and explained as follows:
首先Hash(哈希)加密算法会产生一个256位的二进制数,为了在这256位数中“猜到”前N个字节为0的成功概率为【2的256次方-1】分之一,也就是平均需要计算2的256次方 - 1次才能算出。
First, the Hash (Hashi) encryption algorithm produces a 256-digit binary number, in order to “ guess ” the first N byte is one-fifth of the two-and-a-half, i.e. an average of two-and-a-half.
即:
That is:
2**256-1=115792089237316195423570985008687907853269984665640564039457584007913129639935
由此,当难度为D时,需要计算如下次数。(**符号代表幂运算)
Thus, when the difficulty is D, the number of times is calculated as follows. (** symbol is an operation.)
(0xffff * 2**208)/D
因此总的哈希次数为:
As a result, the overall number of Hashis is as follows:
D * 2**256 / (0xffff * 2**208)
由于比特币规则设定每10分钟产生一个区块,10分钟等于600秒,所以将上面换算成每秒算力:
Since the Bitcoin rule provides for a block to be created every 10 minutes, which equals 600 seconds, the above is converted to arithmetic per second:
D * 2**48 / 0xffff / 600
换算成10进制就是:
to 10 degrees is:
D * 2**32 / 600
以上公式是个通用公式,变量只有两个:挖矿难度和矿机算力。
The above formula is a generic formula, with only two variables: difficulty in mining and miner arithmetic.
举例:2017年8月15日,难度D为:923,233,068,448 (点击 https://blockexplorer.com/api/status?q=getDifficulty 可获取当前难度)
Example: 15 August 2017, difficulty D: 923,233,068,448 (click https://blockexporer.com/api/status?q=getDifficulty to get the current difficulty)
代入上述公式,在本轮难度下,需要算力为:6,608,759,725,949,815,794,即6609P/秒的算力,才能在10分钟内产生1个区块,即12.5个BTC。
Added to the formula described above, at the difficulty of this round, arithmetic capacity of 6,608,759,725,949,815,794, or 6609P/second, is required to produce one block, or 12.5 BTC, within 10 minutes.
也就是需要:6609P /12.5BTC=528.72P 的算力才能挖出一个比特币。
That is: 6609P/12.5 BTC = 528.72 P is needed to dig up a bitcoin.
目前最通用的蚂蚁S9矿机13.5T/s算力,也就是528720T / 13.5T/s=39164台机器挖矿,能在10分钟内产生一个BTC。
The current most commonly used ant S9 miner 13.5 T/s arithmetic, that is, 528720 T / 13.5 T/s = 39164 machines, produces a BTC in 10 minutes.
也就是 39164 / 144个10分钟=272台S9矿机,每天能挖一个BTC。
That is, 39164/144 10 minutes = 272 S9 machines, one BTC per day.
将以上过程整理成公式,设D为难度,H为算力(G为单位),每天能挖的比特币数量为:
Forming the above processes into formulae with D as difficult and H as arithmetic (G in units), the number of bitcoins that can be dug each day is as follows:
600 * 10**9 * 12.5 * 144 * H / 2 ** 32 / D
将以上公式简化为:
simplifies the formula to read:
251457 * H / D
从公式可以看出,产出与挖矿难度成反比,与矿机算力成正比。随着难度的不断攀升,每天能挖的比特币数量不断降低。
shows in formulae that output is inversely proportional to the difficulty of mining, and to the ability of the miner to calculate. As the difficulty rises, the number of bitcoins that can be dug each day decreases.
因此,只要能给出一个难度的增长比例预期,就能计算出回本时间与投资回报。
Thus, the return time and return on investment can be calculated provided that a difficult proportion of growth is expected.
备注:常用单位换算:1P=10^15,1T=10^12, 1G=10^9, 1M=10^6, 1K=10^3
Note: Conversion of commonly used units: 1 P=10~15, 1T=10~12, 1G=10~9, 1M=10~6, 1K=10~3
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论