pub trait FeeCalculator {
// Required methods
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§
Sourcefn admin_trade_fee(&self, fee_amount: u64) -> Option<u64>
fn admin_trade_fee(&self, fee_amount: u64) -> Option<u64>
Applies the admin trade fee.
Sourcefn admin_withdraw_fee(&self, fee_amount: u64) -> Option<u64>
fn admin_withdraw_fee(&self, fee_amount: u64) -> Option<u64>
Applies the admin withdraw fee.
Sourcefn withdraw_fee(&self, withdraw_amount: u64) -> Option<u64>
fn withdraw_fee(&self, withdraw_amount: u64) -> Option<u64>
Applies the withdraw fee.