Qitmeer / qips

The Qitmeer Improvement Proposals (QIPs)
https://github.com/Qitmeer/qips
9 stars 8 forks source link

HIP: economic model : DAG POW: mining & pre-minding design #31

Open JeremyChen01 opened 5 years ago

JeremyChen01 commented 5 years ago

Mining and Pre-minding Design in DAG-POW System

Abstract

Mining essentially is a token supply schedule in PoW system, reflecting the distribution process of block rewards newly minted tokens

blocklee commented 5 years ago

若区块奖励为 r,出块时间 t', 挖矿总周期 T blocks,税率 f, 第一阶段mining时长 t1 ,第二阶段 t2, 则:

基金会可得token数 N‘ = 税收收入+挖矿产出= (N1' + N2')+ a*(N1-N1'+N2-N2'), a为基金会算力占比

若考虑到公平性(或者是实际硬需求),各阶段预挖的币对应到主网上时并不是 1:1, 会有一个折扣比例 X_i, i=1,2...,则 N' 的计算需加上相应 折扣系数。

鉴于HLC实际需求,则使用倒推法,已知 N(基金会token需求量,N’接近或等于N)、r、t’,去确定预挖周期。

JeremyChen01 commented 5 years ago
Total Amount Circulation Amount Mining period Block Reward Schedule Initial Block Reward Block rate
BTC 21,000,000 17.68 million 131year halving per 210000 blocks 50BTC 10 min
BCH 21,000,000 17.76 million 123year halving per 210000 blocks 50BCH 10 min
LTC 84,000,000 61.66 million - halving per 210000 blocks 50LTC 2.5 min
ETH - 106 million - decay 5ETH 15s
DASH 18,900,000 8.79 million - - 3.6DASH 2.5min
ZEC 21,000,000 6.48 million - - 12.5ZEC 2.5min
XMR 18,400,000 16,96 million 8year - 0.3XMR 2min
XZC 21,000,000 7.43 million 131year halving per 210000 blocks 50XZC 10min
ETC 210 million 110 millon - - 5ETC 15s
DOGE - 119.4 billion - 69.4天减半 - -
DCR 21,000,000 9.74 million - - - -
AE 274 million 2.63 million - - - -
XVG 16.5 billion 15.9 billion - - - 30s
BTM 2.1 billion 1.0 billion - - - -
SC 44.55 billion 40.5billion 5.136 year - 300,000SC 10min

备注:

BTC:2009年比特币诞生的时候,区块奖励是50个比特币。诞生10分钟后,第一批50个比特币生成了,而此时的货币总量就是50。随后比特币就以约每10分钟50个的速度增长。当总量达到1050万时(2100万的50%),区块奖励减半为25个。当总量达到1575万(新产出525万,即1050的50%)时,区块奖励再减半为12.5个。首先,根据其设计原理,比特币的总量会持续增长,直至100多年后达到2100万的那一天。但比特币货币总量后期增长的速度会非常缓慢。事实上,87.5%的比特币都将在前12年被“挖”出来。 BCH:Bitcoin Cash的区块大小定为8M,并且实行新的动态难度机制,12个小时之内如果挖出的区块不足6个,则将下一难度下降25%,并且协议上BCH剥除了隔离见证的可能。 LTC: 第一,莱特币网络每2.5分钟(而不是10分钟)就可以处理一个块,因此可以提供更快的交易确认。第二,莱特币网络预期产出8400万个莱特币,是比特币网络发行货币量的四倍之多。第三,莱特币在其工作量证明算法中使用了由Colin Percival首次提出的scrypt加密算法,这使得相比于比特币,在普通计算机上进行莱特币挖掘更为容易。每一个莱特币被分成100,000,000个更小的单位,通过八位小数来界定。 ETH:以太坊在4370000高度以前是5 ether,之后是3ether,具体算法如下, 1,区块奖励:基础奖励 + 基础奖励/32 包含的叔伯块数 + 交易费 2,叔伯块奖励:(8 - (所在区块高度 - 目标区块高度)) / 8 基础奖励 DASH:和比特币相比,达世币有所不同,因为它拥有一个双层网络。第二层级的网络由主节点(也称全节点)提供支持,从而具备财务隐私(匿名发送)、即时交易(即时发送)、去中心化管理以及预算提案系统。正因为第二层级非常重要,因此主节点将从区块奖励中分得一部分。具体来说,区块奖励的划分如下所示:45%分给矿工,45%分给主节点持有人,剩余的10%则划拨给预算提案系统(由超级块按月创建)。DASH采用另一种可降低挖矿引起的通胀的方法,就是每年的供应进行7%的减产,这不同于其它数字货币的减半。另外,每个区块的供应量与全网的矿工数直接相关,更多矿工的参与意味着更少的挖矿奖励。 DASH的开取计划会在本世纪持续,慢慢直至到下世纪中叶,最终在2150年左右挖矿才会停止。 ZEC: 每2.5分钟就能够产生一个ZEC区块,创造区块的矿工能够获得12.5的ZEC。现在,比特币只能每10分钟创建一块区块,而每块区块的奖励为12.5 BTC。零币的团队在挖掘这方面选择了一个“慢启动“。在最初的20000块(约34天),只有125000 ZEC会被创建,跟预期的250000块有落差。这导致了平均一块区块才获得 6.25 ZEC的奖励。Zcash采用PoW共识机制,区块时间为2.5分钟,区块奖励为12.5个ZEC,前4年20%挖矿所得自动分配给Zcash团队和投资者。 XMR:门罗币的区块大小没有限制,所以不存在扩容风险。发行曲线:第一,主曲线:到2022年5月底,货币数量约为1812.2万枚。然后,尾曲线:0.6 xmr/2分钟,一旦完成主要发行,就会启动,转化为<1%的通货膨胀随时间减少。详情:https://web.getmonero.org/technical-specs/ XZC: 小零币使用了跟比特币一样的证明技术参数,出块时间10分钟,总货币供应量2100万枚,产出减半周期也跟比特币一样,大约为4年一次减半。零币使用了跟比特币一样的证明技术参数,出块时间10分钟,总货币供应量2100万枚,产出减半周期也跟比特币一样,大约为4年一次减半。 ETC:每500万个区块(约2.4年)这部分递减20%。最初是5etc,在500万区块后变为4etc,以后还会继续变化。详情见https://ethereum-classic-guide.readthedocs.io/en/latest/docs/world_database/mining.html#mining-rewards DOGE:狗币第一年挖出1000亿,以后每年挖50亿,没有上限。也就是一年以后,通涨率保持每年5%并一直递减,20年以后,每年通涨只有2.5%。 XVG:供应总量为165.55亿,2014年时,发行了90亿枚,之后每年发行10亿枚,直至达到供应总量之后才会停止发行。 DCR 8%预挖(4%给预选空投者), 约 168 万个。区块参数:初始块奖励 31.2,每6144块(约21.33天)调整一次,按比例 100/101减少。 BTM:比原币挖矿预留份额为33%,比原链共识采用POW机制,挖矿分发每四年产量减半,直至不再有新块奖励产生,比原链上市第一年至第四年每年挖矿生产8662.5万个比原币,第五年至第八年每年挖矿生产4331.25万个比原币,依次类推。比原链矿工挖矿收益的1‰将捐赠给从事人工智能伦理研究的基金会等公益组织。 SC:第一个区块奖励 300,000 个 Siacoin ,每挖出一个块减少一个币,当到达 270,000 个区块以后,所有的区块只产生 30,000 的云储币(Siacoin)。总币量约:44,550,000,000。每 10 分钟一个块,总共需要挖掘 5.136 年。

