pub fn balance_weighted_average(
    prev: Balance,
    incoming: Balance,
    weight: Fraction
) -> Balance
Expand description

Calculate a weighted average for the given balances. prev is the previous oracle value, incoming is the new value to integrate. weight is how much weight to give the new value.

Note: Rounding is biased towards prev.