GENESYS BLOCKCHAIN
  • GENESYS BLOCKCHAIN
  • BLUE LOTUS DAO
    • Introduction
      • Best returns/yield for Liquidity Providers (LPs)
      • Best Rates for Traders
    • Blue Lotus DAO Protocol
      • How Blue Lotus DAO works
      • Programmable Pricing Curve
      • Dynamic Fee
      • Blue Lotus DAO Ecosystem
      • Adding Liquidity in Blue Lotus DAO
      • Protocol Fee
    • Blue Lotus DAO Products
      • ๐Ÿ”Exchange
        • Token Swap
        • Time to Trade
        • LPs (Liquidity Pools)
        • How to Add/Remove Liquidity
      • ๐ŸšœFarming
        • How to Use Farms
      • ๐Ÿช™Pools
        • How to Stake in Pools
  • TOKENOMICS
    • GENESYS
      • GSYS Tokenomics
  • NFT MARKETPLACE
    • The Genesis of Blue
      • Dynamic NFT
      • Lotus Evolutionary Process
      • NFT Emission & Benefits
        • Lotus Holders benefits by Category
      • Genesis of Blue Rewards Program
  • GSYS GOVERNANCE
    • Introduction
    • Native/Utility Token
    • Governance
      • ๐Ÿ“Summary
      • ๐Ÿ“šCategories
      • ๐ŸคVoting
        • Voting Authority
      • โš™๏ธGovernance Process
        • Governance Stages
          • Temperature Check
          • Consensus Check
          • Governance Proposal
      • ๐Ÿ”—Security
      • ๐ŸŒŽBlue Lotus Foundation
    • FAQ
  • GENESYS VIEWAPP
    • Genesys Viewapp
  • CONTACT US
    • ๐ŸคBusiness Partnerships List Project for Pools & Farms here
    • Social Media & Community
    • ๐ŸBrand & Logos
    • ๐Ÿš€Troubleshooting
      • ๐Ÿ›‚Customer Support
  • ๐Ÿ”Audit BlueLotusDAO DEX Byte Detective:
  • ๐Ÿ”Audit BlueLotusDao Dex by Techrate:
  • ๐Ÿ”Genesys Network Token GSYS Techrate Audit:
Powered by GitBook
On this page
  1. BLUE LOTUS DAO
  2. Blue Lotus DAO Protocol

Adding Liquidity in Blue Lotus DAO

There are some conditions when adding liquidity to the Blue Lotus DAO:

  1. After LP contributions, the token price is unchanged.

  2. PminP_{min}Pminโ€‹ and PmaxP_{max}Pmaxโ€‹ are also unchanged after LP contributions.

In Blue Lotus DAO, the pool for pair X-Y needs to maintain 4 parameters:

  1. The initial amount of token XXX that is used for amplification, denoted by x0x_0x0โ€‹

  2. The initial amount of token YYY that is used for amplification, denoted by y0y_0y0โ€‹

  3. The change in token XXX amount after trading activities, denoted by ฮ”x0\Delta x_0ฮ”x0โ€‹

  4. The change in token YYY amount after trading activities, denoted by ฮ”y0\Delta y_0ฮ”y0โ€‹

Therefore, the real balances and virtual balances of the reserves are:

Real Balances

x=x0+ฮ”x0y=y0+ฮ”y0x = x_0 + \Delta x_0 \\ y = y_0 + \Delta y_0x=x0โ€‹+ฮ”x0โ€‹y=y0โ€‹+ฮ”y0โ€‹

Virtual Balances

xโ€ฒ=aโ‹…x0+ฮ”x0yโ€ฒ=aโ‹…y0+ฮ”y0x' = a \cdot x_0 + \Delta x_0 \\ y' = a \cdot y_0 + \Delta y_0xโ€ฒ=aโ‹…x0โ€‹+ฮ”x0โ€‹yโ€ฒ=aโ‹…y0โ€‹+ฮ”y0โ€‹

The constant product xโ€ฒโ‹…yโ€ฒ=(aโ‹…x0+ฮ”x0)โ‹…(aโ‹…y0+ฮ”y0)=kโ€ฒx' \cdot y' = (a \cdot x_0 + \Delta x_0) \cdot (a \cdot y_0 + \Delta y_0) = k'xโ€ฒโ‹…yโ€ฒ=(aโ‹…x0โ€‹+ฮ”x0โ€‹)โ‹…(aโ‹…y0โ€‹+ฮ”y0โ€‹)=kโ€ฒ.

Note that PminP_{min}Pminโ€‹ and PmaxP_{max}Pmaxโ€‹ at this time are:

