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.

Example: Constant Product Pools

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:

wi=weight of asset iri=amount (in # tokens) of asset ipi=price of asset iS=total # LP tokensw_i = \text{weight of asset } i \\ r_i = \text{amount (in \# tokens) of asset } i \\ p_i = \text{price of asset } i \\ S = \text{total \# LP tokens}

The constant product invariant of the pool is

L=i=1nriwiL = \prod_{i=1}^{n} r_i^{w_i}

Note that the amounts rir_iare easily manipulatable through swaps, but the product LLis not. And, as we require asset pricing oracles elsewhere, we can presume that the prices pip_i 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 wi,pi,L/Sw_i, p_i, L / S. Note that while LL and SS are individually manipulatable by adding or removing liquidity, L/SL/S 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

Pool value=Li=1n(piwi)wi\text{Pool value} = L \prod_{i=1}^n \left( \frac{p_i}{w_i} \right)^{w_i}

In turn, the LP token price can be calculated in terms of manipulation-resistant variables as

pLP token=Pool valueS=LSi=1n(piwi)wip_{\text{LP token}} = \frac{\text{Pool value}}{S} = \frac{L}{S} \prod_{i=1}^n \left( \frac{p_i}{w_i} \right)^{w_i}

Pricing LP tokens for 2-CLPs, 3-CLPs, and E-CLPs

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.

Last updated