Weighted Math

Weighted Math is designed to allow for swaps between any assets whether or not they have any price correlation. Prices are determined by the pool balances, pool weights, and amounts of the tokens that are being swapped.

Weighted Math equation is a generalization of the xโˆ—y=kx*y=k constant product formula recommended for Automated Market Makers (AMMs). Balancer's generalization accounts for cases with nโ‰ฅ2n \geq2 tokens as well as weightings that are not an even 50/50 split.

As the price of each token changes, traders and arbitrageurs rebalance the pool by making swaps. This maintains the desired weighting of the value held by each token whilst collecting trading fees from the traders.


The value function VVis defined as:

V=โˆtBtWtV= \prod_t B_t^{W_t}


  • tt ranges over the tokens in the pool

  • BtB_t is the balance of the token in the pool

  • WtW_tโ€‹is the normalized weight of the tokens, such that the sum of all normalized weights is 1.

Last updated