blocklee commented 5 years ago

Mining and Pre-minding Design in DAG-POW System

Abstract

This is about the mining and pre-minding design of a PoW system, especially a system in which needing pre-mining design.

Meaning of Mining

Mining essentially is a token supply schedule in PoW system, reflecting the distribution process of block rewards. More importantly, mining is essential to maintaining the network functions. Thus, in theory, mining is an infinite length of work. Even if without token-based rewards (newly minted tokens), transaction fees will reward miners to support network functions.

In the early stage of network start-up, considering security and determination of parameters, a pre-minding process is necessary before mining on mainchain network. This pre-minding period maybe called as pre-mining, in which also need to invest hardware and electricity cost.

blocklee commented 5 years ago

Importance of Mining

Blockchain, a new technology aimed at rebuilding trust and transfer of value between people, is a decentralized distributed ledger. Since it is "decentralized" and "distributed", a certain number of people (miners) who are unable or difficult to control are required to participate in the accounting. Mining is a process of gaining accounting rights.

Every transaction in blockchain system can be established after the verification of different users throughout the network. No miners, this decentralized ledger will not work. Miners are proposers and validators who maintaining the network functions and security. The participation of miners need investing hardware and electricity cost, so their contributions must be rewarded. In practice,they are rewarded in block rewards and transaction fees.

blocklee commented 5 years ago

Factors Affecting Mining period

The length of mining period result from a combination of four main factors below. Mining period here means an approximate period of time in which about 99.99% of tokens are allocated.

Physical time of one block era will be the product of T and t. If the decay number of block reward is n when about 99.99% of tokens are allocated, the mining period P is approximate as P =T * t * n. Where n respects the block reward schedule and initial block reward r.

blocklee commented 5 years ago

Pre-mining Design

Definition

Considering security and determination of parameters, or other special requirement, such as rewarding founding team, requiting early supporters, a pre-mining design is needed. However, unlike BTG, it is not mean that getting lots of tokens at almost zero cost in an instant, only by modifying the parameters to obtain a nearly zero degree of mining difficulty. This is a real mining process that requires investment in hardware and electricity costs, and has a certain degree of difficulty in mining, and even everyone can participate in.

When considering a pre-mining design, the first thing to think about is pre-mining period P'. The determination of pre-mining period maybe result from a combination of actual demand, develop progress and parameter setting. Pre-mining period will start from test network and may be reflected intuitively in the form of taking away a certain proportion of block rewards within a certain period of time. Maybe we can regard as taxing periodically for special purpose.

Often, the main process of pre-mining occurs during the test network, and sometimes may continue to the main-chain network for some time.

blocklee commented 5 years ago

Design Consideration

In the project of HLC, we need to rewarding founding team and requiting early supporters. To achieve this requirement, we can adopt two ways: investing in early mining and taxing periodically.

Assuming the total amount of tokens which is mined by HLC foundation during the pre-mining period is A', and the tax revenue tokens is A". Let x denotes the foundation's fraction of hashrate, and f denotes the tax rate.

For all i = 1,2,..., A' = i = 1 A'i,Ni ,

where A'i,Ni = ri Ni xi (1 - f ) denotes the tokens that HLC foundation mined, and Ni denotes the number of blocks during period i, and ri denotes the block reward.

For all i = 1,2,..., A" = i = 1 A"i,Ni , where A"i,Ni = ri Ni fi .

Notice that N is only the number of blocks, the corresponding physical time may be a theoretical approximation.