My friend Billotronic asked me to look at this coin for him to see whats up with it.
The staking code grabs the stake reward, and if the result is zero it returns false and no stake is found:
int64_t nReward = GetProofOfStakeReward(nCoinAge, nFees);
if (nReward <= 0)
return false;
I was able to verify that this is what was causing an otherwise good stake to fail.
The proof of stake reward code is very ugly and it is what is causing the chain to fail without transactions. I will show you a real example from the blockchain and the how the reward changes throughout this code. See my comments in red. This is a stake that happened with coin age = 1034
int64_t GetProofOfStakeReward(int64_t nCoinAge, int64_t nFees)
{
int64_t nSubsidy = nCoinAge * COIN_YEAR_REWARD * 25 / (365 * 25 + 8); //2.5% per year interest compounded everytime we stake
At this point nSubsidy = 8491185 (analtoshis)
//first divide what we get by 100000000 so we don't have to write COIN all the time after it.
//we multiply it by 100000000 later.
nSubsidy /= 100000000;
Now nSubsidy is 0 because we can't make an integer smaller than 1.
// 3 coins extra stake reward to give staking incentive
nSubsidy += 3;
now nSubsidy is 3
//need more coins in the input to get the bigger rewards
if (nSubsidy < 10.010) nSubsidy = 0.010;
now nSubsidy is 0 again
nSubsidy *= COIN;
return nSubsidy + nFees;
It remains 0 until the fees are added to the subsidy at the very end. So if no one is paying transaction fees, then no stakes will happen.
This requires a hard fork to fix.