Skip to main content

get_variable_fee

Function get_variable_fee 

Source
pub fn get_variable_fee(
    volatility_accumulator: u32,
    bin_step: u16,
    variable_fee_control: u32,
) -> u128
Expand description

Calculate variable fee in 1e18 precision.

Port of PairParameterHelper.getVariableFee(): (volatilityAccumulator * binStep)^2 * variableFeeControl / 100