ERC-8463: Liquidity Locks

“The liquidity is locked” is every launch’s safety story, and no two lockers say it the same way, so scanners and launchpads keep allowlists of lockers they have integrated. This draft is one interface for any contract that locks pool liquidity (v2 pool tokens, v3 and v4 positions): which pool, how much, until when, for whom, who collects the locked position’s fees, with events, and per pool lockedLiquidity (permanent, timed, earliest unlock) at a cost that does not grow with the number of locks. Release is only at or after unlockAt, only to the beneficiary, and never more than the lock holds. It names the figures ERC-8376 detectors take as inputs (lockedLiquidity, lockSinks, lpLockRemaining) so a detector can derive them instead of trusting them.

Readers still check a locker before counting it (that it holds the position, and has no path to move it early): the interface makes that check uniform, it does not replace it. Questions for locker operators and scanners:

  1. Are extension (beneficiary only, later only), release (anyone, to the beneficiary) and fee collection (anyone, to the fee recipient) the right three calls to standardize?
  2. For v4 positions, is (PoolManager, poolId, positionId) enough to identify a lock?

The three calls seem like a reasonable minimum, but release and fee collection should be permissionless only if their destinations are fixed by the lock and callers cannot choose amounts or recipients. For v4, (PoolManager, poolId, positionId) needs a precise definition of positionId; if it is a manager-issued token ID, include the position manager address. Otherwise IDs from different managers may collide or be interpreted differently by scanners.

1 Like

Thank you, both points are right, and the draft already holds the first one; the second needed one more sentence.

Release and fee collection. Neither call takes an amount or a recipient: releaseLiquidityLock(lockId) and collectLiquidityLockFees(lockId). A release MUST move the lock’s whole position, or its whole amount of pool tokens, to its beneficiary and to no other account; a collection MUST pay the fees to feeRecipient and to no other account, and MUST NOT reduce the position’s liquidity. Both accounts are set when the lock is created and MUST NOT change. That is what makes it safe for anyone to call them.

v4 positions. A lock carries the position manager too: pool is the singleton pool manager, poolId the pool within it, position the position manager that issued the NFT, and positionId that manager’s token id. The pool is read from the manager’s own record, never named by the caller. My question above should have said (PoolManager, poolId, positionManager, positionId). The definition of positionId now says so: the token id that the position manager position issued, named together with it, so ids from different managers never collide (ethereum/ERCs#2107).

lockedLiquidity sums position liquidity across ranges, while Uniswap v3’s pool.liquidity() reports only liquidity active at the current tick. Using those together to calculate ERC-8376’s lpLockedShare would mix different quantities and could overstate the locked share. Could the Detector inputs section clarify the denominator for concentrated-liquidity pools?

For example, a permanently locked position outside the current range would increase the reported locked amount while adding no active liquidity at that price. Could the spec say whether the intended share covers active liquidity or all positions, and require a matching numerator and denominator? A test with locked and unlocked positions in disjoint ranges would make the distinction concrete.

Thank you, that is a real gap. lockedLiquidity counts every locked position, in range or not, and the Detector inputs section only said how to compute that numerator, so a detector could divide it by v3’s active liquidity() and overstate the share, past 100% even.

The section now says a locked share MUST divide like by like, in one of two forms:

  • Active form: the numerator counts only the locked positions whose range contains the pool’s tick at the block that ends the window, read lock by lock from the position manager’s record, and the denominator is the pool’s active liquidity at that block.
  • All-positions form: lockedLiquidity over the liquidity of every position of the pool at that block.

A detector SHOULD use the active form for ERC-8376’s lpLockedShare: an out-of-range position adds no depth at the current price, so counting it overstates how much of what can be traded against is locked. Both are counts of liquidity, not of value.

Your test is in the test cases: active liquidity 1,000; a locked position of 300 in range, a locked position of 5,000 out of range and an unlocked 700 in range give 300 / 1,000 in the active form and 5,300 / 6,000 over all positions, and 5,300 / 1,000 is the overstatement the section now rules out (ethereum/ERCs#2107).

1 Like