pub type SlowAdjustingFeeUpdate<R> = TargetedFeeAdjustment<R, TargetBlockFullness, AdjustmentVariable, MinimumMultiplier, MaximumMultiplier>;
Expand description

Parameterized slow adjusting fee updated based on https://w3f-research.readthedocs.io/en/latest/polkadot/overview/2-token-economics.html#-2.-slow-adjusting-mechanism // editorconfig-checker-disable-line

The adjustment algorithm boils down to:

diff = (previous_block_weight - target) / maximum_block_weight next_multiplier = prev_multiplier * (1 + (v * diff) + ((v * diff)^2 / 2)) assert(next_multiplier > min) where: v is AdjustmentVariable target is TargetBlockFullness min is MinimumMultiplier

Aliased Type§

struct SlowAdjustingFeeUpdate<R>(/* private fields */);

Trait Implementations

§

impl<T, S, V, M, X> MultiplierUpdate for TargetedFeeAdjustment<T, S, V, M, X>
where T: Config, S: Get<Perquintill>, V: Get<FixedU128>, M: Get<FixedU128>, X: Get<FixedU128>,

§

fn min() -> FixedU128

Minimum multiplier. Any outcome of the convert function should be at least this.
§

fn max() -> FixedU128

Maximum multiplier. Any outcome of the convert function should be less or equal this.
§

fn target() -> Perquintill

Target block saturation level
§

fn variability() -> FixedU128

Variability factor
§

impl<T, S, V, M, X> Convert<FixedU128, FixedU128> for TargetedFeeAdjustment<T, S, V, M, X>
where T: Config, S: Get<Perquintill>, V: Get<FixedU128>, M: Get<FixedU128>, X: Get<FixedU128>,

§

fn convert(previous: FixedU128) -> FixedU128

Make conversion.