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

Stable Swap

A Stable Swap is a specialized type of automated market maker (AMM) designed to facilitate efficient trading between assets of similar value, such as different stablecoins, with minimal price slippage.
Chainscore © 2026
definition
DEFINITION

What is a Stable Swap?

A stable swap is a specialized type of automated market maker (AMM) designed to facilitate efficient trading between assets of similar value, such as stablecoins or wrapped versions of the same asset.

A stable swap is a decentralized exchange (DEX) protocol that uses a specialized automated market maker (AMM) formula to minimize price slippage and impermanent loss when trading between pegged assets. Unlike constant product AMMs (like Uniswap V2), which assume highly volatile price pairs, stable swaps are optimized for assets intended to maintain a 1:1 value ratio, such as USDC/DAI or wBTC/renBTC. The core innovation is a bonding curve that remains nearly flat around the peg, providing deep liquidity and stable prices for traders.

The most common mathematical model powering stable swaps is the StableSwap invariant, pioneered by the Curve Finance protocol. This formula is essentially a hybrid that blends the constant product curve (x * y = k) with a constant sum curve (x + y = C). This blend creates an amplified "flat" region in the middle of the curve where liquidity is exceptionally high, allowing for large trades with minimal price impact. Outside this region, the curve behaves more like a traditional AMM to handle extreme imbalances and arbitrage the pool back to equilibrium.

Key advantages of stable swaps include capital efficiency for liquidity providers (LPs) and low-slippage swaps for traders. Because the price remains stable near the peg, LPs can provide liquidity with a much lower risk of impermanent loss compared to volatile pairs. This design makes stable swaps the foundational infrastructure for decentralized stablecoin exchanges, yield aggregators that optimize stablecoin holdings, and cross-chain bridges that use liquidity pools of wrapped assets.

Beyond stablecoins, stable swap mechanics are applied to trading liquid staking tokens (e.g., stETH/ETH) and synthetic assets. Protocols like Curve have expanded into metapools, where a base stablecoin pool (e.g., 3pool) can be paired with a new asset, allowing it to gain instant deep liquidity against multiple stablecoins simultaneously. This design significantly accelerates the bootstrapping of liquidity for new pegged assets in DeFi.

The primary risks associated with stable swaps are peg failure and smart contract risk. If one asset in the pool loses its peg (e.g., a stablecoin depegs), the AMM's flat curve can be exploited by arbitrageurs, potentially leading to significant losses for LPs concentrated in the depegged asset. Furthermore, the complex mathematics and pool configurations require rigorous auditing, as bugs in the invariant or the amplification coefficient (A) parameter can lead to fund loss.

how-it-works
MECHANICS

How Does a Stable Swap Work?

A stable swap is a specialized automated market maker (AMM) designed for trading between assets of similar value, such as stablecoins or wrapped versions of the same asset, with minimal price slippage.

At its core, a stable swap modifies the classic constant product formula (x * y = k) used by AMMs like Uniswap. Instead of a hyperbola, it employs a constant sum invariant (x + y = k) when prices are near parity, creating a much flatter curve. This allows for large trades with negligible slippage when the pool is balanced. However, to prevent the pool from being completely drained of one asset, the mechanism dynamically blends this flat curve with the traditional hyperbolic curve as the pool's composition becomes imbalanced, ensuring liquidity remains available.

The most famous implementation is the Stableswap invariant (or Curve Finance model), which uses a sophisticated mathematical formula to achieve this blending. It introduces an amplification coefficient (A) that controls how "flat" the curve behaves. A high A value makes the curve behave more like a constant sum, ideal for very similar assets like USDC and DAI. A lower A value makes it behave more like a constant product, suitable for correlated but not pegged assets. This parameter is adjustable per pool to optimize for the specific asset pair.

Key to its operation is arbitrage. If the price of an asset in the pool deviates slightly from its market price (e.g., USDC trades at $0.99), arbitrageurs will buy the undervalued asset until its price in the pool realigns with the external market. This mechanism, combined with the flat curve, keeps the quoted price exceptionally stable and efficient for traders. The protocol earns fees from these trades, which are distributed to liquidity providers.

