Olive Docs
Liquidity Pool

Fees

Dynamic Liquidity Fee

fee={BR,if improved,BR,otherwise.\mathrm{fee}= \begin{cases} \dfrac{B}{R}, & \text{if improved,}\\ B\cdot R, & \text{otherwise.} \end{cases}
  • Where R(N) is:

    R(N)=1+k{TNTm,if NT and Tm,NTMT,if N>T and TM,0,otherwise.R(N) = 1 + k\begin{cases} \dfrac{T-N}{T-m}, & \text{if } N \le T \text{ and } T\ne m,\\ \dfrac{N-T}{M-T}, & \text{if } N > T \text{ and } T\ne M,\\ 0, & \text{otherwise.} \end{cases}
  • And:

    improved={NT<CT,if NT,CT,if N=T.\text{improved} = \begin{cases} \lvert N - T\rvert < \lvert C - T\rvert, & \text{if } N \neq T,\\ C \neq T, & \text{if } N = T. \end{cases}
  • Where:

    C is the current ratio.

    N is the new ratio.

    T is the target ratio.

    k is the multiplier.

    m is the lower fee band anchor ratio.

    M is the upper fee band anchor ratio.

    B is the base fee.

  • Clarify:

    The lower and upper fee band anchor ratios shape the fee curve. They are not hard deposit or withdraw limits.

Fee Table

ActionFeeFee routingRent recipient
Add liquidityDynamic liquidity fee25% company / 75% poolNone
Remove liquidityDynamic liquidity fee25% company / 75% poolNone

On this page