Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Constant Mean Market Maker (CMMM)

A Constant Mean Market Maker (CMMM) is a type of Automated Market Maker (AMM) whose pricing formula maintains a constant weighted geometric mean of its reserve assets, enabling multi-token pools with customizable weights.
Chainscore © 2026
definition
DEFINITION

What is Constant Mean Market Maker (CMMM)?

A Constant Mean Market Maker (CMMM) is a type of automated market maker (AMM) where the weighted geometric mean of its reserve assets remains constant, allowing for pools with more than two assets and customizable, non-equal weightings.

The Constant Mean Market Maker (CMMM) is defined by the invariant formula ∏ (R_i)^(w_i) = k, where R_i is the reserve of asset i and w_i is its constant, pre-defined weight. Unlike the simpler Constant Product Market Maker (CPMM) used by Uniswap V2, which holds the product of two reserves constant (x * y = k), the CMMM generalizes this concept. This allows liquidity pools to contain multiple assets—such as three, four, or more tokens—and for each asset to have a different, fixed proportion of the pool's total value, which does not have to be 50/50. The most famous implementation of this model is Balancer, which popularized the concept of customizable, multi-token pools.

The core innovation of the CMMM is its customizable pool weights. A pool creator can assign weights like 80% ETH, 15% DAI, and 5% LINK, dictating the target value distribution. The AMM's pricing algorithm and arbitrage incentives are designed to maintain this target ratio. This flexibility enables a wide range of use cases: - Index Funds: A pool can act as a passive, automated portfolio tracking a specific asset allocation. - Customized Liquidity Pools: Protocols can create pools optimized for specific trading pairs or to reduce impermanent loss for certain assets. - Bootstrapping New Tokens: Projects can create pools with a high weighting for their new token alongside established stablecoins.

From a technical perspective, the CMMM's pricing and slippage dynamics are more complex than a two-asset CPMM. The swap price between any two assets in the pool is derived from their respective reserves and weights, ensuring that after any trade, the invariant k is preserved. This model introduces unique properties: impermanent loss is not symmetrical and depends heavily on the chosen weights and the relative price movements of all assets in the pool. Furthermore, liquidity providers (LPs) earn fees from all trading pairs within the multi-token pool, not just a single pair, potentially diversifying their fee income.

The primary trade-off for a CMMM's flexibility is increased gas cost and computational complexity for swaps, as calculating the optimal trade outcome requires solving a more involved equation. Additionally, while the constant mean invariant allows for multiple assets, it can be more susceptible to price manipulation in low-liquidity pools compared to a constant product curve, as the price impact function differs. To mitigate this, protocols like Balancer often implement safeguards such as minimum liquidity requirements or use oracles for more stable pricing in certain pool types.

In the broader DeFi ecosystem, the CMMM represents a significant evolution beyond simple token pair AMMs. It enables sophisticated DeFi primitives like self-balancing portfolios, capital-efficient liquidity provision, and complex token distribution mechanisms. Its generalization of the AMM formula has paved the way for even more advanced curves, such as StableSwap (Curve) and Concentrated Liquidity (Uniswap V3), which can be seen as specialized optimizations of the core constant mean concept for specific use cases like stablecoin trading or capital efficiency.

how-it-works
DEFINITION & MECHANICS

How a Constant Mean Market Maker Works

A Constant Mean Market Maker (CMMM) is a type of automated market maker (AMM) that maintains a constant weighted geometric mean of its reserve assets, enabling flexible, multi-asset liquidity pools beyond the standard two-token model.

A Constant Mean Market Maker (CMMM) is a decentralized exchange (DEX) pricing mechanism defined by the invariant (k = \prod_{i=1}^{n} R_i^{w_i}), where (R_i) is the reserve of token (i) and (w_i) is its fixed, pre-defined weight summing to 1. Unlike a Constant Product Market Maker (CPMM) like Uniswap V2, which uses the product (x * y = k), a CMMM generalizes this concept to (n) assets with customizable weights, allowing pools to hold three or more tokens (e.g., 33% ETH, 33% BTC, 33% LINK). This design enables portfolio-like liquidity pools and is the foundation for Balancer-style AMMs.