Beyond simple stablecoin pairs, stable swap mechanics power metapools and cross-asset swaps. A metapool allows a new stablecoin (e.g., a new USD stable) to be paired against an entire existing base pool (e.g., a 3pool of USDT, USDC, DAI), dramatically increasing its liquidity depth and efficiency. This design is a fundamental innovation in DeFi composability, enabling efficient swaps between a wide array of pegged assets with deep, shared liquidity.

key-features
MECHANICAL CORE

Key Features of Stable Swaps

Stable swaps are specialized automated market makers (AMMs) designed for efficient trading between assets of similar value, such as stablecoins or wrapped versions of the same asset. Their core innovation lies in their bonding curve and invariant function.

01

Invariant Function

Unlike constant-product AMMs (x * y = k), stable swaps use a hybrid invariant that combines constant-product and constant-sum formulas. This creates a "flat" region in the middle of the bonding curve where price impact is minimal, allowing large trades near the peg with minimal slippage. The most famous implementation is the StableSwap invariant popularized by Curve Finance.

02

Amplification Coefficient (A)

This is a tunable parameter that controls the shape of the bonding curve. A higher amplification coefficient (A) makes the curve flatter in the middle, approximating a constant-sum curve for low-slippage trades. A lower A makes the curve more like a constant-product AMM, providing more liquidity for assets that drift from their peg. Pools can be optimized by adjusting A based on the correlated assets.

03

Low Slippage & Impermanent Loss

The primary benefit is dramatically reduced slippage for trades between pegged assets. This also results in lower impermanent loss (IL) for liquidity providers compared to traditional AMMs, as the assets in the pool are designed to maintain a stable exchange ratio. However, IL is not eliminated and can become significant if one asset depegs substantially.

04

Concentrated Liquidity

Modern stable swap protocols like Curve v2 extend the model beyond pegged assets. They use internal oracles to dynamically adjust the amplification parameter and concentrate liquidity around a moving price range. This allows for efficient trading of correlated assets (e.g., ETH/wBTC) while still benefiting from the low-slippage core mechanism.

05

Governance Tokens & Fee Mechanics

Protocols like Curve use a veToken model (vote-escrowed tokens) for governance. Users lock the native token (CRV) to receive veCRV, which grants voting power on pool fee structures and emission gauges that direct liquidity mining rewards. Fees are typically low (often 0.04% or less) and are distributed to liquidity providers and veToken holders.

06

Example: Curve 3pool

A canonical example is the Curve 3pool, which contains DAI, USDC, and USDT. Its invariant allows a user to swap 1 million USDT for USDC with minimal price deviation. Key metrics (as of historical peaks) include:

  • Total Value Locked (TVL): Often exceeding $10B+
  • Daily Trading Volume: Frequently in the hundreds of millions This demonstrates the model's capital efficiency for stablecoin liquidity.
$10B+
Peak TVL (3pool)
~0.01%
Typical Slippage
examples
STABLE SWAP

Examples & Protocols

Stable swap protocols are specialized decentralized exchanges (DEXs) designed for efficient trading between assets of similar value, such as stablecoins or wrapped versions of the same asset. They use unique bonding curves to minimize price impact and slippage.

04

The Invariant Formula

The core innovation is the StableSwap invariant: A * sum(x_i) + D = A * n^n * D + D^(n+1) / (n^n * prod(x_i)). This equation blends a constant sum (for stability) and constant product (for liquidity) curve. The amplification coefficient (A) controls the curve's shape; a higher A creates a flatter curve near equilibrium, reducing slippage for stable assets.

06

Impermanent Loss & Stable Swaps

Providing liquidity in a stable swap pool carries significantly lower risk of impermanent loss (divergence loss) compared to a standard CPMM like Uniswap V2. This is because the paired assets are designed to maintain a near-constant exchange ratio. The primary risk shifts to smart contract risk and the depeg risk of the underlying stable assets.

DEX MECHANICS COMPARISON

Stable Swap vs. Classic AMM

A technical comparison of Automated Market Maker (AMM) bonding curves designed for different asset classes.

