Skip to main content
This page helps you remove some or all of the funds from a position, in the Shield Swap app or with the Typescript SDK, Python SDK, or CLI.

How a decrease works

A decrease removes liquidity and adds the proceeds and earned fees to your position funds. Collecting pays those funds to the withdrawal address fixed when you minted. In the app, one Decrease action runs both steps. With the SDKs or CLI, call collect after the decrease to receive the funds. The amounts removed from liquidity depend on the price when the decrease settles. Check the expected amounts in the app review or CLI plan before confirming. Any liquidity you leave in the position keeps the same range. In the app, removing 100 percent starts the closeout flow. If collection is interrupted, the funds wait under Pending Claims in Portfolio. Collect them there without another decrease. See Collecting and burning.

Decrease and read what is owed

Prerequisites: Your authenticated mainnet client for Typescript, dex for Python, or CLI profile from Setup, and an existing position with liquidity.Liquidity is the position’s share of the range, not a token amount. These examples remove half of it. Amounts are base-unit integers; use each token’s decimals to display them.Replace POSITION_TOKEN_ID with the ID of the position you intend to change. Define the confirmation helper for your SDK before running these examples.

Step 1: Find the position

Step 2: Decrease

decreaseLiquidity takes no imports; nothing leaves the AMM yet. The call spends the current position record and issues a replacement with the same positionTokenId.Wait for acceptance and the replacement record before reading what is owed.
tokensOwed0 and tokensOwed1 now hold the withdrawn principal plus settled fees. They stay with the position until you collect. Continue with Collecting and burning.

How it works on chain

decrease_liquidity reduces your position’s liquidity and credits the withdrawn principal and settled fees to its owed balances. You receive token payouts through a separate collect transaction.

What changes

How fees and principal settle

  1. The contract calculates the principal for the liquidity you remove, using the current square-root price and your fixed range.
  2. It settles pending fees using your full liquidity before the reduction, including the portion you keep. Those fees and the withdrawn principal are added to the existing owed balances.
  3. It records the reduced liquidity and advances the fee checkpoints. Later fee growth applies to the remaining liquidity.
Your two public token minimums apply to the withdrawn principal, in base units. If either amount falls below its minimum, the transaction is rejected. See LP fee entitlements for settlement and rounding rules for base-unit precision.Boundaries with no remaining pool liquidity are removed from the tick index.

After a full decrease

Wait for acceptance and the replacement PositionNFT, then collect the owed balances. Burn the position only after its liquidity and both owed balances are zero, using the latest record.

Next steps