Post
Topic
Board Altcoin Discussion
Re: Successfully cloned and compiled POW/POS coin but how to pre-mine a coin?
by
Heisenberg_Hunter
on 21/02/2019, 08:03:27 UTC
If you are creating your own Altcoin then it would be easy to do a few minor changes in the code to premine the coins. You can fix the difficulty to lower limit and set the initial block reward to the premine number along with your coinbase transaction. Blocks which are mined later on will generate specified coins. By this way once you have mined the genesis block, it generates huge amount of coins as specified by you in the code and sends them to the address specified by you in the code.

If you have cloned the bitcoin core then you need to change the code further to spend your genesis block reward. There was a bug in the satoshi code which doesn't allow you to spend the reward which significantly affects your altcoin reward too. If you cloning a older bitcoin code, you can change the mining difficulty in mining.cpp or in the pow.cpp. I am not completely sure of this, but they will change the difficulty and help you premine those coins.