{Pmin=(y0โ‹…aโˆ’y0)2kโ€ฒPmax=kโ€ฒ(x0โ‹…aโˆ’x0)2\begin{cases} P_{min} = \cfrac{(y_0 \cdot a - y_0)^2}{k'} \\ \\ P_{max} = \cfrac{k'}{(x_0 \cdot a - x_0)^2} \end{cases}โŽฉโŽจโŽงโ€‹Pminโ€‹=kโ€ฒ(y0โ€‹โ‹…aโˆ’y0โ€‹)2โ€‹Pmaxโ€‹=(x0โ€‹โ‹…aโˆ’x0โ€‹)2kโ€ฒโ€‹โ€‹

The current price: P=yโ€ฒxโ€ฒ=aโ‹…y0+ฮ”y0aโ‹…x0+ฮ”x0P = \cfrac{y'}{x'} = \cfrac{a \cdot y_0 + \Delta y_0}{a \cdot x_0 + \Delta x_0}P=xโ€ฒyโ€ฒโ€‹=aโ‹…x0โ€‹+ฮ”x0โ€‹aโ‹…y0โ€‹+ฮ”y0โ€‹โ€‹

Liquidity Providers have to contribute in the same proportion for all 4 amount types. We denote the contribution ratio to be bbb. LPs have to contribute x1+ฮ”x1x_1 + \Delta x_1x1โ€‹+ฮ”x1โ€‹, y1+ฮ”y1y_1 + \Delta y_1y1โ€‹+ฮ”y1โ€‹ in which:

{x1=bโ‹…x0ฮ”x1=bโ‹…ฮ”x0y1=bโ‹…y0ฮ”y1=bโ‹…ฮ”y0\begin{cases} x_1 = b \cdot x_0 \\ \Delta x_1 = b \cdot \Delta x_0 \\ y_1 = b \cdot y_0 \\ \Delta y_1 = b \cdot \Delta y_0 \end{cases}โŽฉโŽจโŽงโ€‹x1โ€‹=bโ‹…x0โ€‹ฮ”x1โ€‹=bโ‹…ฮ”x0โ€‹y1โ€‹=bโ‹…y0โ€‹ฮ”y1โ€‹=bโ‹…ฮ”y0โ€‹โ€‹

The real balances and virtual balances of the reserve after contribution are:

Real Balances

x=(x0+x1)+(ฮ”x0+ฮ”x1)=(b+1)โ‹…(x0+ฮ”x0)y=(y0+y1)+(ฮ”y0+ฮ”y1)=(b+1)โ‹…(y0+ฮ”y0)x = (x_0 + x_1) + (\Delta x_0 + \Delta x_1) = (b + 1) \cdot (x_0 + \Delta x_0) \\ y = (y_0 + y_1) + (\Delta y_0 + \Delta y_1) = (b + 1) \cdot (y_0 + \Delta y_0)x=(x0โ€‹+x1โ€‹)+(ฮ”x0โ€‹+ฮ”x1โ€‹)=(b+1)โ‹…(x0โ€‹+ฮ”x0โ€‹)y=(y0โ€‹+y1โ€‹)+(ฮ”y0โ€‹+ฮ”y1โ€‹)=(b+1)โ‹…(y0โ€‹+ฮ”y0โ€‹)

Virtual Balances

xโ€ฒ=aโ‹…(x0+x1)+(ฮ”x0+ฮ”x1)=(b+1)โ‹…(aโ‹…x0+ฮ”x0)yโ€ฒ=aโ‹…(y0+y1)+(ฮ”y0+ฮ”y1)=(b+1)โ‹…(aโ‹…y0+ฮ”y0)x' = a \cdot (x_0 + x_1) + (\Delta x_0 + \Delta x_1) = (b + 1) \cdot (a \cdot x_0 + \Delta x_0) \\ y' = a \cdot (y_0 + y_1) + (\Delta y_0 + \Delta y_1) = (b + 1) \cdot (a \cdot y_0 + \Delta y_0)xโ€ฒ=aโ‹…(x0โ€‹+x1โ€‹)+(ฮ”x0โ€‹+ฮ”x1โ€‹)=(b+1)โ‹…(aโ‹…x0โ€‹+ฮ”x0โ€‹)yโ€ฒ=aโ‹…(y0โ€‹+y1โ€‹)+(ฮ”y0โ€‹+ฮ”y1โ€‹)=(b+1)โ‹…(aโ‹…y0โ€‹+ฮ”y0โ€‹)

The constant product, after the LP contribution, becomes:

xโ€ฒโ‹…yโ€ฒ=(b+1)2โ‹…(aโ‹…x0+ฮ”x0)โ‹…(aโ‹…y0+ฮ”y0)=(b+1)2โ‹…kโ€ฒx' \cdot y' = (b + 1)^2 \cdot (a \cdot x_0 + \Delta x_0) \cdot (a \cdot y_0 + \Delta y_0) = (b + 1)^2 \cdot k'xโ€ฒโ‹…yโ€ฒ=(b+1)2โ‹…(aโ‹…x0โ€‹+ฮ”x0โ€‹)โ‹…(aโ‹…y0โ€‹+ฮ”y0โ€‹)=(b+1)2โ‹…kโ€ฒ

PminP_{min}Pminโ€‹ and PmaxP_{max}Pmaxโ€‹ at this time are:

{Pmin=((y0+y1)โ‹…aโˆ’(y0+y1))2(b+1)2โ‹…kโ€ฒ=(y0โ‹…aโˆ’y0)2kโ€ฒPmax=(b+1)2โ‹…kโ€ฒ((x0+x1)โ‹…aโˆ’(x0+x1))2=(x0โ‹…aโˆ’x0)2kโ€ฒ\begin{cases} P_{min} = \cfrac{((y_0 + y_1) \cdot a - (y_0 + y_1))^2}{(b + 1)^2 \cdot k'} = \cfrac{(y_0 \cdot a - y_0)^2}{k'} \\ P_{max} = \cfrac{(b + 1)^2 \cdot k'}{((x_0 + x_1) \cdot a - (x_0 + x_1))^2} = \cfrac{(x_0 \cdot a - x_0)^2}{k'} \end{cases}โŽฉโŽจโŽงโ€‹Pminโ€‹=(b+1)2โ‹…kโ€ฒ((y0โ€‹+y1โ€‹)โ‹…aโˆ’(y0โ€‹+y1โ€‹))2โ€‹=kโ€ฒ(y0โ€‹โ‹…aโˆ’y0โ€‹)2โ€‹Pmaxโ€‹=((x0โ€‹+x1โ€‹)โ‹…aโˆ’(x0โ€‹+x1โ€‹))2(b+1)2โ‹…kโ€ฒโ€‹=kโ€ฒ(x0โ€‹โ‹…aโˆ’x0โ€‹)2โ€‹โ€‹

The current price is updated to be P=yโ€ฒxโ€ฒ=(aโ‹…y0+ฮ”y0)โ‹…(b+1)(aโ‹…x0+ฮ”x0)โ‹…(b+1)=aโ‹…y0+ฮ”y0aโ‹…x0+ฮ”x0P = \cfrac{y'}{x'} = \cfrac{(a \cdot y_0 + \Delta y_0) \cdot (b + 1)}{(a \cdot x_0 + \Delta x_0) \cdot (b + 1)} = \cfrac{a \cdot y_0 + \Delta y_0}{a \cdot x_0 + \Delta x_0}P=xโ€ฒyโ€ฒโ€‹=(aโ‹…x0โ€‹+ฮ”x0โ€‹)โ‹…(b+1)(aโ‹…y0โ€‹+ฮ”y0โ€‹)โ‹…(b+1)โ€‹=aโ‹…x0โ€‹+ฮ”x0โ€‹aโ‹…y0โ€‹+ฮ”y0โ€‹โ€‹

We see that after LP contributes, the current price, PminP_{min}Pminโ€‹ and PmaxP_{max}Pmaxโ€‹ are unchanged. It is similar in the case of LPs withdrawals, where the ratio bbb is negative.

Example

  • Initially, the first LP put 100 XXX and 100 YYY to the reserve, we have: x=100,y=100,ฮ”x=0,ฮ”y=0x = 100, y = 100, \Delta x = 0, \Delta y = 0x=100,y=100,ฮ”x=0,ฮ”y=0.

  • A user trades 20 X for 15 Y, so we have the updated parameters: x=100,y=100,ฮ”x=20,ฮ”y=โˆ’15x = 100, y = 100, \Delta x = 20, \Delta y = โˆ’15x=100,y=100,ฮ”x=20,ฮ”y=โˆ’15.

  • Suppose an LP wants to contribute 20% of the current token amounts in the pool, so he should deposit:

    0.2โ‹…100+0.2โ‹…20=24(X)0.2โ‹…100+0.2โ‹…(โˆ’15)=17(Y)0.2 ยท 100 + 0.2 ยท 20 = 24 (X) \\ 0.2 ยท 100 + 0.2 ยท (โˆ’15) = 17 (Y)0.2โ‹…100+0.2โ‹…20=24(X)0.2โ‹…100+0.2โ‹…(โˆ’15)=17(Y)

ie. deposit 24X and 17Y tokens.

The parameters are then updated to be: x=120x = 120x=120, y=120y = 120y=120, ฮ”x=24\Delta x = 24ฮ”x=24, ฮ”y=โˆ’18\Delta y = โˆ’18ฮ”y=โˆ’18.

PreviousBlue Lotus DAO EcosystemNextProtocol Fee

Last updated 3 years ago

where aaa is the amplification factor. You may find more information about the amplification factor .

here
Page cover image