1

I see several coins advertising 1 day PoW. An example is this coin. https://github.com/concealcoin/concealcoin

I have been studying the code but must be missing a critical part as none of the math adds to 1 day.

Can anyone shed light on this? What part of the code am I missing?

Main.cpp

CBigNum bnProofOfWorkLimit(~uint256(0) >> 20); // "standard" scrypt target limit for proof of work, results with 0,000244140625 proof-of-work difficulty
CBigNum bnProofOfStakeLimit(~uint256(0) >> 20);
CBigNum bnProofOfWorkLimitTestNet(~uint256(0) >> 16);

unsigned int nTargetSpacing = 1 * 30; // 30 seconds
unsigned int nStakeMinAge = 24 * 60 * 60; // 24 hours
unsigned int nStakeMaxAge = 30 * 24 * 60 * 60;           // 30 days
unsigned int nModifierInterval = 10 * 60; // time to elapse before new modifier is computed

int nCoinbaseMaturity = 80;
CBlockIndex* pindexGenesisBlock = NULL;
int nBestHeight = -1;

and the rewards from main.cpp
// miner's coin base reward
int64_t GetProofOfWorkReward(int64_t nFees)
{
    int64_t nSubsidy = 3500 * COIN;

    if (fDebug && GetBoolArg("-printcreation"))
        printf("GetProofOfWorkReward() : create=%s nSubsidy=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nSubsidy);

    return nSubsidy + nFees;
}

Main.h

static const int LAST_POW_BLOCK = 2880;

static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
static const unsigned int MAX_INV_SZ = 50000;
static const int64_t MIN_TX_FEE = 1000;
static const int64_t MIN_RELAY_TX_FEE = MIN_TX_FEE;
static const int64_t MAX_MONEY = 17000000 * COIN;
static const int64_t COIN_YEAR_REWARD = 3 * CENT; // 3% per year
static const int64_t MAX_MINT_PROOF_OF_STAKE = 0.03 * COIN; // 3% annual interest
static const int MODIFIER_INTERVAL_SWITCH = 2000;

1 Answer 1

1

It doesn't have a 24-hour block time, it issued all its PoW coins in the first 24 hours of existence.

The math you're looking for is nTargetSpacing * LAST_POW_BLOCK, which multiplies to 86400, the number of seconds in 24 hours.

As you can see from their home page (screenshot), that worked out about as well as you'd expect.

5
  • ok so 30 seconds x 2880 blocks is 86400 - Thanks! I was having a brain freeze looking at all this code :)
    – Joe
    Commented Mar 24, 2015 at 18:50
  • @Joe It doesn't explicitly only allow PoW blocks for 24 hours, but it says 'make a new block about every 30 seconds, and only make 2880 blocks.'
    – Nick ODell
    Commented Mar 24, 2015 at 18:52
  • I noticed a lot of these 1,2,3 day PoW coins usually add "approximately" 3 days POW"
    – Joe
    Commented Mar 24, 2015 at 18:54
  • @Joe yeah the idea was quickly run a POW distribution unusually secured by POS. Commented Mar 24, 2015 at 22:15
  • Bwahahaa... Hilarious answer!
    – Jannes
    Commented Mar 24, 2015 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.