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

Asymmetric Deposit

Deposit Liquidity even with one-sided token pooling.

PreviousSEN as the Heart of the EcosystemNextAdaptive Fee Model

Last updated 3 years ago

The Symmetric Deposit problem is that LPs must deposit the tokens in a pool with a predefined proportion. To remove extra actions, the algorithm in the AMM will automatically simulate the swap on the current pool to balance the amount for LPs. Then, the subsequent procedures like depositing and returning LP tokens are automated too. Because the process is just to simulate a single-sided deposit, we call it Simulated Single Exposure.

Proposition 2. Without loss of generality, giving a pool of AAA, BBB, and SENSENSEN with the current state {RA,RB,RSENR_A,R_B,R_{SEN}RA​,RB​,RSEN​}, an LP deposits ΔSEN\Delta_{SEN}ΔSEN​ to the pool and receives an amount of LP tokens lptlptlpt,

(16) lpt=ΔSEN−(δA+δB)lpt=\Delta_{SEN}-(\delta_A+\delta_B)lpt=ΔSEN​−(δA​+δB​),

And:

To satisfy the symmetric deposit, we have a system of equations:

Or,

By transforming the system of equations, we know that:

where δA+δB=RSEN(RSEN+ΔSEN)23−RSEN\delta_A+\delta_B=\sqrt[3]{R_{SEN}(R_{SEN}+\Delta_{SEN})^2}-R_{SEN}δA​+δB​=3RSEN​(RSEN​+ΔSEN​)2​−RSEN​.

Proof. Let ΔSEN=δA+δB+δSEN\Delta_{SEN}=\delta_A+ \delta_B+\delta_{SEN}ΔSEN​=δA​+δB​+δSEN​, where the left term is the set of amounts of SENSENSEN token to swap for {rA,rB,rSENr_A,r_B,r_{SEN}rA​,rB​,rSEN​} in the simulation. The simulation is depicted by the following table (we use blackboard characters for state owners):

Here we don’t need to swap SEN, thus rSEN=δSENr_{SEN}=\delta_{SEN}rSEN​=δSEN​. By the CPF (see Eq. (33)), we also know:

(17) RA′=RARSENRSEN+δAR_A'=\frac{R_AR_{SEN}}{R_{SEN}+\delta_A}RA′​=RSEN​+δA​RA​RSEN​​,

(18) RB′=RA(RSEN+δA)RSEN+δA+δBR'_B=\frac{R_A(R_{SEN}+\delta_A)}{R_{SEN}+\delta_A+\delta_B}RB′​=RSEN​+δA​+δB​RA​(RSEN​+δA​)​,

(19) rA=RA−RA′=RAδARSEN+δAr_A=R_A-R'_A=\frac{R_A\delta_A}{R_{SEN}+\delta_A}rA​=RA​−RA′​=RSEN​+δA​RA​δA​​,

(20) rB=RB−RB′=RBδBRSEN+δA+δBr_B=R_B-R'_B=\frac{R_B\delta_B}{R_{SEN}+\delta_A+\delta_B}rB​=RB​−RB′​=RSEN​+δA​+δB​RB​δB​​​.

(21) rARA′=rBRB′=rSENRSEN+δA+δB\frac{r_A}{R'_A}=\frac{r_B}{R'_B}=\frac{r_{SEN}}{R_{SEN}+\delta_A+\delta_B}RA′​rA​​=RB′​rB​​=RSEN​+δA​+δB​rSEN​​​.

(22) δARSEN=δBRSEN+δA=δSENRSEN+δA+δB\frac{\delta_A}{R_{SEN}}=\frac{\delta_B}{R_{SEN}+\delta_A}=\frac{\delta_{SEN}}{R_{SEN}+\delta_A+\delta_B}RSEN​δA​​=RSEN​+δA​δB​​=RSEN​+δA​+δB​δSEN​​​.

(23) δA+δB=RSEN(RSEN+ΔSEN)23−RSEN\delta_A+\delta_B=\sqrt[3]{R_{SEN}(R_{SEN}+\Delta_{SEN})^2}-R_{SEN}δA​+δB​=3RSEN​(RSEN​+ΔSEN​)2​−RSEN​.

Therefore, lpt=δSEN=ΔSEN−(δA+δB).lpt=\delta_{SEN}=\Delta_{SEN}-(\delta_A+\delta_B).lpt=δSEN​=ΔSEN​−(δA​+δB​).​

📄
Instead of preparing at least two types of token, users can now deposit even with only one type of token.