Trait stable_swap::math::FeeCalculator[][src]

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.

Implementors