Liquidity pool types

Learn about different types of liquidity pools on STON.fi. Understand liquidity pools versions and how they affect liquidity providers.

In a few minutes, you’ll understand how STON.fi pools work, how v1 (constant product) differs from v2 (advanced pool family), and how to choose the right pool for a given token pair. We start with quick comparison tables, then give short, parallel sections for each pool type, and wrap with a compact math appendix so builders can verify the mechanics.

Quick explanation: pools v1 vs v2

  • Pools v1 (constant product). Classic AMM pools using the x·y = k invariant. They’re simple, reliable, and great for volatile pairs with equal exposure. V1 does not support single-sided liquidity adds and uses simpler fee/referral handling.

  • Pools v2 (advanced). A family of pool types — constant product, stableswap, weighted constant product, and weighted stableswap, plus upgrades like single-sided LP, Vault-based accounting, better position/LP management, gas optimizations, current SDK. Recommended for new pools/integrations.

Pools v1 vs v2 at a glance

Parameter

V1

V2 (current)

Pool types

Constant product

Constant product, stableswap, weighted constant product, weighted stableswap

Pricing curves

x·y = k only

Choice of invariant per pair; low-slippage options for correlated assets

Single-sided liquidity

Not supported

Supported (deposit one asset; contracts rebalance)

Fees and referrals

Inline in swap path

Accrue to Vaults with configurable withdrawal

LP/position management

More manual flows

More automated updates and typed getters

Gas and reliability

Standard

Optimized gas paths; sturdier failure handling

SDK and integration

Legacy, generic calls

SDK v2 with typed pools/routers and unit helpers

Recommended use

Legacy/compatibility

Default for all new pools and integrations

Pool types available in v2

Type

What it’s for

How it behaves

Key trade-offs

Constant product

Volatile/volatile pairs with equal exposure

x·y=k; price impact grows with trade size vs depth

Simple, always-on; higher IL for diverging prices

Stableswap

Correlated assets (e.g., stablecoins, wrapped variants)

Low slippage near 1:1; curve steepens if ratio drifts

Efficient large swaps near peg; watch peg risk

Weighted constant product (WCPI)

Uneven exposure (e.g., 80/20), portfolio-style pools

Constant-product with custom weights

Flexible exposure; risk depends on chosen weights

Weighted stableswap

Stable-like assets with non-equal weights

Stableswap curve + weights + amplification factor A

Low slippage and flexible allocation; more tuning (weights, A)

Pool types explained

Constant product pool

What it is

A classic AMM pool that keeps the product of two token reserves constant: x·y = k. Prices adjust automatically based on the relative amounts of the two assets in the pool. It removes order books and enables continuous, on-chain swaps.

How it works

The pool holds reserves X (Token A) and Y (Token B). When a user swaps A for B, he adds A and removes B so the product X·Y remains constant. Larger trades move the pool further from balance, so price impact grows with trade size relative to liquidity.

Advantages

Continuous liquidity without matching counterparties. Fully on-chain and non-custodial. Simple, well-understood mechanics that are easy to reason about and integrate.

Risks

Impermanent loss when token prices diverge; the effect grows with volatility and trade size. The mechanism is predictable but can produce meaningful slippage for big orders in shallow pools.

Best for (use scenarios)

Volatile–volatile pairs where equal exposure is acceptable, routing steps between non-correlated assets, and integrations that value simplicity and robustness.

Weighted constant product pool

What it is

A constant-product pool with configurable asset weights (e.g., 80/20 instead of 50/50). Weights encode a target portfolio split, allowing uneven exposure while keeping AMM properties.

How it works

Each asset has a fixed weight (w₁, w₂ with w₁ + w₂ = 1). The invariant generalizes to x^{w₁}·y^{w₂} = k. Marginal price responds to trades based on weights: the heavier-weighted asset’s price moves less for the same order size; the lighter-weighted asset moves more.

Advantages

Customizable exposure that aligns with treasury or tokenomics goals. Potentially lower price impact than 50/50 for the heavily weighted side under typical flows. Useful for portfolio-style pools and asymmetric markets.

