🔬
InterSwap Docs
  • Welcome
  • Protocol Level
    • Liquidity Pools
      • Weighted Pools
      • Stable Pools
      • Dynamic Weights
      • Gas Tokens Index(GTI)
    • Add/Remove Liquidity
      • New Pool Creation
      • Add Liquidity
      • Remove Liquidity
    • Swap
  • Integration Level
    • You Integrate us
    • We Integrate you
    • Cross-Chain Smart Routing
  • Supported networks
  • How To
    • Setting Up a Wallet
      • Creating a New Wallet
      • Adding Networks to Metamask
      • Connecting Your Wallet
    • Swap
    • Add Liquidity
    • Remove Liquidity
  • Security
    • Audits
    • Bug Bounty
    • Deployed Contracts
  • TOKENOMICS & GOVERNANCE
    • Allocation & Lockups
    • Token Value Accrual
    • Fees
    • Governance Model
    • Proposals & Voting
  • Information
    • FAQ
Powered by GitBook
On this page
  1. Protocol Level
  2. Liquidity Pools

Weighted Pools

PreviousLiquidity PoolsNextStable Pools

Last updated 2 years ago

“Balancer's Weighted Math equation is a generalization of the x ∗ y = k constant product formula recommended for Automated Market Makers (AMMs) - Vitalik Buterin.

Balancer's generalization accounts for cases with n≥2 tokens as well as weightings that are not an even 50/50 split. “ ©

Weighted Math

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

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 traders.

The value function VVVis defined as:

V=∏tBtWtV= \prod_t B_t^{W_t}V=t∏​BtWt​​

Where

  • ttt ranges over the tokens in the pool.

  • BtB_t Bt​ is the balance of the token in the pool.

  • WtW_tWt​​is the normalized weight of the tokens, such that the sum of all normalized weights is 1.

Formulas above is taken from docs.

Balancer’s docs
balancer.fi