The core mechanic revolves around the invariant (k), which must remain constant before and after any trade. When a user swaps one asset for another, the smart contract calculates the required change in reserves to keep (k) unchanged, determining the execution price. The weighted geometric mean ensures that assets with higher weights (e.g., 50% vs. 10%) experience less price impact for a given trade size in that token. This allows pool creators to design custom automated portfolio strategies, where the pool automatically rebalances by arbitrageurs who profit from deviations, effectively acting as a self-balancing index fund.

A primary application is the Balancer pool, where liquidity providers (LPs) deposit assets according to the preset weights and earn fees from trades. The flexible weights introduce unique risks and rewards: an LP's portfolio exposure is dictated by the weights, not by deposit ratios, and impermanent loss dynamics are more complex, calculated relative to the weighted basket's value. CMMMs are particularly suited for index pools, protocol-owned liquidity, and bootstrapping new tokens with multi-asset support, providing greater capital efficiency and tailored market structures compared to fixed 50/50 pools.

key-features
MECHANICS

Key Features of CMMMs

Constant Mean Market Makers (CMMMs) are a generalization of the Constant Product Market Maker (CPMM) model, using a weighted geometric mean to maintain a constant product of token reserves, each raised to a specific weight.

01

Generalized Bonding Curve

A CMMM defines its pricing curve using the formula: ∏ x_i^w_i = k, where x_i is the reserve of token i, w_i is its constant weight, and k is the invariant. This generalizes the CPMM (where all weights are 0.5) to allow for customizable, non-50/50 liquidity pools. The weights determine the pool's target composition and price sensitivity.

02

Customizable Token Weights

The core innovation is the ability to set unequal, static weights (e.g., 80/20, 95/5) for assets in a pool. This allows:

  • Stablecoin Pools: Heavier weighting for the stable asset (e.g., 90% USDC, 10% VOL) to reduce impermanent loss for stablecoin providers.
  • Index/ETF Pools: Creating baskets where weights represent target allocations, not equal value.
  • Bootstrapping New Tokens: Allowing a new project token to have a lower weight, controlling its price impact.
03

Impermanent Loss Profile

Impermanent Loss (Divergence Loss) in a CMMM is a function of its weights. Pools with more imbalanced weights exhibit asymmetric loss profiles. For example, in an 80/20 pool, the token with the higher weight (80%) experiences less price impact per trade, leading to lower IL for providers of that dominant asset but potentially higher IL for the minority asset provider compared to a 50/50 pool.

04

Price Impact & Slippage

The price impact of a trade is determined by the weight of the token being sold. Selling a token with a lower weight causes a larger price move and higher slippage, as its reserve changes more relative to its target proportion. This makes CMMMs suitable for assets with different liquidity expectations, protecting the price stability of the higher-weight asset.

06

Comparison to CPMM & CSMM

CMMMs sit between two simpler models:

  • vs. CPMM (Uniswap): CPMM is a CMMM where all weights equal 0.5. CMMMs offer flexible capital efficiency and tailored risk.
  • vs. CSMM (Stableswap): Constant Sum Market Makers aim for zero slippage but can be drained. CMMMs with highly imbalanced weights (e.g., 99/1) can approximate low-slippage behavior for stable pairs without the risk of complete reserve depletion.
examples
CONSTANT MEAN MARKET MAKER (CMMM)

Protocol Examples & Use Cases

Constant Mean Market Makers (CMMMs) are a class of AMMs that maintain a constant product of token reserves, weighted by a fixed exponent. Unlike the simpler Constant Product Market Maker (CPMM), CMMMs allow for multi-asset pools and customizable weights, enabling more complex and capital-efficient liquidity strategies.

01

Core Mechanism: The Weighted Geometric Mean

A CMMM enforces the invariant (\prod_{i} R_i^{w_i} = k), where (R_i) is the reserve of token (i) and (w_i) is its constant weight. This generalizes the Constant Product Market Maker (CPMM) formula (x * y = k) to (n) assets with unequal weights. The weight dictates the pool's target composition and price sensitivity, allowing liquidity providers to express a view on asset ratios.

03

Use Case: Custom Index Funds & Portfolio Management

