mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-05-18 15:09:51 +00:00
Permanently lock `MINIMUM_LIQUIDITY` (1_000) LP tokens in a dedicated LP-lock holding PDA on pool creation, following the Uniswap v2 "dead shares" pattern. The pool creator receives `initial_lp - MINIMUM_LIQUIDITY` tokens instead of the full initial_lp amount. Adds `compute_lp_lock_holding_pda` and `LP_LOCK_HOLDING_PDA_SEED` to amm_core, updates new_definition to emit two sequential chained calls (create LP definition + lock holding, then mint user share), and adjusts remove liquidity to account for the permanently locked floor. BREAKING CHANGE: NewDefinition instruction requires an additional LP-lock holding account derived via `compute_lp_lock_holding_pda(amm_program_id, pool_id)`.