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
fn admin_trade_fee(&self, fee_amount: u64) -> Option<u64>
fn admin_trade_fee(&self, fee_amount: u64) -> Option<u64>
Applies the admin trade fee.
fn admin_withdraw_fee(&self, fee_amount: u64) -> Option<u64>
fn admin_withdraw_fee(&self, fee_amount: u64) -> Option<u64>
Applies the admin withdraw fee.
fn withdraw_fee(&self, withdraw_amount: u64) -> Option<u64>
fn withdraw_fee(&self, withdraw_amount: u64) -> Option<u64>
Applies the withdraw fee.