GENESYS BLOCKCHAIN
  • ⛓️GENESYS BLOCKCHAIN (GCHAIN)
    • ⛓️GCHAIN
    • ✅What is GCHAIN?
    • ✅Proof of Authority
    • ✅Validators
    • ✅(GSYS)
    • ✅How to add Gchain to your wallet
    • 📚Glossary
    • ⚠️Terms & Conditions
  • 🐘GENESYS WALLET (GWALLET)
    • 🐘How to create your Gwallet
  • GENESYS VIEWAPP
    • 📊GVA General Aspects
      • 📈Why GVA?
        • 📊GenesysView App
        • 📈GVA products & Services
        • 📈GVA Features
        • 📈GVA Launchpad
          • Connect Wallet
          • Change Network
          • Let's Connect
          • Coin Crafter
            • Mint Coin
            • My Token Collection
          • Genesys Platform
            • Launch Pre-sale
            • Pre-sale Directory
          • Reward Lock
            • Set up Pool
            • Pool Ledger
          • Prize Draw
            • Launch Simple Lottery
            • Lottery Roster
          • Secure Vault
            • Establish Secure Lock
            • Token Secure Storage
            • Liquidity Vaults
          • Utility Kit
            • Multisender
            • Wrapped Converter
            • D-vote
            • Soon!
            • Market Maker
          • Collaboration Hub
        • 👨‍💻GVA P2P exchange
        • 🔐GVA Privacy & Security
  • BLUELOTUSDAO
    • Introduction
      • Best returns/yield for Liquidity Providers (LPs)
      • Best Rates for Traders
    • BlueLotusDAO Products
      • 🔁Exchange
        • Token Swap
        • Time to Trade
        • LPs (Liquidity Pools)
        • How to Add/Remove Liquidity V2
        • How to Add/Remove Liquidity V3
      • 🚜Farming
        • How to Use Farms
      • 🪙Pools
        • How to Stake in Pools
      • BlueLotusDAO Protocol
        • How BlueLotusDAO works
        • Programmable Pricing Curve
        • Dynamic Fee
        • BlueLotusDAO Ecosystem
        • Adding Liquidity in BlueLotusDAO
        • Protocol Fee
        • BLDT TOKENOMICS
          • BLDT Description
          • Deflationary Mechanisms
  • BLUELOTUSDAO GOVERNANCE
    • Introduction
    • Native Token
    • Governance
      • 📝Summary
      • 📚Categories
      • 🤝Voting
        • Voting Authority
      • ⚙️Governance Process
        • Governance Stages
          • Temperature Check
          • Consensus Check
          • Governance Proposal
      • 🔗Security
      • 🌎Blue Lotus Foundation
  • BLUE20-BRIDGE
    • Blue20-Bridge Intro
    • Blue20-Bridge
    • How to use Blue20-Bridge
Powered by GitBook
On this page
  1. BLUELOTUSDAO
  2. BlueLotusDAO Products
  3. BlueLotusDAO Protocol

Programmable Pricing Curve

PreviousHow BlueLotusDAO worksNextDynamic Fee

Last updated 1 year ago

Programmable pricing curves try to improve capital efficiency of BlueLotusDao pricing model. The curves are still a constant product, but of virtual balances instead of real balances. Thanks to the virtual balances, which are amplified significantly from real balances, BlueLotusDAO pools can achieve moderate spread and slippage rates compared to the Uniswap model given the same capital.

We first define x0x_0x0​ and y0y_0y0​ to be the liquidity providers’ initial contributions to the pool, such that x0⋅y0=kx_0 \cdot y_0 = kx0​⋅y0​=k. This is the familiar simple constant-product function.

We now introduce what is known as the amplification factor a and a > 1 . As its name suggests, it amplifies the real balances to virtual balances. Hence, we can define virtual balances x0′x'_0x0′​ and y0′y'_0y0′​, where x0′=x0⋅ax'_0 = x_0 \cdot ax0′​=x0​⋅a and y0′=y0⋅ay'_0 = y_0 \cdot ay0′​=y0​⋅a.

The pool with programmable pricing curve model will maintain a constant product of these virtual balances by using the new inventory function:

x′⋅y′=k′x' · y' = k'x′⋅y′=k′

The constant k′k′k'k′k′k′ can be derived from kkkkkk as follows:

x′⋅y′=k′x0′⋅y0′=k′(x0⋅a)⋅(y0⋅a)=k′k′=k⋅a2x′⋅y′=k⋅a2x' \cdot y' = k' \\ x'_0 \cdot y'_0 = k' \\ (x_0 \cdot a) \cdot (y_0 \cdot a) = k' \\ k' = k \cdot a^2 \\ x' \cdot y' = k ⋅ a^2x′⋅y′=k′x0′​⋅y0′​=k′(x0​⋅a)⋅(y0​⋅a)=k′k′=k⋅a2x′⋅y′=k⋅a2

We see that users benefit from lower spread and slippage when the pools use the new pricing curve. However, this comes at the expense of the price range no longer being unbounded, but being restricted between a fixed price range.

Let us take a pool with amplification factor 2 as an example, where the virtual balances are double the real balances in the original constant-product model. The price range support for this is from P04\cfrac{P_0}{4}4P0​​ to 4P04P_04P0​. In other words, this particular pool can support 0.25x to 4x the initial price set. Should this price range be exceeded, it would result in the pool being depleted of one of the tokens.

The inventory curves of BlueLotusDAO and programmable pricing curve are visualized in figure below.

Inventory curves of Uniswap (red), Curve (green) and programmable pricing curve (cyan)

Price ranges in the Amplification model

To illustrate mathematically:

Let

Therefore, to compute the minimal and maximal price:

Inventory curves of two reserves: Uniswap V2 swap model (green), Amplification model (purple)

 PPP be the price function of XXX against YYY

 Initial price, P0=y0x0P_0 = \cfrac{y_0}{x_0}P0​=x0​y0​​

 Pmin,PmaxP_{min}, P_{max}Pmin​,Pmax​, the minimal and maximal price supported by the programmable pricing curve respectively

Pmax=P0⋅(aa−1)2Pmin=P0⋅(a−1a)2P_{max} = P_0 \cdot (\cfrac{a}{a-1})^2 \\ P_{min} = P_0 \cdot (\cfrac{a-1}{a})^2Pmax​=P0​⋅(a−1a​)2Pmin​=P0​⋅(aa−1​)2

The pool will run out of token XXX or YYY when the real balances x0x_0x0​ and y0y_0y0​ are zero respectively.

In summary, we see that users benefit from lower spread and slippage when the pools use the new pricing curve. However, this comes at the expense of the price range no longer being unbounded, but being restricted between PminP_{min}Pmin​ and PmaxP_{max}Pmax​.

Functions of price ratio PminP_{min}Pmin​ (red), 1 (cyan), and PmaxP_{max}Pmax​ (purple)

Page cover image