Sentre Legacy
  • 🥳Welcome
  • Getting Started
  • DApp Manifest
  • Folder Structure
  • Available Scripts
  • Development
    • View
    • Model & Controllers
    • Providers
      • UI Provider
      • Wallet Provider
      • Account Provider
      • Mint Provider
    • Static
    • Global variables
    • Configs
  • Advanced Usage
    • ☀️Theme
    • 👘Customizing Styles
    • 🪝Hooks
  • 🤩Submitting DApps
  • References
  • Best Practices
  • Troubleshoots
  • 🎨Design Pricinples
    • Button
    • Card
    • Checkbox
    • Color
    • Corner radius
    • Drawer
    • Dropdown
    • Grid
    • Icons
    • Input
    • List
    • Menu
    • Modal
    • Radio
    • Select
    • Shadow
    • Spacing
    • Switch
    • Tabs
    • Tooltip
    • Table
    • Typography
  • 📄Litepaper
    • Introduction
    • Industry Problems
    • Sentre: An All-in-one Solution
      • The Open Protocol
      • Liquidity Efficiency
    • SEN as the Heart of the Ecosystem
      • Asymmetric Deposit
      • Adaptive Fee Model
      • The Triad Pool
      • Simulated Mesh Trading
      • Token Use Cases
    • Conclusion
Powered by GitBook
On this page
  1. Litepaper
  2. SEN as the Heart of the Ecosystem

Adaptive Fee Model

A model designed to free users from hefty fees while transacting.

PreviousAsymmetric DepositNextThe Triad Pool

Last updated 3 years ago

Considering the CPF RA×RB=k{R_A}\times{R_B}=kRA​×RB​=k, liquidity providers always incur a loss named impermanent loss, due to a state deviation of reserves. The loss will disappear if the state returns to the initial state. Without loss of generality, let’s assume that BBB outperforms AAA after a period. Clearly, arbitrageurs will sell AAA to get BBB because the current pool is maintaining an undervalued price of BBB.

(24) (RA,RB)→0<α≤1(1αRA,αRB)(R_A,R_B)\xrightarrow{0<\alpha\leq1}(\frac{1}{\alpha}R_A,{\alpha}R_B)(RA​,RB​)0<α≤1​(α1​RA​,αRB​).

Thus, the price is transforming from p=RB/RAp=R_B/R_Ap=RB​/RA​ to p′=α2RB/RAp'=\alpha^2R_B/R_Ap′=α2RB​/RA​. Compared with a HODL strategy, adding liquidity to a pool seems less profitable (without a fee model).

(25) lossno−fee=(p′RA+RB)−(p′1αRA+αRB)loss_{no-fee}=(p'R_A+R_B)-(p'\frac{1}{\alpha}R_A+\alpha{R_B})lossno−fee​=(p′RA​+RB​)−(p′α1​RA​+αRB​)

(26) =(1−α)2RB.=(1-\alpha)^2R_B.=(1−α)2RB​.​

Most AMMs use a fee model typically of 0.25% to cover the loss. The mistake here is the fee is fixed while the loss is varied. It’s better when the fee is adaptive, that means the fee will be large if the loss is large, and vice versa.

To create a more effective fee model, the AMM develops a function γ=f(α)\gamma=f(\alpha)γ=f(α), where 0<γ≤10<\gamma\leq10<γ≤1, respects to α\alphaα to adapt the change. Because α\alphaα describes how the pool state deviates from the current state, it’s reasonable for the fee function to rely on α\alphaα.

Fig. 3. Adaptive fee function: . Linear fee function: . Mixed fee function: . With fee models that are “above” the adaptive fee, the loss will be negative. The negative loss means liquidity providers are profitable.

Definition 2. The impermanent loss is zero when the adaptive fee is following:

Corollary 1. Applying the adaptive fee, the pool’s state will follow:

Because the pricing curve is the same as the 2D CPF, the impermanent loss (IL) is obvious to Sentre’s AMM too. However, employing a variant of the adaptive fee model can cover the IL while also benefit LPs.

The approach can secure income for LPs. By flexibility, the fee is low corresponding to small price changes, and gets larger along with the price change.

Furthermore, the AMM collects a fractional fee as a tax to maintain the core engine at the beginning. In the future, this tax can be opened as a grant for community projects (see Fig. 4).

(27) γ=1−α2−α\gamma=\frac{1-\alpha}{2-\alpha}γ=2−α1−α​.

Proof. Recall that a trader will get (1−α)RB(1-\alpha)R_B(1−α)RB​ in a no-fee model. When the AMM applies the adaptive fee model, the trader will receive (1−γ)(1−α)RB(1 − \gamma)(1 − \alpha)R_B(1−γ)(1−α)RB​. In summary,

(28) (RA,RB)→0<α,γ≤1(1αRA,αRB+γ(1−α)RB)(R_A,R_B)\xrightarrow{0<\alpha,\gamma\leq1}(\frac{1}{\alpha}R_A,{\alpha}R_B+\gamma(1-\alpha)R_B)(RA​,RB​)0<α,γ≤1​(α1​RA​,αRB​+γ(1−α)RB​).

With p′=α(α+γ(1−α))RB/RAp'=\alpha(\alpha+\gamma(1-\alpha))R_B/R_Ap′=α(α+γ(1−α))RB​/RA​, the loss now is

(29 )lossadaptive−fee=(p′RA+RB)−(p′1αRA+α+γ(1−α))RB)loss_{adaptive-fee}=(p'R_A+R_B)-(p'\frac{1}{\alpha}R_A+\alpha+\gamma(1-\alpha))R_B)lossadaptive−fee​=(p′RA​+RB​)−(p′α1​RA​+α+γ(1−α))RB​)​

(30) =((α−2)(α+γ(1−α))+1)RB=((\alpha-2)(\alpha+\gamma(1-\alpha))+1)R_B=((α−2)(α+γ(1−α))+1)RB​​.

Because of the zero loss, we have an equation, lossadaptive−fee=0loss_{adaptive-fee}=0lossadaptive−fee​=0​. Hence, γ=(1−α)/(2−α).\gamma=(1-\alpha)/(2-\alpha).γ=(1−α)/(2−α).​

(31) (RA,RB)→0<α≤1(1αRA,12−αRB).(R_A,R_B)\xrightarrow{0<\alpha\leq1}(\frac{1}{\alpha}R_A,\frac{1}{2-\alpha}R_B).(RA​,RB​)0<α≤1​(α1​RA​,2−α1​RB​).​

TABLE I. The price change is equal to The volume is determined over a $20mil-cap pool. Because the fee is relatively low regarding small price changes, the adaptive fee model and its variants are suitable for casual transactions.

(32) Protocol Fee=Adaptive Fee+0.05%Protocol\ Fee=Adaptive\ Fee+0.05\%Protocol Fee=Adaptive Fee+0.05%

Fig. 4. The fee is organized into two components. The adaptive fee represents the interest for LPs. The 0.05% is for Sentre Foundation to develop the core engine, grant liquidity to community projects, incubate innovative ideas, and so on.
📄
γ=(1−α)/(2−α)\gamma=(1-\alpha)/(2-\alpha)γ=(1−α)/(2−α)
γ=1−α\gamma=1-\alphaγ=1−α
γ=0.3(1−α)+0.7(1−α)/(2−α)\gamma=0.3(1-\alpha)+0.7(1-\alpha)/(2-\alpha)γ=0.3(1−α)+0.7(1−α)/(2−α)
1−α2.1-\alpha^2.1−α2.