Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustment of Monetary Growth Rate #1

Open
CoinCollector006 opened this issue Oct 30, 2017 · 1 comment
Open

Adjustment of Monetary Growth Rate #1

CoinCollector006 opened this issue Oct 30, 2017 · 1 comment
Assignees

Comments

@CoinCollector006
Copy link

CoinCollector006 commented Oct 30, 2017

We need to adjust the Droxne staking rate from the current 40% to a steady state rate which is acceptable to the community due to the concerns of excessive inflation and the need to raise funding for a developer fund.

proposed change 1: adjust the emissions rate

  1. decrease in rewards to mirror the bitcoin growth rate, see the wiki link below
  2. controlled inflation to mirror Ethereum: 26.2%, 17.41%, 14.75%, 12.7%, 11.28%, . . .
  3. year 0: 40%, year 1: 40%, year 2: 20%, year 3: 10%, then stay at 10% for years 4+

proposed change 2: creation of dev fund
15% to 25% of the PoS reward across the network is reserved for the developer fund to pay for games development, signature campaigns, exchange listings, wallet enhancements, etc

References

  1. https://bitcoin.stackexchange.com/questions/37077/how-much-inflation-does-bitcoin-have-year-by-year
  2. https://ethereum.stackexchange.com/questions/12501/what-is-ethereums-inflation-rate-how-quickly-will-new-ether-be-created
@CoinCollector006
Copy link
Author

CoinCollector006 commented Nov 22, 2017

The key code logic that requires revision is this one
https://github.com/droxdev/Drox/blob/master/src/main.cpp

