Programmable Pricing Curve
Programmable pricing curves try to improve capital efficiency of Blue Lotus Dao 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, Blue Lotus DAO pools can achieve moderate spread and slippage rates compared to the Uniswap model given the same capital.
We first define
to be the liquidity providers’ initial contributions to the pool, such that
. 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
The pool with programmable pricing curve model will maintain a constant product of these virtual balances by using the new inventory function:
can be derived from
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
. 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 Blue Lotus DAO and programmable pricing curve are visualized in figure below.
Inventory curves of Uniswap (red), Curve (green) and programmable pricing curve (cyan)
To illustrate mathematically:
- be the price function ofagainst
- Initial price,
- , the minimal and maximal price supported by the programmable pricing curve respectively
Therefore, to compute the minimal and maximal price:
The pool will run out of token
when the real balances
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
Functions of price ratio
(red), 1 (cyan), and
Inventory curves of two reserves: Uniswap V2 swap model (green), Amplification model (purple)