snarkvm_ledger_block

Function coinbase_reward_v2

Source
pub fn coinbase_reward_v2(
    block_timestamp: i64,
    genesis_timestamp: i64,
    starting_supply: u64,
    anchor_time: u16,
    combined_proof_target: u128,
    cumulative_proof_target: u64,
    coinbase_target: u64,
) -> Result<u64>
Expand description

Calculates the V2 coinbase reward for a given block. R_coinbase = R_anchor(H) * min(P, C_R) / C R_anchor = Anchor reward at block height. H = Current block height. P = Combined proof target. C_R = Remaining coinbase target. C = Coinbase target.