pub trait FeeCalculator {
    fn admin_trade_fee(&self, fee_amount: u64) -> Option<u64>;
fn admin_withdraw_fee(&self, fee_amount: u64) -> Option<u64>;
fn trade_fee(&self, trade_amount: u64) -> Option<u64>;
fn withdraw_fee(&self, withdraw_amount: u64) -> Option<u64>;
fn normalized_trade_fee(&self, n_coins: u8, amount: u64) -> Option<u64>; }
Expand description

Calculates fees.

Required methods

Applies the admin trade fee.

Applies the admin withdraw fee.

Applies the trade fee.

Applies the withdraw fee.

Applies the normalized trade fee.

Implementations on Foreign Types

Apply admin trade fee

Apply admin withdraw fee

Compute trade fee from amount

Compute withdraw fee from amount

Compute normalized fee for symmetric/asymmetric deposits/withdraws

Implementors