Weighted Pool
Some elements to consider when interfacing with Weighted Pools:
- Pool weights are static, defined at pool creation
- Pools have between 2 and 8 tokens
- Pool weights range from 1% to 99%
In addition to the common pool data, you will likely want the following data when interfacing with Weighted Pools:
Weights are stored at the pool level. For example, calling
pool.getNormalizedWeights()
returns something resembling
[800000000000000000, 200000000000000000]
which are the weights represented with 18 decimals. A pool with 80%/20% weights corresponds to [0.8, 0.2] after scaling for decimals.
To query oracle data from a pool of type
WeightedPool2Tokens
, refer to the Oracle Pools interfacing page. Last modified 10mo ago