Curveswap

Curveswap metapools connect additional assets to basepool liquidity

· last updated

Curveswap distinguishes basepools from metapools through their liquidity relationship: a basepool supplies a liquidity provider (LP) token that represents its reserves, while a metapool holds that token alongside one or more additional assets. Supported underlying swap methods connect those additional assets to the basepool’s constituent tokens. The basepool and metapool retain separate balances and issue distinct LP tokens.

This structure explains why a pool can display a short list of direct coins while providing access to more underlying assets. It also changes what an LP balance represents and which pool supplies a withdrawal.

The LP token separates the two pool roles

Basepools and metapools occupy different levels of a liquidity relationship, with the basepool’s LP token connecting their reserves. The basepool holds its constituent assets. Its LP token represents a share of that basket and can become an asset held by a metapool. A metapool adds another market around that share. Its reserves contain the accepted basepool LP token and assets outside the basepool. Trading changes the metapool’s holdings without adding those outside assets to the basepool itself. Several metapools can hold shares in the same basepool, each with its own additional assets.


3pool Shows the difference between direct and underlying assets

3pool contains DAI, USDC and USDT, making its LP token a claim on that reserve basket. Strategic USD Reserves provides another documented basepool composition, containing USDT and USDC. Their constituent lists differ, but their role is the same: an accepted LP token represents the reserves that a metapool connects to.

A StableSwap-NG metapool backed by 3pool has two direct coins: its additional asset and the 3pool LP token. Its underlying swap interface addresses the additional asset plus the three basepool assets. The structural parameters distinguish those lists.

Contract parameter Value with 3pool What the value identifies
N_COINS() 2 Direct metapool coins only
coins(0) The additional paired asset The asset outside 3pool’s reserves
coins(1) The 3pool LP token A share of the underlying reserve basket
BASE_N_COINS() 3 The number of basepool assets
BASE_COINS(i) DAI, USDC or USDT at the corresponding index A constituent token rather than the basepool LP token

The two-coin count describes this StableSwap-NG metapool implementation. It does not count every asset behind the basepool share.


Can a plain pool also serve as a basepool?

A plain StableSwap pool can also serve as a basepool when its LP token is accepted for that role in the relevant metapool system. Plain describes its direct asset structure. Basepool describes how another pool can use its LP token. Those descriptions can apply to the same pool.

StableSwap identifies a pricing mechanism for assets expected to trade near an established ratio. A metapool can use that mechanism while holding a basepool share as one of its assets. CryptoSwap addresses changing relative asset prices, which is a separate classification from this basepool relationship. An algorithm name alone therefore does not establish whether a pool is a metapool.


Each LP token represents a different pool share

A basepool LP token and a metapool LP token represent shares in different reserve baskets, even when the metapool holds the basepool token.

A metapool LP token represents a share of the metapool’s own reserves. Those reserves include its additional assets and the basepool LP tokens that it owns. The latter provide indirect exposure to the basepool’s constituent assets.

Holding a basepool LP token gives exposure to the basepool’s basket, without ownership of additional assets in connected metapools.

Neither share promises the original deposit’s asset mix. Trades change reserve quantities, so a proportional withdrawal follows the pool’s current composition.


Swap methods distinguish LP tokens from underlying coins

StableSwap-NG metapools expose different swap methods for their direct coins and the underlying basepool assets, with distinct token indices for each interface.

Direct coin exchanges

The regular exchange method trades the additional asset against the basepool LP token. Index 1 refers to that LP token in this direct interface. A request using this method therefore concerns a pool share, even if a wallet also displays the constituent stablecoins.

Underlying coin exchanges

The exchange_underlying method uses the additional asset followed by the basepool constituents. Its index 1 refers to the first basepool asset, rather than the LP token. Quotes and execution must use the same asset list.

Trades involving the additional asset

When a basepool coin enters a trade for the additional asset, the implementation deposits that coin into the basepool and uses the resulting LP tokens. In the opposite direction, it exchanges the additional asset for basepool LP tokens and withdraws the selected basepool coin.

Trades between basepool constituents

When both selected assets belong to the basepool, the underlying method passes the exchange to the basepool. That branch does not swap through the additional asset. These paths belong to the underlying exchange function; their internal operations do not imply separate wallet transactions.

Basepool virtual price affects metapool pricing

StableSwap-NG uses the basepool’s virtual price to value its LP token within the metapool calculation. Raw balances use different denominations: LP balances count shares, while underlying balances count units of a constituent token. As fees accrue, the value represented by an LP balance can rise without increasing the holder’s token count. The accounting rate does not promise a particular market output. An executable quote also reflects the chosen token, reserve balances and trade size, expressing the available output in units of that token.


Withdrawal outputs follow the chosen pool layer

