LP share pricing
Methodology and implementation of pricing LP share tokens
To price LP tokens, it is not enough to simply add the values of all assets in the pool as this is easily manipulated. Instead, a more robust procedure is required to calculate LP token values.
The precise instructions on how to calculate LP shares of the 2-CLP, 3-CLP, or E-CLP are available in section 5 of this technical paper.
This example demonstrates the principles of robust LP share pricing applied to constant product pools.
For a given constant product Balancer pool containing assets 1, ..., n, define the following:
The constant product invariant of the pool is
Note that the amounts
are easily manipulatable through swaps, but the product
is not. And, as we require asset pricing oracles elsewhere, we can presume that the prices
are also not easily manipulatable (controls to assure against this will be discussed elsewhere).
To calculate a manipulation-resistant LP token price, it will be enough to express the pricing of LP tokens solely in terms of manipulation-resistant variables
. Note that while
are individually manipulatable by adding or removing liquidity,
is not easily manipulatable as long as proper accounting methods are in place for handling adding and removing of liquidity (see Section 5.5 in the technical paper for more details).
The portfolio value of the entire pool can be calculated as
In turn, the LP token price can be calculated in terms of manipulation-resistant variables as
LP share pricing for the CLPs follows the same general principles and is described in full detail in Section 5 of the following technical paper.