pub trait RateCollection<Rate, Balance, NormalizedDebt> {
    // Required method
    fn current_debt(
        &self,
        interest_rate: &InterestRate<Rate>,
        normalized_debt: NormalizedDebt
    ) -> Result<Balance, DispatchError>;
}
Expand description

A collection of pre-computed interest rates for performing interest accrual

Required Methods§

source

fn current_debt( &self, interest_rate: &InterestRate<Rate>, normalized_debt: NormalizedDebt ) -> Result<Balance, DispatchError>

Calculate the current debt using normalized debt * cumulative rate

Implementors§