Add upper limit for coinstake reward
authoralexhz <balthazar@yandex.ru>
Fri, 2 Aug 2013 12:57:58 +0000 (12:57 +0000)
committeralexhz <balthazar@yandex.ru>
Fri, 2 Aug 2013 12:57:58 +0000 (12:57 +0000)
Such limit should stimulate large stake holders to use smaller inputs. This will ensure the growth of the difficulty and chain's strength.

src/main.cpp

index 57fd7da..33c6003 100644 (file)
@@ -1073,6 +1073,12 @@ int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTi
     else
         nSubsidy = nCoinAge * nRewardCoinYear * 33 / (365 * 33 + 8);
 
+    // Set reasonable reward limit for large inputs since 20 Oct 2013
+    //
+    // This will stimulate large holders to use smaller inputs, that's good for the network protection
+    if(fTestNet || STAKECURVE_SWITCH_TIME < nTime)
+        nSubsidy = min(nSubsidy, 10 * COIN);
+
     if (fDebug && GetBoolArg("-printcreation"))
         printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRI64d" nBits=%d\n", FormatMoney(nSubsidy).c_str(), nCoinAge, nBits);
     return nSubsidy;