pub trait IdentityCurrencyConversion {
    type Balance;
    type Currency;
    type Error;

    // Required method
    fn stable_to_stable(
        currency_in: Self::Currency,
        currency_out: Self::Currency,
        amount_out: Self::Balance
    ) -> Result<Self::Balance, Self::Error>;
}
Expand description

Trait to synchronously provide a currency conversion estimation for foreign currencies into/from pool currencies.

Required Associated Types§

Required Methods§

source

fn stable_to_stable( currency_in: Self::Currency, currency_out: Self::Currency, amount_out: Self::Balance ) -> Result<Self::Balance, Self::Error>

Estimate the worth of an outgoing currency amount in the incoming currency.

NOTE: At least applies decimal conversion if both currencies mismatch.

Object Safety§

This trait is not object safe.

Implementors§