Function hydra_dx_math::ema::balance_weighted_average
source · 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.