Curveswap liquidity withdrawals burn LP tokens, while one-coin payouts depend on pool balances and fees
Curveswap liquidity withdrawals redeem LP tokens for assets held by Curve pools, and the selected exit method determines the withdrawal calculation. A proportional exit returns the pool's asset mix. A one-coin exit concentrates the payout in a selected asset and applies the pool implementation's pricing and fee rules. The LP amount that an account can use depends on its available position, while the assets received depend on live pool state. Staked positions need access to their LP tokens before redemption. Minimum output amounts and, for supported imbalanced exits, a maximum LP burn amount constrain execution.
Contents
LP shares and changing pool balances
An LP token represents a liquidity position, while the assets available for that position change as the pool processes trades, deposits, and withdrawals. In Stableswap-NG, a proportional payout follows the LP amount burned relative to total supply. Each returned coin reflects its accounted balance at execution, subject to integer rounding. The account's usable LP balance limits its withdrawal input, and the pool's balances constrain the available output.
A one-coin quote also depends on the selected coin, withdrawal size, token rates, and the pool's pricing parameters.
Proportional, one-coin, and custom exits
The withdrawal method determines which amount the caller fixes and which amount the contract calculates from the available liquidity.
Proportional withdrawal
A proportional withdrawal burns a specified LP amount and returns the pool coins in their existing proportions. Stableswap-NG, Twocrypto-NG, and Tricrypto-NG implement this through remove_liquidity. Their proportional methods do not charge a pool withdrawal fee. Receiving the existing mix leaves any later conversion into a preferred asset as a separate operation.
Single-coin withdrawal
A single-coin withdrawal fixes the LP amount burned and selects a pool coin. The contract calculates that coin's payout and checks its minimum output. The fee and pricing calculation account for changing the pool's composition. This operation can run within one pool call, without requiring a separate swap transaction.
Custom withdrawal amounts
Stableswap-NG also supports remove_liquidity_imbalance: requested coin amounts determine the LP burn, bounded by a submitted maximum. FXSwap v2.1.0d has a distinct fixed-out method. It burns a specified LP amount, returns an exact amount of one coin, and calculates the other coin's output. That method uses a minimum for the calculated output, rather than the Stableswap-NG maximum-burn structure.
Why does a one-coin withdrawal incur a fee?
A one-coin withdrawal incurs the applicable liquidity fee because concentrating a pool share into one asset changes the remaining pool's balance. Stableswap-NG calculates how removing liquidity changes its invariant, the mathematical relationship between normalized coin balances. It then applies fee adjustments within the single-coin calculation. Pool balances, rate normalization, the amplification parameter, and fee settings contribute to the amount that the selected coin can return.
Stableswap-NG uses a base fee and an off-peg multiplier to calculate state-dependent fees. The live configuration and the withdrawal's effect on balances matter. A displayed swap fee is therefore insufficient to calculate every single-coin exit. Twocrypto-NG and Tricrypto-NG use their own crypto pool calculations, so their withdrawal amounts require the matching quote method.
The Stableswap-NG calc_withdraw_one_coin quote includes the pool's withdrawal fee calculation.
Subtracting an assumed pool fee again would misstate that quote.
Stableswap-NG one-coin call parameters
The Stableswap-NG single-coin interface accepts an LP amount, a pool coin index, a minimum token output, and an optional receiver. Its values identify a particular withdrawal; they are not universal withdrawal limits. Raw amounts use the relevant token's smallest units, with LP-token units distinct from output-coin units.
| Parameter | Accepted value | Execution effect |
|---|---|---|
_burn_amount
|
Positive LP amount, uint256
|
Sets the LP tokens burned on success |
i
|
Valid pool coin index, int128
|
Selects the pool coin returned |
_min_received
|
Minimum coin amount, uint256
|
Rejects calculated output below this amount |
_receiver
|
Recipient, address; defaults to msg.sender
|
Receives the selected pool coin |
The coin index must match the selected pool's coin ordering. An underlying-asset index from a zap can refer to a different token.
Unstake LP tokens before pool redemption
Gauge staking places LP tokens in a gauge contract, so a direct pool exit needs access to those tokens before the pool can burn them.
LP tokens held in a gauge
LiquidityGaugeV6 records the account's staked balance and returns LP tokens through its withdrawal function. That function reduces the gauge position without redeeming the LP tokens for pool coins. Pool redemption has its own calculation and output limits. The standard withdrawal interface treats unstaking and pool withdrawal as separate actions; another integration may compose operations differently.
LP tokens held through another contract
A contract that stakes or wraps liquidity can hold the pool's LP tokens on behalf of its depositors. Its users may hold a different position token. The wrapper's redemption rules determine access to the LP position, and its contract dependencies remain relevant to the exit. The account's direct LP-token balance cannot describe every wrapped position.
Metapool exits and underlying assets
A metapool holds its own coin alongside a base pool's LP token, so a direct withdrawal can return another liquidity position. That base LP token represents assets in the base pool. Receiving it leaves the base-pool redemption outstanding. A single-coin selection at the metapool layer must therefore identify whether the requested output is the metapool coin or the base LP token.
A compatible metapool deposit zap can withdraw into a base pool coin by combining metapool redemption with base-pool redemption. These are separate calculations that the zap can compose inside one transaction. Both pools' balances and applicable withdrawal fees affect the final underlying output. The zap's quote and minimum must describe that final asset. The availability of an underlying swap in a metapool does not establish that its direct liquidity-removal function returns the same underlying coin.
Token rates and withdrawal valuations
Token quantities and asset value describe different aspects of a withdrawal, especially when a pool holds rate-bearing tokens or an asset loses its peg. Stableswap-NG normalizes supported assets using their configured rates and decimal precision. Those inputs help determine executable output. The pool's virtual price describes LP accounting, without specifying a particular single-coin payout. For FXSwap, withdrawal valuation also needs the selected method and its supply accounting, including refuel shares that are not user-owned positions. A fee-free proportional withdrawal still returns exposure to the assets that the pool actually holds.
Can a proportional exit work when a one-coin exit fails?
A proportional exit can work when single-coin pricing fails, because Stableswap-NG and Twocrypto-NG proportional methods avoid the single-coin invariant-solving calculation.
Pricing failures
The proportional methods calculate outputs from accounted pool balances and LP supply. A proportional exit returns the existing pool mix, so it does not promise the desired amount of one asset. Any subsequent conversion has its own liquidity and execution constraints.
Token transfer failures
A proportional method still needs to transfer the returned assets. A token that rejects a transfer can prevent that method from completing. LP-balance requirements also remain. An underlying redemption through a zap depends on the base pool, so changing the metapool withdrawal setting alone cannot resolve every failure further along that path.
Output bounds
A single-coin minimum and an imbalanced withdrawal's maximum burn guard different quantities. A failed bound calls for a fresh calculation of that exit. Raising the permitted burn or lowering the accepted output changes the protection. Neither change restores a missing LP balance or makes unavailable token transfers succeed.
Pool fees, network costs, and remaining assets
Withdrawal costs include the pool's applicable liquidity fee and the network execution charge, with additional dependencies for zaps or wrapped positions. The pool fee enters its withdrawal calculation. Network costs pay for executing the transaction and vary with its operations and network conditions. An exit that also needs unstaking can involve additional execution costs. Comparing a one-coin exit with a proportional exit followed by conversion therefore requires the same intended final asset and the costs of every required operation.
A successful unstaking transaction leaves LP tokens available; it does not establish that a later pool withdrawal has completed.
Successful pool redemption burns the specified or calculated LP amount and transfers assets to the receiver under that method's rules. The transaction's execution record and recipient transfers identify what was paid. Any LP tokens left unburned continue to represent a pool position. A proportional exit also leaves a mix of assets that may require further handling, even when the pool itself charged no withdrawal fee.
Frequently asked questions about Curveswap liquidity withdrawals
Does my deposit asset determine which coin I can withdraw?
The asset originally deposited does not lock a direct Curve pool withdrawal to that same coin. The supported withdrawal method and selected output determine which pool assets the account receives. The position represents pooled liquidity, so its exit amounts reflect the pool's state rather than a reservation of the original deposit.
Can I redeem only part of my Curveswap liquidity position?
A supported pool withdrawal can redeem part of an LP position by using less than its available LP balance. The unburned LP tokens continue to represent liquidity. A staked position can also require partial unstaking first, and any wrapper's own redemption rules apply when it holds the underlying LP tokens.
Are unclaimed rewards lost when I withdraw liquidity?
Unstaking from LiquidityGaugeV6 preserves accrued reward accounting, although reward transfers depend on the claim method. Its withdrawal can optionally claim externally added rewards. CRV emissions use the Minter claim mechanism. Redeeming LP tokens for pool assets does not automatically combine every outstanding reward claim with that redemption.
Will a reverted withdrawal still cost a network fee?
An included transaction that reverts still charges for the network execution that it consumed. The failed transaction rolls back its pool withdrawal changes, including any LP burn in that transaction. A separate unstaking transaction that already succeeded remains completed, so its effects and execution charge are separate.
Does a killed gauge prevent LP-token withdrawal?
LiquidityGaugeV6's killed status stops CRV emissions without disabling its LP-token withdrawal function. The status concerns the gauge's emissions and does not establish that the associated pool has stopped operating. Pool redemption still has its own balance, transfer, and output requirements after LP tokens become available.
Can a pool withdrawal deliver assets on another network?
A direct Curve pool withdrawal transfers assets on the network where that pool operates. Its receiver address identifies the recipient of that local transfer and does not select a destination network. Moving the received assets elsewhere requires a separate supported transfer mechanism, with its own eligibility and execution conditions.
Which amount in a Stableswap-NG one-coin withdrawal event is the payout?
The coin_amount field in RemoveLiquidityOne records the selected coin's output, while token_amount records the LP tokens burned. These quantities use different tokens and their respective units. The provider identifies the caller; an explicitly selected receiver can be different, so recipient transfers establish where the output went.
Updated on