Risks

Outcome depends on chosen weights. Overweighting a volatile asset can increase variance and impermanent loss. Price impact still rises with order size relative to depth; poor weight choices reduce efficiency.

Best for (use scenarios)

Volatile–volatile or stable–volatile pairs where you want a non-50/50 mix (e.g., 80/20), programmatic treasury management, and strategies that need directional exposure inside the pool.

Stableswap pool

What it is

A pool designed for assets that should trade near 1:1 (stablecoins, wrapped variants). Its curve is very flat around the peg, enabling large swaps with minimal price impact when assets are near equal value.

How it works

The invariant blends constant-sum behavior near 1:1 with constant-product behavior farther away. Around the peg, the curve is flat and efficient; as the pool drifts off-peg, the curve steepens to discourage imbalance and protect liquidity.

Advantages

Much lower slippage for like-valued assets, especially on large trades. Better preservation of intended 1:1 value and more efficient rebalancing across stable assets.

Risks

Primary risk is peg instability of the underlying assets. If one asset breaks peg or liquidity fragments elsewhere, slippage rises and impermanent loss can appear, though typically less than volatile pairs when pegs hold.

Best for (use scenarios)

Stable ↔ stable swaps (USDt/USDC, wrapped variants), cross-venue rebalancing, and routing legs that traverse pegged assets where price impact must stay minimal.

Weighted stableswap pool

What it is

A hybrid that combines stableswap mechanics with configurable weights. It targets near-1:1 efficiency while allowing non-equal inventory splits across stable-like assets.

How it works

The pool applies stableswap’s flattened region around equilibrium and adds weights plus an amplification factor A. Weights set the target proportions; A controls how flat the curve stays near the weighted equilibrium and how quickly it steepens off-target.

Advantages

Low slippage for similar-value assets with the flexibility to hold them in non-equal proportions. Lets LPs match inventory or policy constraints without sacrificing near-peg efficiency.

Risks

More parameters to tune. Mis-setting A or weights can reduce efficiency or make the pool slow to correct imbalances. Settings should be reviewed as liquidity, flow patterns, or volatility change.

Best for (use scenarios)

Stable ↔ stable pairs where inventories aren’t meant to be 50/50, baskets of stable-like assets with operational targets, and strategies that need both low slippage and asymmetric holdings.

Math appendix

Constant product (CP)

Invariant. x·y = k, where x and y are reserves.

Spot price. p ≈ y/x (ignoring fees). Output estimate. For input Δx, output Δy ≈ y·Δx/(x+Δx). Example. X=1,000, Y=1,000. Swap Δx=10 → Δy≈9.90 before fees.

Figure 1: Uniswap pool work principle. Source: Cryptotesters

Weighted constant product (WCP)

Invariant (two-asset). x^{w₁}·y^{w₂} = k with w₁ + w₂ = 1.

Spot price. p ≈ (w₁/w₂)·(y/x). Heavier weight on x makes price less sensitive to Δx. Interpretation. Weights encode desired exposure and shape price response under the same order size.

Figure 2: Comparison of weighted pools vs traditional AMM pool. Source: Chaisomsri on Medium

Stableswap (SS)

Idea. Blend between constant-sum near 1:1 and constant-product away from it. Amplification (A). Higher A flattens the curve near the peg (lower slippage for small imbalances) and steepens off-peg to restore balance. Effect. Efficient large swaps when assets stay close to 1:1; slippage grows if the ratio drifts far.

Figure 3: Comparison of a stableswap pool with a constant product pool (Uniswap). Source: The AMM Book

Weighted stableswap (WSS)

Idea. Stableswap logic with non-equal weights and amplification A. Behavior. Low slippage near the weighted equilibrium; weights set the target mix, A controls flatness. Tuning. Start with weights that match intended inventory; size A to expected variance and revisit after market or flow changes.

Understanding how each pool type works means you can evaluate routes, provision liquidity, and design policies independently, without waiting for someone else’s take. The result is better decisions, fewer surprises, and pools that behave the way you intend.

Last updated