What a lock does
A lock blocks these operations on the locked position:removeLiquidity(constant-product pools)decreaseLiquidity(concentrated pools)rebalancePositionwhen the source range is the locked range
What a lock does not do
Fee collection and free-balance withdrawals stay available while a lock is active. The lock commits deposited capital, not the yield it accrues. The following operations continue to work on a locked position:collectFees(concentrated pools)withdrawConcentratedBalance(concentrated pools)addLiquidityandincreaseLiquidity(a lock does not cap position size)- Swaps against the pool (swaps operate on pool reserves, not LP positions)
Duration model
Lock duration is encoded as a Unix-seconds string passed to the SDK.- Bounded: a future Unix timestamp string (for example
"1793836800"). The lock expires when the server’s current time passes the timestamp. The record is removed lazily on the next read; no explicit action is required from the owner. - Indefinite: the sentinel
"0". The lock has no expiry. Once a position is set indefinite, it cannot be converted to a bounded duration.
"4102444800" (2100-01-01 UTC). Anything longer must use the "0" sentinel.
Locks can be extended but not shortened. A request to set an earlier expiry than the current one is rejected and no state changes.
Scoping: V2 vs V3
| Pool type | Unit | Lock covers |
|---|---|---|
| Constant-product (V2) | Entire LP share | All LP tokens the owner holds in the pool |
| Concentrated (V3) | Specific tick range | Only the position at exactly (tickLower, tickUpper) |