Bitcoin Forum
May 15, 2024, 06:26:01 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: Why 1BTC should equal 10^8 satoshi ?  (Read 6638 times)
KingOfTrolls
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
October 14, 2014, 04:41:40 AM
Last edit: October 17, 2014, 03:58:47 AM by KingOfTrolls
 #41

This is the current GetBlockValue, providing a total money supply of 2099'9999'9769'0000 satoshis, halving the subsidy every 21'0000 blocks:

Code:
CAmount GetBlockValue(int nHeight, const CAmount &nFees) {
    int64_t nSubsidy = 50 * COIN;
    int halvings = nHeight / Params().SubsidyHalvingInterval();

    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;

    return nSubsidy + nFees;
}

This is a proposed GetBlockValue, providing a total money supply of 2099'9999'9769'0000 satoshis, halving the subsidy every 21'0000 blocks, smoothly:

Code:
CAmount GetBlockValue(int nHeight, const CAmount &nFees) {
    int nHalvingInterval = Params().SubsidyHalvingInterval();
    int nHalvings = nHeight / nHalvingInterval;

    // Force subsidy to zero when right shift is undefined.
    if (nHalvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210000 blocks which will occur approximately every 4 years.
    int64_t nSubsidy = COIN * 50 >> nHalvings;

    // Subsidy decreases linearily, beginning with 4/3, ending with 2/3 of the nominal value.
    nSubsidy *= nHalvingInterval * 4 - nHeight % nHalvingInterval * 2 - 1;
    nSubsidy += nHeight * 2 / nHalvingInterval % 2 * (nHalvingInterval * 3 - 1);
    nSubsidy /= nHalvingInterval * 3;

    return nSubsidy + nFees;
}

This is the corresponding hard fork proposal, with switchover scheduled for block 42'0000:

Code:
CAmount GetBlockValue(int nHeight, const CAmount &nFees) {
    int nHalvingInterval = Params().SubsidyHalvingInterval();
    int nHalvings = nHeight / nHalvingInterval;

    // Force subsidy to zero when right shift is undefined.
    if (nHalvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210000 blocks which will occur approximately every 4 years.
    int64_t nSubsidy = COIN * 50 >> nHalvings;

    // Smoothened subsidy commences after the second halving, i.e. at block 420000.
    if (nHalvings >= 2) {
        // Subsidy decreases linearily, beginning with 4/3, ending with 2/3 of the nominal value.
        nSubsidy *= nHalvingInterval * 4 - nHeight % nHalvingInterval * 2 - 1;
        nSubsidy += nHeight * 2 / nHalvingInterval % 2 * (nHalvingInterval * 3 - 1);
        nSubsidy /= nHalvingInterval * 3;
    }

    return nSubsidy + nFees;
}


Edit: This is the final version.
R2D221
Hero Member
*****
Offline Offline

Activity: 658
Merit: 500



View Profile
October 14, 2014, 05:05:24 AM
 #42

Who is proposing this? Who thinks this is a good idea?

An economy based on endless growth is unsustainable.
nextblast
Hero Member
*****
Offline Offline

Activity: 658
Merit: 500



View Profile
October 14, 2014, 06:59:14 AM
 #43

This is the current GetBlockValue, providing a total money supply of 2099'9999'9769'0000 satoshis, halving the subsidy every 21'0000 blocks:

Code:
CAmount GetBlockValue(int nHeight, const CAmount &nFees) {
    int64_t nSubsidy = 50 * COIN;
    int halvings = nHeight / Params().SubsidyHalvingInterval();

    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;

    return nSubsidy + nFees;
}

This is a proposed GetBlockValue, providing a total money supply of 2099'9999'9769'0000 satoshis, halving the subsidy every 21'0000 blocks, smoothly:

Code:
CAmount GetBlockValue(int nHeight, const CAmount &nFees) {
    int nHalvingInterval = Params().SubsidyHalvingInterval();
    int nHalvings = nHeight / nHalvingInterval;

    // Force block reward to zero when right shift is undefined.
    if (nHalvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210000 blocks which will occur approximately every 4 years.
    int64_t nSubsidy = COIN * 50 >> nHalvings;

    int nMaxIntervalHeight = nHalvingInterval - 1;
    int nSubinterval = nHeight * 2 / nHalvingInterval % 2;

    // Subsidy decreases linearily, beginning with 4/3, ending with 2/3 of the nominal value.
    nSubsidy *= (nMaxIntervalHeight * 2 - nHeight % nHalvingInterval) * 2;
    nSubsidy -= nSubinterval;
    nSubsidy /= nMaxIntervalHeight * 3;
    nSubsidy += nSubinterval;

    return nSubsidy + nFees;
}

This is the corresponding hard fork proposal, with switchover scheduled for block 42'0000:

Code:
CAmount GetBlockValue(int nHeight, const CAmount &nFees) {
    int nHalvingInterval = Params().SubsidyHalvingInterval();
    int nHalvings = nHeight / nHalvingInterval;

    // Force block reward to zero when right shift is undefined.
    if (nHalvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210000 blocks which will occur approximately every 4 years.
    int64_t nSubsidy = COIN * 50 >> nHalvings;

    // Smoothened subsidy commences after the second halving, i.e. at block 420000.
    if (nHalvings >= 2) {
        int nMaxIntervalHeight = nHalvingInterval - 1;
        int nSubinterval = nHeight * 2 / nHalvingInterval % 2;

        // Subsidy decreases linearily, beginning with 4/3, ending with 2/3 of the nominal value.
        nSubsidy *= (nMaxIntervalHeight * 2 - nHeight % nHalvingInterval) * 2;
        nSubsidy -= nSubinterval;
        nSubsidy /= nMaxIntervalHeight * 3;
        nSubsidy += nSubinterval;
    }

    return nSubsidy + nFees;
}

This explanation is quite thorough. Maybe I should download the source myself and check it out. Thanks
Cryddit
Legendary
*
Offline Offline

Activity: 924
Merit: 1129


View Profile
October 14, 2014, 03:52:25 PM
 #44

I think this patch is probably a good idea.  I have no idea how to get community support for it though. 
Ozymandias The Third
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
October 14, 2014, 05:00:04 PM
 #45

I think this patch is probably a good idea.  I have no idea how to get community support for it though. 

That remains to be seen
KingOfTrolls
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
October 17, 2014, 01:48:15 PM
 #46

Who is proposing this?

That doesn't matter.

Who thinks this is a good idea?

This does matter.
michaelb87
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
October 17, 2014, 02:05:58 PM
 #47

What is this about... nobody cares, go home  Roll Eyes
Pages: « 1 2 [3]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!