CMMMs automate portfolio management. A user can create a pool with weights representing a desired asset allocation (e.g., 50% ETH, 30% WBTC, 20% LINK). The pool automatically rebalances through arbitrage: when one asset outperforms, arbitrageurs buy the cheaper assets to restore the weighted ratio, generating fees for the LP. This creates passive, fee-earning index funds.

04

Use Case: Liquidity Bootstrapping Pools (LBPs)

LBPs use dynamic weights that change over time, typically starting with a high weight for the new token and decreasing it. This design mitigates front-running and whale dominance during launches by creating a gradual price discovery mechanism. Early buyers face a rising price if demand is low, protecting against initial dumps and creating a more equitable distribution.

05

Impermanent Loss & Weight Dynamics

Impermanent Loss (IL) in a CMMM is a function of price changes and the chosen weights. Pools with balanced weights (e.g., 50/50) experience IL similar to a CPMM. However, asymmetric weights (e.g., 98/2) can significantly reduce IL for the dominant asset, as the pool is less sensitive to its price movements. This allows LPs to tailor their risk exposure.

06

Comparison to Other AMM Invariants

  • vs. CPMM (Uniswap V2): CMMM is a multi-asset generalization; CPMM is a two-asset, equal-weight (50/50) special case.
  • vs. StableSwap/Curve: Curve's invariant prioritizes low slippage for pegged assets; CMMM is for general, potentially volatile assets.
  • vs. Constant Sum Market Maker: CSMM has zero slippage but requires perfect peg; CMMM allows price divergence while maintaining a defined relationship. The key advantage is customizable capital allocation within a single pool.
AMM MODEL COMPARISON

CMMM vs. CPMM (Uniswap V2 Model)

Key technical and economic differences between Constant Mean and Constant Product Market Makers.

FeatureConstant Mean Market Maker (CMMM)Constant Product Market Maker (CPMM)

Invariant Formula

x^w_x * y^w_y * z^w_z = k

x * y = k

Primary Use Case

Multi-asset pools, stablecoin trios, weighted portfolios

Volatile asset pairs (e.g., ETH/DAI)

Number of Assets

Typically 3 or more

Exactly 2

Price Impact

Lower for balanced trades, higher for imbalanced

Predictable, increases with trade size

Impermanent Loss Profile

Complex, depends on weightings and correlations

Well-defined, highest for volatile pairs

Fee Structure

Often dynamic or tiered based on weights

Fixed fee (e.g., 0.3%) applied to input

Capital Efficiency

Higher for correlated assets in same pool

Lower, requires separate pools for each pair

Example Implementation

Balancer (weighted pools)

Uniswap V2, SushiSwap

visual-explainer
MATHEMATICAL FOUNDATION

Visualizing the Constant Mean Market Maker (CMMM) Invariant

The Constant Mean Market Maker (CMMM) is an Automated Market Maker (AMM) model defined by a geometric mean formula that generalizes the popular Constant Product Market Maker (CPMM) to support pools with three or more assets.

The core invariant of a CMMM is expressed as the geometric mean of the reserves of n tokens in a liquidity pool, raised to a set of weights that sum to 1: ∏ (R_i)^(w_i) = k. Here, R_i represents the reserve amount of token i, w_i is its predefined, constant weight (e.g., 0.5 for a 2-asset pool, 0.33 for a 3-asset pool), and k is the invariant constant. This formula must hold true before and after any trade, ensuring the pool's value is rebalanced according to its target weights. Unlike the CPMM's simple x * y = k, the CMMM's multi-dimensional invariant allows for more complex, balanced portfolios within a single pool.

Visualizing this invariant reveals a key property: the pool's composition always strives to maintain its target weight ratios. For a 3-asset pool with equal weights (33.3% each), the invariant defines a smooth, curved surface in three-dimensional space. Any trade that changes the reserves moves the pool's state along this surface, keeping k constant. If one asset's price rises significantly, its reserve in the pool decreases (as arbitrageurs buy it), automatically increasing its relative weight and pushing the pool back toward its target allocation. This rebalancing mechanism is intrinsic to the CMMM's design, making it suitable for index funds or balancer pools that track a specific asset composition.

