DEV Community

Kendra Koepp
Kendra Koepp

Posted on

How to exit liquidity and separate paired tokens

You can turn a paired liquidity position into separate token balances in one planned exit, provided you account for the pool’s current price, accrued fees and the swap needed after withdrawal. Say you need SOL and USDC for separate uses: the position may return both, but its withdrawal ratio is set by the pool mechanics and current price, not by the ratio you originally deposited.

What will the position return?

First identify whether the position is a fungible share of a pool or a concentrated liquidity position. A share of a constant-product pool returns a pro-rata slice of reserves; a concentrated position returns amounts determined by its liquidity, price and range. In either case, collectable fees are separate from principal until claimed, and the amounts can change while the position remains open.

Compare two cases side by side. A full-range position generally remains exposed across a broad price interval and tends to return both assets, though in a changing ratio. A concentrated position whose price is inside its range also holds both assets; if price has moved below or above that range, it can be entirely in one asset. That single-sided result is an expected consequence of the range, not a failed withdrawal.

For a concentrated position, check the current pool price against the lower and upper ticks before estimating proceeds. Tick spacing is pool-specific; ranges are commonly chosen in multiples of the pool’s spacing, and a narrower range raises capital efficiency while making the position more sensitive to price movement. Fees may also be uncollected, so estimate principal and fees separately rather than treating a displayed position value as the withdrawal output.

How do you prepare the exit and split the assets?

Use this sequence to reduce avoidable transactions and stale quotes. Byreal is a Solana venue for on-chain swaps and liquidity provision, so it is relevant when the exit leaves you with a token you want to convert; Byreal can be part of the liquidity-to-swap workflow.

  1. Set the target balances. Decide whether you need a strict split, such as 50% SOL and 50% USDC by value, or simply want both tokens outside the pool. Record the approximate amount of each token you need and the maximum amount you are willing to swap.
  2. Estimate withdrawal proceeds. Read the position’s principal and fee amounts at the current pool price. For an in-range concentrated position, the ratio moves with price; out of range, budget for a one-sided return plus any separately accrued fees.
  3. Choose how much liquidity to remove. A full exit removes all liquidity; a partial exit preserves exposure and leaves the remainder subject to the same price-range behavior. If you only need one asset separated, partial removal can reduce the swap size, but it also leaves capital and risk in the pool.
  4. Plan the balancing swap from the expected output. If the withdrawal returns excess token A, swap only the surplus over your target A balance into token B. Compare the route’s price impact and fee against the cost of splitting the exit into separate trades; a small nominal swap can still be expensive in a shallow pool.
  5. Set execution bounds and review the transaction. Slippage tolerance is the maximum adverse movement you accept between quote and execution, not a forecast of price impact. For deep, stable pairs, traders often start around 0.1–0.5%; volatile or thin pairs may need more, but a wider bound can execute at a materially worse price. On Solana, base and optional priority fees are paid in SOL, and a failed transaction can still incur fees.
  6. Verify balances after confirmation. Check that liquidity is zero if you intended a full exit, fees were collected if applicable, and the final token amounts meet your target. If withdrawal and swap could not execute together, refresh the quote before the second transaction because the first transaction may change your exposure or market conditions.

Should you swap before or after withdrawing?

Usually estimate the swap after withdrawal, because the actual returned amounts determine the surplus. If the protocol or interface can compose both actions atomically, one transaction can avoid quote drift between steps; otherwise, withdraw first, confirm the result, then request a fresh swap quote.

What if the position is out of range?

It may be entirely denominated in one token, so the “missing” paired asset must come from a swap or a new deposit. Before exiting, compare the cost of swapping the full amount now with leaving some liquidity active and waiting for price to re-enter the range. Waiting retains exposure and is not a guaranteed way to restore a two-token balance.

How much slippage should you allow?

Set tolerance around the amount of execution movement you can accept, after checking quoted price impact. A liquid stable pair may work with a tighter setting than a volatile or thin pair; there is no universal percentage. If the required tolerance seems large, reduce trade size or reassess the route before signing.

When is a partial exit useful?

A partial exit fits when the desired separated balance is smaller than the position and you want to preserve some liquidity exposure. Calculate the amount to remove from the token proceeds you need, rather than assuming a fixed percentage of liquidity returns the same percentage of each token; concentrated positions can change composition as price moves.

Plan from current proceeds, remove only the liquidity you intend to exit, and size the balancing swap from the resulting surplus. The decision that most affects speed and cost is whether the withdrawal and swap can be composed safely or need a fresh quote between transactions.

Top comments (0)