I have noticed some blocks delivering very little stake rewards. It appears there is a bug of the previous developer who has had copy-pasted some code without understanding. Bitcoin defines COIN as 100 million units (satoshis). HAL also follows this. However PPC, NVC and most other PoW/PoS coins define COIN as 1 million units. That's for a reason to avoid overflows.
static const int64_t COIN = 100000000;
static const int64_t CENT = 1000000;
int64_t nRewardCoinYear = 300 * CENT;
nSubsidy = (nCoinAge * nRewardCoinYear) / (365 * COIN);
While 64-bit unsigned integer allows for very large numbers (2 ^ 64 = 18446744073709551616), it may be not enough for the code above. Here is a real example from the HAL block chain.
in 158.52232967
out 158.52752437
coin age nValueIn=15852232967 nTimeDiff=335481 nCentSecond=5318122968
coin age nCoinAge=61552349166
nCoinAge * nRewardCoinYear = 61552349166 * 300000000 = 18465704749800000000
Incorrect subsidy is (18465704749800000000 - 18446744073709551616) / (365 * 100000000) =
519470 satoshis or 0.0051947 HAL
Correct subsidy is 18465704749800000000 / (365 * 100000000) =
505909719 satoshis or 5.05909719 HAL
It gets limited to 5 HAL on the next step. So, I've modified the reward calculation code to make sure it never overflows.
nSubsidy = (nCoinAge / 365) * (nRewardCoinYear / COIN);
Works fine for HAL since the current and future interest rates are multiples of 100% which is COIN.
Please upgrade to HAL v1.1.0.2.