Block subsidy
Protocol and consensus12.4.15+

Block subsidy

How many new Lotus a block creates: the difficulty-based subsidy formula, what happens to fees, and the split between the miner and the miner fund.

Lotus has no halving and no supply cap. The number of new coins a block creates depends on the difficulty of that block, not on its height.

Units #

UnitValue
1 XPI (one Lotus)1,000,000 satoshis
Base subsidy260 XPI
Largest valid amount2,100,000,000 XPI, a sanity bound on any single amount, not a supply limit

Subsidy formula #

Text
subsidy = 260 XPI x (log2(D) + 1)        D = 2^220 / target

target is the 256-bit target encoded in the header's nBits. 2^220 is the easiest target allowed on mainnet (nBits = 0x1c100000), so D is the block's difficulty relative to that floor.

  • At the floor, D = 1 and the subsidy is 260 XPI.
  • Each doubling of the difficulty adds 260 XPI.
  • If nBits is above 0x1c100000 (an easier target, possible on test networks), the subsidy is 260 XPI.
  • The result is always between 260 XPI and 57,460 XPI (221 x 260).
nBitsDifficulty DSubsidy
0x1c1000001260 XPI
0x1c0800002520 XPI
0x1b1000002562,340 XPI
0x1a10000065,5364,420 XPI

On regtest the subsidy is always 260 XPI.

Algorithm #

The node computes the logarithm with integers only, so every node gets the same satoshi amount. From src/validation.cpp:

C++
Amount GetBlockSubsidy(uint32_t nBits,
                       const Consensus::Params &consensusParams) {
    static constexpr int64_t SUBSIDY_INT = SUBSIDY / SATOSHI;
    if (!consensusParams.enableDifficultyBasedSubsidy || nBits > 0x1c100000) {
        return SUBSIDY;
    }
    static constexpr int64_t PRECISION_BITS = 27;
    static constexpr int64_t LOG_MAX_TARGET = 220;
    const int64_t exp = nBits >> 24;
    const uint32_t mantissa = (nBits & 0x007fffff);
    assert(mantissa >= 0x8000);

    const int64_t logMantissaFixedPoint =
        Log2FixedPoint(mantissa, PRECISION_BITS);
    const int64_t aLogMantissaUncorrected =
        (SUBSIDY_INT * logMantissaFixedPoint) >> PRECISION_BITS;
    const int64_t aLogMantissa =
        aLogMantissaUncorrected + SUBSIDY_INT * PRECISION_BITS;
    const int64_t aLogExponent = SUBSIDY_INT * 8 * (exp - 3);
    const int64_t aLogTarget = aLogMantissa + aLogExponent;
    int64_t blockSubsidy = SUBSIDY_INT * LOG_MAX_TARGET - aLogTarget;
    blockSubsidy += SUBSIDY_INT;
    return blockSubsidy * SATOSHI;
}

SUBSIDY_INT is 260,000,000 satoshis. Log2FixedPoint(x, precision) returns log2(x / 2^precision) as a fixed-point number with precision fractional bits (src/util/intmath.cpp):

C++
int32_t Log2FixedPoint(uint32_t x, const size_t precision) {
    int32_t b = 1U << (precision - 1);
    int32_t y = 0;

    if (x == 0) {
        return std::numeric_limits<int32_t>::min(); // negative infinity
    }
    while (x < 1U << precision) {
        x <<= 1;
        y -= 1U << precision;
    }
    while (x >= 2U << precision) {
        x >>= 1;
        y += 1U << precision;
    }
    uint64_t z = x;
    for (size_t i = 0; i < precision; i++) {
        z = (z * z) >> precision;
        if (z >= 2U << precision) {
            z >>= 1;
            y += b;
        }
        b >>= 1;
    }
    return y;
}

Fees #

Half of the fees of a block are burned. The other half is added to the subsidy:

Text
block reward = subsidy + floor(fees / 2)

The outputs of the coinbase transaction may not add up to more than the block reward (bad-cb-amount). They may add up to less.

Miner fund #

Half of the block reward must go to the miner fund. The rest is the miner's.

ShareAmount
Miner fundfloor(block reward / 2)
Minerat most block reward - miner fund

The node computes the required fund outputs for each block and checks that the coinbase contains them, byte for byte and in order. Other outputs may sit between them. A coinbase without them is rejected with bad-cb-minerfund.

The fund addresses are compiled into the node and change at network upgrades:

PeriodFund outputs per block
Genesis to NumbersOne output for each address of the current set (13 addresses at genesis), the fund split equally
Numbers to 1st KingsOne output of the whole fund, to one address of the set in turn
Since 1st KingsOne output of the whole fund to lotus_16PSJQXrnTrUbhnxPpPgf1jd16JFkWk8TdbpALVME
Napoleon upgrade

From the Napoleon activation (median time past 1797886200, 21 December 2026, 20:50 UTC) the fund output goes to lotus_16PSJPVHNWEF4t1nSFefhth6HAtqn6oripT4k9iNv. The share stays half of the block reward.

Example #

A block at difficulty D = 256 with 10 XPI of fees:

ItemAmount
Subsidy2,340 XPI
Fees burned5 XPI
Block reward2,345 XPI
Miner fund output1,172.5 XPI
Minerup to 1,172.5 XPI

Read the subsidy of a block #

Shell
lotus-cli getblockstats 1427000 '["subsidy","totalfee"]'

The other fields of the coinbase (its tag and height) are described in Coinbase tag. How a pool splits the miner's share is in Pool.

Source share/www/docs/subsidy.md in the lotusd repository
Checked against src/validation.cpp src/minerfund.cpp src/consensus/addresses.h src/amount.h src/util/intmath.cpp src/chainparams.cpp