Function pool_reward

Source
pub const fn pool_reward(
    current_epoch: u64,
    pool_power: u64,
    num_of_proposed_blocks: u32,
    baseline: u32,
) -> u64
Expand description

Calculate reward of a pool. It is fraction of the pool power to network power, and block performance. Baseline is calculated by: number of blocks per term / number of validators.

Issuance * PoolStake * min(NumBlocksProposed/Baseline , 1)

ยงSafety

num_of_proposed_blocks should be reasonable amount to avoid overflow. It should be at maximum 8640 blocks per term in the protocol.