// miner's coin stake reward based on nBits and coin age spent (coin-days)
int64_t GetProofOfStakeReward(int64_t nCoinAge, unsigned int nBits, int64_t nTime, bool bCoinYearOnly)
{
	int64_t nRewardCoinYear = 40 * CENT;
	
	int64_t nSubsidy = nCoinAge * nRewardCoinYear / 365;
	
	if (fDebug && GetBoolArg("-printcreation"))
	printf("GetProofOfStakeReward(): create=%s nCoinAge=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nCoinAge);
	
	return nSubsidy; // + nFees;
}

if we revise the Droxne staking logic to look like Novacoin or Radium, we could leverage their open source code, see below

NOVACOIN
https://github.com/novacoin-project/novacoin/blob/master/src/main.cpp

// miner's coin stake reward based on nBits and coin age spent (coin-days)
int64_t GetProofOfStakeReward(int64_t nCoinAge, unsigned int nBits, int64_t nTime, bool bCoinYearOnly)
{
	int64_t nRewardCoinYear, nSubsidy, nSubsidyLimit = 10 * COIN;
	
	// Stage 2 of emission process is mostly PoS-based.
	
	CBigNum bnRewardCoinYearLimit = MAX_MINT_PROOF_OF_STAKE; // Base stake mint rate, 100% year interest
	CBigNum bnTarget;
	bnTarget.SetCompact(nBits);
	CBigNum bnTargetLimit = GetProofOfStakeLimit(0, nTime);
	bnTargetLimit.SetCompact(bnTargetLimit.GetCompact());
	
	// A reasonably continuous curve is used to avoid shock to market
	
	CBigNum bnLowerBound = 1 * CENT, // Lower interest bound is 1% per year
	bnUpperBound = bnRewardCoinYearLimit, // Upper interest bound is 100% per year
	bnMidPart, bnRewardPart;
	
	while (bnLowerBound + CENT <= bnUpperBound)
	{
		CBigNum bnMidValue = (bnLowerBound + bnUpperBound) / 2;
		
		//
		// Reward for coin-year is cut in half every 8x multiply of PoS difficulty
		//
		// (nRewardCoinYearLimit / nRewardCoinYear) ** 3 == bnProofOfStakeLimit / bnTarget
		//
		// Human readable form: nRewardCoinYear = 1 / (posdiff ^ 1/3)
		//
		
		bnMidPart = bnMidValue * bnMidValue * bnMidValue;
		bnRewardPart = bnRewardCoinYearLimit * bnRewardCoinYearLimit * bnRewardCoinYearLimit;
		
		if (bnMidPart * bnTargetLimit > bnRewardPart * bnTarget)
		bnUpperBound = bnMidValue;
		else
		bnLowerBound = bnMidValue;
	}
	
	nRewardCoinYear = bnUpperBound.getuint64();
	nRewardCoinYear = min((nRewardCoinYear / CENT) * CENT, MAX_MINT_PROOF_OF_STAKE);
	
	if(bCoinYearOnly)
	return nRewardCoinYear;
	
	nSubsidy = nCoinAge * nRewardCoinYear * 33 / (365 * 33 + 8);
	
	// Set reasonable reward limit for large inputs
	//
	// This will stimulate large holders to use smaller inputs, that's good for the network protection
	
	if (fDebug && GetBoolArg("-printcreation") && nSubsidyLimit < nSubsidy)
	printf("GetProofOfStakeReward(): %s is greater than %s, coinstake reward will be truncated\n", FormatMoney(nSubsidy).c_str(), FormatMoney(nSubsidyLimit).c_str());
	
	nSubsidy = min(nSubsidy, nSubsidyLimit);
	
	if (fDebug && GetBoolArg("-printcreation"))
	printf("GetProofOfStakeReward(): create=%s nCoinAge=%" PRId64 " nBits=%d\n", FormatMoney(nSubsidy).c_str(), nCoinAge, nBits);
	
	return nSubsidy;
}

RADIUM
https://github.com/ProjectRadium/Radium/blob/master/src/main.cpp

// miner's coin stake reward
int64_t GetProofOfStakeReward(const CBlockIndex* pindexPrev, int64_t nCoinAge, int64_t nFees)
{
	
	int64_t nSubsidy = 5 * COIN;
	if(pindexPrev->nHeight+1 >= 0 && pindexPrev->nHeight+1 <= 2779)
	{
		nSubsidy = 0 * COIN;
	}
	else if(pindexPrev->nHeight+1 >= 2880 && pindexPrev->nHeight+1 <= 30240)
	{
		nSubsidy = 25 * COIN;
	}
	else if(pindexPrev->nHeight+1 >= 30241 && pindexPrev->nHeight+1 <= 337999)
	{
		nSubsidy = 5 * COIN;   // 5 coins per block until the re-branding
	}
	else if(pindexPrev->nHeight+1 >= 338000 && pindexPrev->nHeight+1 <= 339439)
	{
		nSubsidy = 4.5 * COIN;   // 1st reward drop
	}
	else if(pindexPrev->nHeight+1 >=339440 && pindexPrev->nHeight+1 <= 340879)
	{
		nSubsidy = 4 * COIN;  // 2nd reward drop
	}
	else if(pindexPrev->nHeight+1 >= 340880 && pindexPrev->nHeight+1 <= 342319)
	{
		nSubsidy = 3.5 * COIN;  // 3rd reward drop
	}
	else if(pindexPrev->nHeight+1 >= 342320 && pindexPrev->nHeight+1 <= 343759)
	{
		nSubsidy = 3 * COIN;  // 4th reward drop
	}
	else if(pindexPrev->nHeight+1 >= 343760 && pindexPrev->nHeight+1 <= 345199)
	{
		nSubsidy = 2.5 * COIN;  // 5th reward drop
	}
	else if(pindexPrev->nHeight+1 >= 345200 && pindexPrev->nHeight+1 <= 346639)
	{
		nSubsidy = 2 * COIN;  // 6th reward drop
	}
	else if(pindexPrev->nHeight+1 >= 346640 && pindexPrev->nHeight+1 <= 348079)
	{
		nSubsidy = 1.5 * COIN;  // 7th reward drop
	}
	else if(pindexPrev->nHeight+1 >= 348080 && pindexPrev->nHeight+1 <= 874359)
	{
		nSubsidy = 1 * COIN;  // 8th reward drop
	}
	else if(pindexPrev->nHeight+1 >= 874360 && pindexPrev->nHeight+1 <= 1133559)
	{
		nSubsidy = 0.75 * COIN; // First reward drop 6 months from the average fee fork.
	}
	else if(pindexPrev->nHeight+1 >= 1133560 && pindexPrev->nHeight+1 <= 1392759)
	{
		nSubsidy = 0.5 * COIN; // Second reward drop 12 months from the average fee fork.
	}
	else if(pindexPrev->nHeight+1 >= 1392760)
	{
		nSubsidy = 0.25 * COIN; // Third and final reward drop 18 months from the average fee fork.
	}
	
	
	if (fDebug && GetBoolArg("-printcreation", false))
	LogPrint("creation", "GetProofOfStakeReward(): create=%s nCoinAge=%d\n", FormatMoney(nSubsidy), nCoinAge);
	
	
	int avgHeight;
	int avgHeightRevert;
	int avgHeightV2;
	
	if(TestNet())
	{
		avgHeight = AVG_FEE_START_BLOCK_TESTNET;
		avgHeightRevert  = AVG_FEE_START_BLOCK_TESTNET_REVERT;
		avgHeightV2 = AVG_FEE_START_BLOCK_TESTNET_V2;
	}
	else
	{
		avgHeight = AVG_FEE_START_BLOCK;
		avgHeightRevert = AVG_FEE_START_BLOCK_REVERT;
		avgHeightV2 =  AVG_FEE_START_BLOCK_V2;
	}
	
	
	if(pindexPrev->nHeight+1 >= avgHeightV2)
	{
		int64_t nRFee;
		
		nRFee=GetRunningFee(nFees, pindexPrev);
		return nSubsidy + nRFee;
	}
	else if(pindexPrev->nHeight+1 >= avgHeightRevert)
	{
		return nSubsidy + nFees;
	}
	else if(pindexPrev->nHeight+1 >= avgHeight)
	{
		int64_t nRFee;
		
		nRFee=GetRunningFee(nFees, pindexPrev);
		return nSubsidy + nRFee;
	}
	else
	{
		return nSubsidy + nFees;
	}
	
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant