pub fn rewards_pool_to_distribute_in_supply_fraction_for_one_day(
    days_since_ic_genesis: u64,
) -> f64 {
    // Despite the rate being arguable a continuous function of time, we don't
    // integrate the rate here. Instead we multiply the rate at the beginning of
    // that day with the considered duration.
    let t = IcTimestamp {
        days_since_ic_genesis: days_since_ic_genesis as f64,
    };

    let variable_rate = if t > REWARD_FLATTENING_DATE {
        InverseDuration { per_day: 0.0 }
    } else {
        let duration_to_bottom = t - REWARD_FLATTENING_DATE;
        let closeness_to_bottom = duration_to_bottom / (GENESIS - REWARD_FLATTENING_DATE);
        let delta_rate = INITIAL_VOTING_REWARD_RELATIVE_RATE - FINAL_VOTING_REWARD_RELATIVE_RATE;
        closeness_to_bottom.powf(2.0) * delta_rate
    };

    let rate = FINAL_VOTING_REWARD_RELATIVE_RATE + variable_rate;

    rate * ONE_DAY
}
/// Computes the reward to distribute, as a fraction of the ICP supply, for one
/// day.
Computes the reward to distribute, as a fraction of the ICP supply, for one
day.
Computes the reward to distribute as a fraction of the ICP supply for one day .
pub fn rewards_pool_to_distribute_in_supply_fraction_for_one_day(
    days_since_ic_genesis: u64,
) -> f64 {
    // Despite the rate being arguable a continuous function of time, we don't
    // integrate the rate here. Instead we multiply the rate at the beginning of
    // that day with the considered duration.
    let t = IcTimestamp {
        days_since_ic_genesis: days_since_ic_genesis as f64,
    };
    let variable_rate = if t > REWARD_FLATTENING_DATE {
        InverseDuration { per_day: 0.0 }
    } else {
        let duration_to_bottom = t - REWARD_FLATTENING_DATE;
        let closeness_to_bottom = duration_to_bottom / (GENESIS - REWARD_FLATTENING_DATE);
        let delta_rate = INITIAL_VOTING_REWARD_RELATIVE_RATE - FINAL_VOTING_REWARD_RELATIVE_RATE;
        closeness_to_bottom.powf(2.0) * delta_rate
    };
    let rate = FINAL_VOTING_REWARD_RELATIVE_RATE + variable_rate;
    rate * ONE_DAY
}
pub fn rewards_pool_to_distribute_in_supply_fraction_for_one_day ( days_since_ic_genesis : u64 , ) -> f64 { // Despite the rate being arguable a continuous function of time, we don't // integrate the rate here. Instead we multiply the rate at the beginning of // that day with the considered duration. let t = IcTimestamp { days_since_ic_genesis : days_since_ic_genesis as f64 , } ; let variable_rate = if t > REWARD_FLATTENING_DATE { InverseDuration { per_day : 0.0 } } else { let duration_to_bottom = t - REWARD_FLATTENING_DATE ; let closeness_to_bottom = duration_to_bottom / ( GENESIS - REWARD_FLATTENING_DATE ) ; let delta_rate = INITIAL_VOTING_REWARD_RELATIVE_RATE - FINAL_VOTING_REWARD_RELATIVE_RATE ; closeness_to_bottom . powf ( 2.0 ) * delta_rate } ; let rate = FINAL_VOTING_REWARD_RELATIVE_RATE + variable_rate ; rate * ONE_DAY }
Computes the reward to distribute, as a fraction of the ICP supply, for one
day.
Computes the reward to distribute as a fraction of the ICP supply for one day .
days_since_ic_genesis
u64
days_since_ic_genesis
u64