pub trait AdaptPrice {
    // Required methods
    fn leadin_factor_at(when: FixedU64) -> FixedU64;
    fn adapt_price(
        sold: CoreIndex,
        target: CoreIndex,
        limit: CoreIndex
    ) -> FixedU64;
}
Expand description

Type for determining how to set price.

Required Methods§

source

fn leadin_factor_at(when: FixedU64) -> FixedU64

Return the factor by which the regular price must be multiplied during the leadin period.

  • when: The amount through the leadin period; between zero and one.
source

fn adapt_price(sold: CoreIndex, target: CoreIndex, limit: CoreIndex) -> FixedU64

Return the correction factor by which the regular price must be multiplied based on market performance.

  • sold: The number of cores sold.
  • target: The target number of cores to be sold (must be larger than zero).
  • limit: The maximum number of cores to be sold.

Implementations on Foreign Types§

source§

impl AdaptPrice for ()

Implementors§