Overview
DAMM v2 supports two types of liquidity locks, both of which move liquidity fromunlocked_liquidity into restricted buckets on the position account:
| Type | Bucket | Withdrawable? |
|---|---|---|
| Vesting lock | vested_liquidity | Yes, on schedule |
| Permanent lock | permanent_locked_liquidity | Never |
Vesting Lock
Vesting releases liquidity back tounlocked_liquidity on a cliff + periodic schedule.
Schedule Parameters
| Parameter | Description |
|---|---|
cliff_point | Slot or timestamp when first unlock occurs |
period_frequency | Slots or seconds between each periodic release |
cliff_unlock_liquidity | How much liquidity unlocks at the cliff |
liquidity_per_period | How much unlocks per period after the cliff |
number_of_period | Total number of periods |
Total locked amount
Two vesting account types
- Inner Vesting
- External Vesting Account
Vesting schedule stored directly in the position account. No extra account needed.When to use: Most use cases — simpler, single-account.Limitation: Only one vesting schedule per position. If you need multiple vesting tranches, split the position first.
Refreshing vested liquidity
Vested liquidity doesn’t auto-unlock. A transaction that calls any position interaction (add/remove liquidity, claim fees, etc.) triggersrefresh_inner_vesting, which:
- Calculates
released_liquiditybased on current slot/timestamp vs cliff/period schedule - Moves that amount from
vested_liquidity→unlocked_liquidity - Clears the inner vesting struct when fully released
EvtLockPosition
Permanent Lock
Permanently locked liquidity cannot be withdrawn under any circumstances. It remains in the pool forever, providing a liquidity floor guarantee. This is used by token projects to demonstrate long-term commitment to liquidity:EvtPermanentLockPosition with:
lock_liquidity_amount— amount just lockedtotal_permanent_locked_liquidity— new total permanently locked on this position
Locked Liquidity Still Earns
Both vesting and permanently locked liquidity contribute to fee and reward calculations:- Fee accrual (
fee_a_pending,fee_b_pendingcheckpoints use total liquidity) - Farming reward accrual (both reward slots)
Use Cases
Token Launch — Founder LP Lock
Token Launch — Founder LP Lock
Lock founder LP for 12 months with a 6-month cliff and monthly releases:
cliff_point= launch_timestamp + 6 monthscliff_unlock_liquidity= 25% of totalliquidity_per_period= 12.5% of totalnumber_of_period= 6 (monthly, for 6 months post-cliff)
Protocol-Owned Liquidity — Permanent
Protocol-Owned Liquidity — Permanent
A DAO or protocol wanting to guarantee permanent liquidity depth can lock a portion permanently. The locked liquidity shows on-chain and is verifiable by anyone.
Airdrop / Ecosystem LP
Airdrop / Ecosystem LP
Lock ecosystem-provided liquidity with a vesting schedule that aligns with token emission schedules, ensuring liquidity grows alongside token distribution.

