How an increase works
An increase adds liquidity at your position’s existing range and keeps its ID. The added liquidity can earn fees after confirmation while the range is active. To change the range, use Rebalancing. As with minting a position, any deposited amount the range does not use stays with the position for you to collect. Fees you have already earned also remain collectible; adding liquidity does not reinvest them. See Collecting and burning.In the app
Before you startYou’ll need: Shield Wallet connected to Shield Swap, an open position, and a confidential balance of the pool’s assets. See Fund.Add funds
- Open Pools, then select the pool. Under Your Positions, select Manage in the position’s row, then Increase. The panel on the right switches to Increase with Position loaded showing the position’s ID and range.
- Enter an amount for either asset. The app fills in the other amount for the position’s range and the current price.
- Select Increase Liquidity.
- In Review liquidity increase, check both deposit amounts, the position ID, and the Selected price range. Select Confirm.
- In the Transaction request in Shield Wallet, check that the request is from swap.shield.fi and that the amounts match, then select Confirm.
Troubleshooting
Next steps
- Decreasing liquidity to remove funds from the position.
- Collecting and burning to collect the fees it has earned.
Find the position and add funds
Prerequisites: Your authenticated mainnetclient for Typescript, dex for Python, or CLI profile from Setup, an existing position, and a confidential balance of both pool assets.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.- Typescript
- Python
- CLI
Step 1: Find the position
Positions are discovered from the records your account holds, so this needs the scanner. There is no chain index of an account’s positions.positionTokenId, poolKey, tickLower, tickUpper, withdrawal, and a state with the live liquidity, amount0, amount1, and uncollectedFees0 and uncollectedFees1. Name the position by positionTokenId whenever the account holds more than one in the same pool.Step 2: Increase
The range is read from the position; only the amounts are new.AMOUNT0_BASE_UNITS and AMOUNT1_BASE_UNITS with base-unit bigint budgets for the pool’s token0 and token1. The call spends the current position record and issues a replacement with the same positionTokenId; wait for the scanner to serve the new record before the next operation on this position.How it works on chain
increase_liquidity transfers your desired token0 and token1 amounts into the AMM and adds liquidity at the position’s existing range. Earned fees and any unused deposit stay owed to the position until you collect.What changes
How liquidity and fees are recorded
- The contract calculates the added liquidity and the token amounts used at the current square-root price. Added liquidity must be nonzero, and each used amount must meet its token minimum, in base units.
- It updates the boundary ticks and checks the pool’s per-tick liquidity cap.
- It settles pending fees using the position’s liquidity before the increase. Those fees and the unused deposit are added to the existing owed balances.
- It records the combined liquidity and advances the fee checkpoints. The added liquidity earns only subsequent fee growth.
After a full decrease
The contract supports adding liquidity to an unburned, fully decreased position. If its boundary ticks were removed, the increase recreates them with fresh fee-growth-outside values. Fetch current insertion hints before submitting; a stale hint rejects the transaction.After acceptance, use the replacementPositionNFT for the next operation on this position.Next steps
- Decreasing liquidity to remove funds from the position.
- Collecting and burning to collect fees and close the position.