project-bitmark / bitmark

Bitmark Core
The Unlicense
47 stars 33 forks source link

Total emission calculation #111

Open melvincarvalho opened 3 years ago

melvincarvalho commented 3 years ago

This change does not affect neither the emission rate nor the total emission

Further to this comment here from @dbkeys and follow up:

https://github.com/project-bitmark/bitmark/issues/103#issuecomment-818031606

How do we verify the emission schedule for those that have followed the coin a while. I do get asked this and sympathetic people say to me 'they changed the emission'

What can I point them to that will verify that the community designed halvings and emission have been retained

If it's a case of having to read the code, the bar is going to be too high for most people

melvincarvalho commented 3 years ago

I went over this with @dbkeys and one thing I learnt is that the new coin emission algorithm makes it impossible to go over the originally designed scheduled. I think that's a great feature, and something that is worth adding to the coin history thread: https://github.com/project-bitmark/bitmark/issues/113

I think what would be ideal would be some plots of total coin emission and what would be expected

bitmarkcc commented 3 years ago

Currently the total emission is tracked by a block index variable nMoneysupply that keeps getting incremented at each block. You can get the total emission with the rpc command 'getmoneysupply'.

I just now created a new command for the rpc 'coins' that loops over all blocks from the specified range and calculates the sum of unspent outputs. To make sure no coins are leaking I am running checks with this right now. This sum should never be greater than the total money supply. See my branch 'coins': https://github.com/akrmn2021/bitmark/tree/coins.

melvincarvalho commented 3 years ago

We had a look at the emission rate over the weekend

The rate for the 3rd epoch should be around 10 btm, and it's running considerably lower than that at around 6

The 3rd epoch was due to tick over around now, and with this emission schedule will tick over in around 700 days

This is arguably a bug as the aim was not to affect the emission rate

The main meta issue was that this change was rushed through because we were in emergency mode due to major disruption from famine and feast, and major centralization from the selfish miner, leading to the marking eco system gong to zero

The 700 days we have in epoch 3 could be viewed as positive. The MO of this project is to distribute marks through marking, for good behaviour. We need to examine and document the emission much more closely, with plots and documentation of CEM. Right now only 1-2 people understand what the fork is supposed to do, and it needs to be everyone

melvincarvalho commented 1 year ago

@dbkeys, @akrmn2021 the emission seems not to be going down

Outstanding 17,606,067 MARKS

image

We calculated the epoch to be start of last month (maybe that's wrong) but only one of the algorithms has dropped so far, and that's SHA256

Shouldnt all MPOW algorithms be dropping about now?

dbkeys commented 1 year ago

Total Emission I think the main point that should be understood is that the eventual total number of bitmarks to be mined has never changed. Total emission, so far, as of January 31, 2023 is 17, 606,354 and will keep climbing, as it should, towards the total emission limit, as set originally of: 27.58 million Quote: " Total Coin Supply: ~27.58 million (27,579,894.73108000 exactly) " https://bitcointalk.org/index.php?topic=660544.0

It is misleading to speak of "the" epoch, as each of the eight mining algos operates independently and due to block reward variation governed by CEM, and each algo will reach its own epoch change independently, most likely at different times.

Maximum Emission (Ever): 27,579,894.73108 Emission (Money Supply) as of January 31, 2023: 17, 606,354

Emission Rate Emission rate, is governed by the Coin Emission Modulation (CEM) algorithm, within the original framework of the halvings and quarterings . CEM will set the block reward for each algo on a daily basis. CEM will lower emission for an algo if that algo's hashrate is below the peak hashrate seen looking back a year. This is calculated daily, and independently for each algo. Thus, the emission rate for an algo may be the nominal for the epoch currently being mined ( if the hashrate is at peak for that algo), or it may be lower, but never higher than what it would have been without CEM's intervention.

At the fork of June 6, 2018, when CEM was introduced, the money supply still remaining to be mined was proportionally allocated to each of the 8 algos. Each algo is mined independently of the others, and if the algo is subject to large variations in hashrate, the emission rate for that algo may very well be much lower than the emission rate currently on other algos. Therefore, epochs, as defined by the original halving and quartering scheme, ( where an epoch is complete when a certain number of coins is emitted), will happen at different times for each algo, because they do not all operate at peak hashrate all the time. CEM will be individually limiting each algo's emission rate if its hashrate is lower than the peak seen looking back a year.