snarkvm_ledger_block

Function coinbase_reward_v1

Source
pub fn coinbase_reward_v1(
    block_height: u32,
    starting_supply: u64,
    anchor_height: u32,
    block_time: u16,
    combined_proof_target: u128,
    cumulative_proof_target: u64,
    coinbase_target: u64,
) -> Result<u64>
Expand description

Calculates the V1 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.