Core Feature / MetricClassic AMM (e.g., Uniswap V2)Stable Swap (e.g., Curve Finance)Hybrid / V3 AMM (e.g., Uniswap V3)

Primary Design Goal

Generalized trading for volatile assets

Efficient trading of pegged assets (stablecoins)

Capital efficiency for all assets

Bonding Curve Formula

Constant Product (x * y = k)

Combined Constant Sum & Product (StableSwap invariant)

Concentrated Liquidity (L = √(x * y))

Price Impact for Stable Assets

High (~0.3% per $50k on ETH/USDC)

Extremely Low (~0.01% per $1M on USDC/USDT)

Configurable (depends on range)

Impermanent Loss Profile

High for correlated assets

Minimal for perfectly pegged assets

Managed via active liquidity ranges

Typical Swap Fee

0.3%

0.04%

0.05%, 0.3%, or 1% (tiered)

Capital Efficiency

Low (liquidity spread across 0→∞ price range)

High for tight pegs (liquidity concentrated at peg)

Very High (liquidity concentrated in custom ranges)

Oracle Use

Time-weighted average price (TWAP)

Internal oracle for rebalancing

Built-in TWAP oracles

Optimal Asset Pair Type

Volatile/Uncorrelated (e.g., ETH/DAI)

Stable/Pegged (e.g., USDC/USDT, stETH/ETH)

Any (volatile or stable)

ecosystem-usage
STABLE SWAP

Ecosystem Usage

Stable swap Automated Market Makers (AMMs) are specialized decentralized exchanges designed for trading assets of similar value with minimal slippage. Their unique bonding curves power core DeFi activities.

01

Liquidity Provision & Yield Farming

Users deposit paired assets (e.g., USDC/DAI) into a liquidity pool to earn trading fees and often additional liquidity provider (LP) tokens. These LP tokens can be staked in yield farming programs to earn protocol governance tokens as rewards, creating a primary incentive mechanism for deep liquidity.

02

Cross-Chain Asset Bridging

Stable swaps are integral to cross-chain bridges. When a user bridges a stablecoin from one chain to another, the bridge often uses a stable swap pool on the destination chain to provide the final asset, ensuring the user receives a pegged asset of equal value with minimal price impact.

03

Algorithmic Stablecoin Peg Maintenance

Protocols like Frax Finance use stable swap pools (e.g., FRAX/USDC) as part of their algorithmic stabilization mechanism. Arbitrageurs trade against the pool to correct deviations from the peg, with the pool's concentrated liquidity providing a strong defense against de-pegging events.

04

Decentralized Forex & Synthetic Assets

Stable swaps enable low-slippage trading of stablecoins pegged to different fiat currencies (e.g., EURS/USDC, KRW/kUSD), creating a decentralized forex market. They also facilitate the minting and trading of synthetic assets that track real-world prices, using stablecoin collateral pools.

05

Underlying Engine for Lending Protocols

Money market protocols like Curve Lending (LLAMMA) use a stable swap curve as their core liquidation engine. Instead of discrete auctions, undercollateralized positions are gradually converted between collateral and debt via the curve, reducing liquidation penalties and improving user experience.

06

DAOs & Protocol-Owned Liquidity

Decentralized Autonomous Organizations (DAOs) often use treasury assets to provide protocol-owned liquidity (POL) in stable swap pools. This generates consistent fee revenue for the treasury, reduces reliance on external liquidity incentives, and creates a more sustainable liquidity backbone for the ecosystem.

security-considerations
STABLE SWAP

Security & Risk Considerations

While stable swaps are designed for low-slippage trading of pegged assets, their security model introduces unique risks distinct from traditional AMMs.

01

Smart Contract Risk

The core risk is vulnerability in the stable swap contract's mathematical implementation or its underlying liquidity pool. A bug could lead to permanent loss of funds. This is amplified by the complexity of the bonding curve and the use of oracles for price feeds in some implementations. Regular audits and formal verification are critical mitigations.

02

Impermanent Loss & Peg Divergence

Impermanent loss occurs when the prices of the pooled assets diverge from their intended peg. If one stablecoin depegs significantly (e.g., USDC to $0.90), LPs effectively subsidize arbitrageurs by selling the depegged asset at a loss. The risk is highest for pools containing algorithmic or less-collateralized stablecoins.

