base_fee
up to 99% fee (MAX_FEE
).
Rate Limiter Formula
The rate limiter uses a progressive fee calculation with the following key components: Parameters:reference_amount
(x₀): The base reference amountcliff_fee_numerator
(c): The base fee ratefee_increment_bps
(i): The fee increment in basis pointsmax_limiter_duration
: Duration for which the rate limiter is active
input_amount ≤ reference_amount
Case 2: input_amount > reference_amount
First, decompose the excess amount:
where:
a
: floor division of(Input Amount - x₀) / x₀
b
: remainder of(Input Amount - x₀) mod x₀
fee_increment_numerator = (fee_increment_bps * FEE_DENOMINATOR) / 10_000
a < max_index
If
a ≥ max_index