Methodology and implementation of Balancer Pool LP token (BPT) pricing
The LP share pricing on this page describes constant product pools (ordinary Balancer pools). Coming documentation will describe how to similarly price a wide variety of other LP 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. We use a more robust procedure for calculating Balancer LP token values.
For a given 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 # BPT tokens
The constant product of the Balancer pool is
k=i=1∏nriwi
Note that the amounts
ri
are easily manipulatable, but the product
k
is not. And, as we require asset pricing oracles elsewhere, we can presume that the prices
pi
are also not easily manipulatable (controls to assure against this will be discussed elsewhere).
To make the manipulation-resistant BPT oracles, it will be enough to express the pricing of BPT tokens in terms of solely manipulation-resistant variables
wi,pi,k,S
.
The portfolio value of the Balancer pool can be calculated as