03

Oracle Manipulation

Some stable swap implementations (e.g., for cross-asset pools like stETH/ETH) rely on external price oracles to maintain the pool's internal balance. If an oracle is manipulated to report an incorrect price, attackers can drain the pool through arbitrage. This creates a single point of failure external to the core AMM logic.

04

Centralization & Admin Key Risk

Many stable swap pools have administrative privileges controlled by a multi-sig or DAO. These keys can adjust critical parameters like fees, amplification coefficient (A), or even withdraw funds in emergencies. This introduces governance risk and the potential for a malicious or compromised admin to exploit the pool.

05

Composability & Integration Risk

Stable swaps are foundational DeFi primitives integrated into lending protocols, yield aggregators, and leveraged farming strategies. A failure or exploit in the stable swap can cascade through the ecosystem, causing liquidations and protocol insolvencies elsewhere. This systemic risk is a major consideration for integrators.

06

Concentrated Liquidity Risks

Modern stable swaps (e.g., Uniswap V3) use concentrated liquidity, where LPs define a price range. If the price exits this range, the LP's position becomes inactive and earns no fees, while still being exposed to impermanent loss. This requires active management and introduces new vectors for user error and MEV.

STABLE SWAP

Common Misconceptions

Stable swaps are a core DeFi primitive for efficient stablecoin trading, but their mechanics are often misunderstood. This section clarifies key concepts around impermanent loss, price stability, and protocol risks.

No, a stable swap pool is not immune to impermanent loss, but it is designed to minimize it for assets meant to hold a stable price. Impermanent loss occurs when the price ratio of the pooled assets changes. In a standard Constant Product Market Maker (CPMM) like Uniswap V2, this loss can be significant. Stable swap algorithms, such as the Stableswap invariant used by Curve Finance, create a "flatter" bonding curve within a defined price range (e.g., $0.99 to $1.01 for stablecoins). This dramatically reduces slippage and IL when prices are pegged, but if a stablecoin depegs significantly (e.g., UST to $0.10), liquidity providers can experience substantial impermanent loss, sometimes greater than in a CPMM for the same price movement.

STABLE SWAP

Technical Deep Dive

A deep dive into the mathematical models and mechanisms that enable efficient, low-slippage trading between stable assets on decentralized exchanges.

A Stable Swap is a specialized type of Automated Market Maker (AMM) designed to facilitate low-slippage trades between assets of similar value, such as stablecoins or wrapped versions of the same asset. It works by using a hybrid bonding curve that combines a constant sum formula (ideal for stable assets) with a constant product formula (used by AMMs like Uniswap). This creates a "flatter" curve within a defined price range (e.g., $0.99 to $1.01), drastically reducing slippage for trades that stay within that peg. Outside this range, the curve smoothly transitions to the constant product curve to preserve liquidity and prevent complete depletion of a single asset.

Key components include:

  • Amplification Coefficient (A): A tunable parameter that controls the "flatness" of the curve. A higher A makes the curve more like a constant sum, optimizing for stable pairs.
  • Invariant: A complex mathematical equation (e.g., Stableswap invariant) that the pool must satisfy after every trade, ensuring the value of the liquidity pool is maintained.
STABLE SWAP

Frequently Asked Questions

Common questions about the automated market makers (AMMs) designed for stablecoin and pegged asset trading.

A Stable Swap is a specialized type of Automated Market Maker (AMM) designed to facilitate efficient trading between assets of similar value, such as stablecoins like USDC and DAI. It works by using a modified Constant Product Market Maker (CPMM) formula, often incorporating a Stable Invariant like the Stableswap Invariant (from Curve Finance), which creates a "flatter" bonding curve. This design drastically reduces price slippage and impermanent loss for traders swapping between pegged assets, maintaining a near-constant exchange rate of 1:1 within a defined price range. Liquidity providers deposit equal values of the paired assets into a shared pool, earning fees from the trades executed against it.

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
Stable Swap: Definition & How It Works in DeFi | ChainScore Glossary