Go to the coin's github repository. Go to the file
src/main.cpp. In Litecoin's case,
this page. Then do a search for the two following expressions, one should match:
Find the above function, and it will have something like this, in Litecoin's case (
this line):
int64 static GetBlockValue(int nHeight, int64 nFees)
{
int64 nSubsidy = 50 * COIN;
// Subsidy is cut in half every 840000 blocks, which will occur approximately every 4 years
nSubsidy >>= (nHeight / 840000); // Litecoin: 840k blocks in ~4 years
return nSubsidy + nFees;
}
This means that the subsidy (block reward) starts at 50 and is cut in half every 840,000 blocks. So in this case, I would find a block explorer for Litecoin and record the current block number. As of writing, LTC's current block number is 606,317.
Then divide the current block number by the figure in the source code, rounding down to an integer:
That means the block reward is (50 coins) / (2 ^
0) = 50 coins!
Here's another example that I'm making up:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
int64 nSubsidy = 1000 * COIN;
// Don't expect to see these comments everywhere, some devs are lazy <---
nSubsidy >>= (nHeight / 50000);
return nSubsidy + nFees;
}
Let's say the current block number is 120,000. Divide it by the figure in the source code:
That means the block reward is (1,000 coins) / (2 ^
2) = 250 coins!
Sometimes you'll see something like this:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
if (nHeight == 1)
{
return 1000000 * COIN;
}
int64 nSubsidy = 1000 * COIN;
nSubsidy >>= (nHeight / 50000);
return nSubsidy + nFees;
}
This is a 1,000,000 coin premine. I encourage you to always check for yourself to see if there is a premine. Humans can lie, but the source code can't. I've seen more than one occasion where the premine was just totally unmentioned! This way, you don't have to hope that you get word of it, you can just see for yourself. Anyway, this premine business is drifting away from your question, so I'll stop.