pub trait FeesExt<AccountId, BlockNumber> {
    fn era_blocks_count() -> BlockNumber;
    fn calculate_swap_fees(
        currency_id: CurrencyId,
        total_amount_before_fees: Balance,
        swap_type: SwapType,
        is_market_maker: bool
    ) -> Fee; fn register_swap_fees(
        account_id: AccountId,
        currency_id: CurrencyId,
        total_amount_before_fees: Balance,
        swap_type: SwapType,
        is_market_maker: bool
    ) -> Result<Fee, DispatchError>; fn account_id() -> AccountId; fn current_era() -> Option<ActiveEraInfo<BlockNumber>>; }

Required Methods§

How many block per era (Eq; sessions_per_era * block_per_sessions)

Calculate the fee to be deposited into the account_id() wallet You have to reduce the amount by the returned value manually and deposit the funds into the wallet

Register a new swap fees associated with the account for the current era. A percentage of the network profits will be re-distributed to the account at the end of the era.

Get the account where the Swap fees are paid

Get the active era for the DEX fees

Implementors§