A direct proportional withdrawal from a StableSwap-NG metapool returns its additional asset and basepool LP tokens according to the metapool’s current reserve proportions. That operation burns metapool LP tokens.

Redeeming the basepool LP portion for its constituent assets is a basepool operation. An underlying-asset withdrawal offered by a frontend can therefore follow a different path from the direct metapool method. A supported router can combine pool operations in one transaction when its route includes those operations.

The direct proportional method checks a minimum amount for each output. A one-coin withdrawal uses a different calculation and minimum-output check. Either method reverts if its applicable output minimums are not met. Choosing one coin can change the amount received relative to taking the current reserve proportions.


Fees follow the operations within each liquidity layer

A metapool trade’s cost follows the operations that its selected route performs, including any basepool liquidity conversion required by an underlying exchange. A direct exchange of the additional asset for an LP token uses a different path from an exchange ending in a constituent token.

When the off-peg multiplier enables dynamic fees, the fee can rise as normalized balances become more imbalanced. Consequently, a quoted output depends on pool state as well as input size. The metapool label supplies no fixed total fee. Network gas is a separate cost, and any comparison between routes needs both the final token output and the gas required for that route.


Shared basepool reserves carry through the metapool

A metapool carries exposure to the assets behind its basepool LP token alongside exposure to its additional assets. If a basepool asset permanently loses its peg, the affected reserves can reduce the value of that pool share. The metapool’s additional assets can also lose value independently.

StableSwap concentrates liquidity around an expected asset price relationship. A persistent depeg can leave a pool holding a larger share of the impaired token. Acceptance as a basepool does not certify an additional token later paired with its LP token.

Graphic: Curveswap: Shared basepool reserves carry through the metapool

View image file

Permissionless deployment also allows pools containing unvetted assets. Smart contract vulnerabilities and any lending protocol behind a receipt token add their own dependencies. Holding several metapools that use the same basepool leaves exposure concentrated in those shared reserves.

Curveswap FAQs

When can a newly deployed StableSwap pool serve as a basepool?

The pool must be accepted for basepool use and registered in the factory that will deploy the metapool. Curve governance can approve a StableSwap pool for this role. Creating a pool and issuing LP tokens alone does not supply that registration. The StableSwap-NG factory requires an added basepool before it can deploy a metapool referencing that pool.

Does holding basepool LP tokens earn CRV from connected metapools?

Holding a basepool LP token alone does not earn the separate CRV incentives offered by a connected metapool. Those incentives require staking that metapool’s LP tokens in its eligible gauge. The basepool token represents the basepool share, so its reward eligibility follows its own pool and gauge. The metapool’s use of basepool reserves does not merge their staking positions.

Is a basepool the same thing as the Base blockchain?

A basepool is a role within Curve’s liquidity structure, while Base is a blockchain network. The pool role identifies the reserves whose LP token a metapool uses. Selecting the Base network does not make every pool there a basepool. The distinction comes from the pool’s accepted liquidity relationship, independently of the network’s name.

Can combining basepool and metapool liquidity totals count reserves twice?

Yes, if both totals include the basepool reserves represented by the LP tokens held inside the metapool. Those tokens represent existing reserves. Adding their represented value again would count the shared portion twice. The metapool’s additional assets are separate liquidity, so removing overlap concerns the basepool-backed portion rather than the entire metapool balance.

Which LP tokens must be unstaked before withdrawing a staked metapool position?

The metapool LP tokens held in its gauge must be unstaked before withdrawing that position through Curve’s pool interface. Unstaking releases those pool shares, while withdrawing burns them to release pool assets. The interface treats unstaking and withdrawing as separate actions. An unstaked metapool position does not require the same preliminary unstaking action.

Why can the metapool address also appear as its LP-token address?

In StableSwap-NG, the metapool contract also implements its ERC-20 LP token, so the pool address and LP-token address coincide. That address represents metapool shares. It is distinct from the basepool LP-token address held as one of the metapool’s coins. This relationship belongs to the implementation; a token symbol or pool name alone does not establish it for another contract.

Does exchange_received expose a metapool’s underlying basepool assets?

In StableSwap-NG metapools, exchange_received exchanges only the additional asset and the basepool LP token. Underlying basepool coins require the underlying swap interface and its asset indices. This balance-based method also reverts when the pool contains a rebasing asset. Its availability therefore depends on both the requested asset layer and the pool’s token behavior.

Is a StableSwap-NG metapool permanently linked to its original basepool?

A StableSwap-NG metapool’s BASE_POOL address is immutable and is set when the contract is deployed. That instance cannot switch its linked basepool through a later parameter change. The linked basepool continues to trade, so its balances and LP-token value can change even though its contract address remains fixed.