The CMMM model, most famously implemented by Balancer, introduces critical advantages and trade-offs. Its generalized formula allows for customizable pool weights, enabling pools that are not 50/50, such as an 80/20 pool for a protocol's governance token and a stablecoin. This flexibility supports more capital-efficient liquidity for correlated assets. However, the increased complexity of the invariant leads to more expensive on-chain computation for pricing and swap calculations compared to a CPMM. Furthermore, impermanent loss dynamics are more nuanced, as they depend on the divergence of multiple asset prices from the pool's weighted basket, rather than just a single price ratio.

benefits-tradeoffs
CONSTANT MEAN MARKET MAKER

Benefits and Trade-offs

CMMMs offer unique capabilities for multi-asset pools but introduce distinct complexities compared to simpler AMM models like Constant Product (CPMM).

01

Multi-Asset Efficiency

A CMMM can maintain a portfolio of N assets in a single pool, enabling efficient swaps between any pair without requiring a direct liquidity pool. This reduces fragmentation and capital requirements for supporting numerous trading pairs. For example, a 3-asset pool of ETH, BTC, and USDC allows direct swaps from ETH to BTC.

02

Customizable Weighting

Unlike fixed 50/50 pools, CMMMs allow custom weightings (e.g., 33/33/33 or 50/25/25) for each asset in the pool. This lets LPs tailor exposure to match specific portfolio strategies or risk appetites. The invariant ensures the weighted geometric mean of the reserves remains constant: ∏ R_i^w_i = k.

03

Impermanent Loss Complexity

Impermanent loss (divergence loss) in a CMMM is more complex and severe than in a 2-asset CPMM. Losses are amplified when multiple correlated assets diverge from their initial price ratios. The loss profile depends on the number of assets and their individual weightings, requiring sophisticated risk management for LPs.

04

Price Impact & Slippage

Slippage in a CMMM is a function of the pool's depth for all assets, not just the trading pair. A large trade can impact the price of all assets in the pool, as reserves are rebalanced to maintain the constant mean. This can lead to unexpected price movements for other assets held in the pool.

06

Oracle Robustness

A well-balanced CMMM pool with significant liquidity can serve as a robust on-chain price oracle. The pool's internal prices, derived from the constant mean invariant and reserve ratios, are resistant to manipulation from a single large trade, as manipulation would require moving the price of multiple assets simultaneously.

CONSTANT MEAN MARKET MAKER

Technical Details

A Constant Mean Market Maker (CMMM) is an automated market maker (AMM) model that generalizes the Constant Product formula by allowing for weighted pools where assets are not required to have equal value ratios.

A Constant Mean Market Maker (CMMM) is a type of Automated Market Maker (AMM) where the weighted geometric mean of the reserves in a liquidity pool remains constant. Unlike a Constant Product Market Maker (CPMM) like Uniswap V2, which uses the formula x * y = k, a CMMM uses the generalized formula ∏ (x_i)^{w_i} = k, where x_i is the reserve of asset i and w_i is its fixed, pre-defined weight summing to 1. This allows liquidity pools to maintain custom, non-50/50 asset ratios, such as 80/20 or 33/33/33, enabling more capital-efficient pools for stablecoin pairs or index-like baskets.

Popularized by Balancer (V1), the CMMM model lets Liquidity Providers (LPs) create pools with up to 8 assets and custom weights, where trades are executed to keep the weighted geometric mean constant. This design provides greater flexibility for portfolio management and can reduce impermanent loss for correlated assets when weights are set appropriately.

CONSTANT MEAN MARKET MAKER

Frequently Asked Questions (FAQ)

Answers to common technical questions about Constant Mean Market Makers (CMMM), a foundational Automated Market Maker (AMM) model for multi-asset pools.

A Constant Mean Market Maker (CMMM) is an Automated Market Maker (AMM) model where the weighted geometric mean of the reserves in a liquidity pool is held constant, defined by the formula ∏ (R_i)^{w_i} = k. Unlike a Constant Product Market Maker (CPMM) like Uniswap V2, which uses equal weights, a CMMM allows for customizable token weights (w_i) that sum to 1. This means each asset in the pool can have a different influence on the pricing curve. The model works by adjusting the price impact of trades based on these weights; an asset with a higher weight experiences less slippage when traded, allowing for more flexible and capital-efficient pools for stablecoin pairs or basket tokens.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Constant Mean Market Maker (CMMM) - Definition & Examples | ChainScore Glossary