> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt
> Use this file to discover all available pages before exploring further.

# DLMM Changelog

> Track DLMM release notes, breaking changes, and upgrade guidance for lb_clmm, SDKs, commons, and CLI tooling.

<Tip>
  Track DLMM releases here.
</Tip>

<Update label="lb_clmm 0.12.0" description="Limit Orders and Quote Token Fee" rss="DLMM 0.12.0 adds limit orders and quote token fee, with breaking changes for swap quotes, swap account layouts, pool function types, and indexers. SDK 1.9.8, CLI 0.6.3, commons 0.3.3.">
  <Info>
    Mainnet deployment for Release 0.12.0 is planned for May 21, 2026, at 11:00 AM UTC+8 (Wednesday).
  </Info>

  <Warning>
    **Breaking release.** If you build swap instructions manually, run DLMM swap quotes, or index certain DLMM events, please plan an upgrade before mainnet deployment.
  </Warning>

  ## Release summary

  | Component      | Version  | PR                                                              |
  | -------------- | -------- | --------------------------------------------------------------- |
  | Program        | `0.12.0` | —                                                               |
  | TypeScript SDK | `1.9.8`  | [dlmm-sdk #273](https://github.com/MeteoraAg/dlmm-sdk/pull/273) |
  | CLI            | `0.6.3`  | [dlmm-sdk #273](https://github.com/MeteoraAg/dlmm-sdk/pull/273) |
  | Commons        | `0.3.3`  | [dlmm-sdk #273](https://github.com/MeteoraAg/dlmm-sdk/pull/273) |

  ## What We Shipped

  * Limit Orders
  * Quote Token Fee

  ## What To Do

  <div style={{overflowX: 'auto', marginBottom: '1.5rem'}}>
    <table>
      <thead>
        <tr>
          <th>Integrators</th>
          <th>What Changed</th>
          <th>What To Do</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td><strong>Swap Routers</strong></td>

          <td>
            <ul>
              <li>Swap quote computation</li>
              <li><code>swap</code> and <code>swap2</code> bitmap extension mutability</li>
              <li>Remaining-accounts layout changed</li>
            </ul>
          </td>

          <td>
            <ul>
              <li>If you are using the Typescript SDK, upgrade to <code>@meteora-ag/dlmm\@1.9.5-rc.4</code> to test.</li>
              <li>If you are using Rust, update your quote logic based on the new quote math in <code>commons\@0.3.3</code></li>
              <li>Mark bitmap extension <strong>writable</strong> on <code>swap</code> / <code>swap2</code></li>
              <li>If you are using <code>host\_fee\_in</code> account that is Token-2022 mint with Transfer Hook, add <code>TransferHookReferral</code> and any transfer-hook accounts</li>
            </ul>
          </td>
        </tr>

        <tr>
          <td><strong>Trading Terminals</strong></td>

          <td>
            <ul>
              <li><code>FeeParameterUpdate</code> event parsing</li>
              <li><code>Swap2Evt</code> event parsing</li>
            </ul>
          </td>

          <td>
            <ul>
              <li>Update your event parsing logic to decode the updated events</li>
            </ul>
          </td>
        </tr>

        <tr>
          <td><strong>Partners</strong></td>

          <td>
            <ul>
              <li>New limit order functions</li>
              <li>Breaking changes to <code>createCustomizablePermissionlessLbPair</code> and <code>getPairPubkeyIfExists</code></li>
              <li>Swap quote computation</li>
            </ul>
          </td>

          <td>
            <ul>
              <li>Bump your SDK version to <code>@meteora-ag/dlmm\@1.9.5-rc.4</code> to start testing.</li>
            </ul>
          </td>
        </tr>
      </tbody>
    </table>
  </div>

  ## Program: `lb_clmm` `0.12.0`

  Program ID (mainnet and devnet): `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo`

  ### Added

  * New endpoint `add_liquidity_by_weight2`, that is same as `add_liquidity_by_weight` but supports token2022
  * New endpoint `set_permissionless_operation_bits` to allow position owner to enable permissionless authorization on some operations such as `claim_fee`
  * New endpoint `place_limit_order` to allow user to place limit orders for either bid or ask side.
  * New endpoint `cancel_limit_order` to cancel limit order.
  * New endpoint `close_limit_order_if_empty` to close a limit order if it's empty.
  * New endpoint `close_bin_array` to close an invalid bin array.
  * Account `PresetParameter` added new `collect_fee_mode` field. All the existing `PresetParameter` account will have default `CollectFeeMode::OnlyInput`.
  * Account `LbPair::StaticParameters` added new `collect_fee_mode` field. All existing LbPair account will have default `CollectFeeMode::OnlyInput`.

  ### Changed

  * Allow permissionless claim\_fee if position owner enabled it
  * All the existing `LbPair` accounts without any liquidity mining rewards will be defaulted to limit order supported pool and doesn't support LM anymore. This is not revert-able.
  * Updated `initialize_permissioned_lb_pair` parameter `InitPermissionPairIx` field `protocol_share` to `padding0` because it was no longer in use
  * Endpoint `go_to_a_bin` will revert if the pool is disabled / before activation. The restriction can be bypassed by operator by passing operator associated accounts through remaining accounts.

  ### Removed

  * Remove endpoint `reset_pool_tombstone_fields`, `reset_bin_array_tombstone_fields`, `reset_position_tombstone_fields`

  ### Breaking Changes

  * Endpoint `initialize_preset_parameter` added new `collect_fee_mode` field.
  * Endpoint `initialize_preset_parameter` field function\_type enum type has been changed to concrete\_function\_type.
  * Enum `FunctionType` no longer defaulted to `FunctionType::LiquidityMining`. All existing on chain `LbPair` account will defaulted to `FunctionType::Undetermined`. With `FunctionType::Undetermined`, if there's liquidity reward initialized, it will be `FunctionType::LiquidityMining`, else will be `FunctionType::LimitOrder`
  * Swap quote mechanism due to introducing of collect fee mode on in/out side, and limit order mechanism. Affected endpoints are `swap`, `swap_exact_out`, `swap_with_price_impact`, `swap2`, `swap_exact_out2` and `swap_with_price_impact2`.
  * Due to new limit order logic (consuming more CU), max bins to swap in 1 instruction changes from 280 bins to 260 bins
  * Endpoint `swap` and `swap2` bitmap extension account will be `mutable` due to limit order logic require flipping of liquidity tracking bits.
  * Event `FeeParameterUpdate` added new field `base_fee_power_factor`
  * `AccountsType` enum variants introduces `TransferHookReferral`. Clients building `swap2`, `swap_exact_out2` and `swap_with_price_impact2` instructions must update their `RemainingAccountsInfo` slices to include `AccountsType::TransferHookReferral` when the swap has `host_fee_in` account. Additionally, any required transfer hook accounts for the referral mint must also be provided in the instruction.

  ```rust theme={"system"}
  pub enum ConcreteFunctionType {
    LimitOrder = 0,
    LiquidityMining = 1,
  }

  pub enum CollectFeeMode {
    InputOnly = 0,
    OnlyY = 1,
  }
  ```

  ## TypeScript SDK: `@meteora-ag/dlmm` `1.9.8`

  [SDK PR #273](https://github.com/MeteoraAg/dlmm-sdk/pull/273)

  <Tip>
    Early testing: [`@meteora-ag/dlmm@1.9.5-rc.4`](https://www.npmjs.com/package/@meteora-ag/dlmm/v/1.9.5-rc.4).<br /> Production: [`@meteora-ag/dlmm@1.9.8`](https://www.npmjs.com/package/@meteora-ag/dlmm/v/1.9.8).
  </Tip>

  ### Added

  * Added function `placeLimitOrder` to place a new limit order. Only applicable for pair with function type of LimitOrder.
  * Added function `cancelLimitOrder` to cancel an existing limit order.
  * Added function `closeLimitOrderIfEmpty` to close a limit order if it's empty.
  * Added function `enablePositionPermissionlessClaimFee`. This allow non position owner to invoke claim fee instruction for other's position.
  * Added function `getLimitOrderByUserAndLbPair` to get all limit orders of a user for a given pair.
  * Added function `getLimitOrder` to get limit order data by limit order pubkey.
  * Added function `addLiquidityByWeight2` which support token 2022 add liquidity by weight.
  * Added function `quoteCreateLimitOrder` which returns the cost for creating a Limit Order

  ### Breaking Changes

  * Added `concreteFunctionType`, `collectFeeMode` parameters in `createCustomizablePermissionlessLbPair` function. This allow user to create pair with function of LimitOrder or LiquidityMining and collect fee in InputToken, or TokenY (single sided fee).
  * Added `concreteFunctionType`, `collectFeeMode` parameters in `getPairPubkeyIfExists` function. This allow user to query existing pair with addition filter of function type and collect fee mode.

  ### Removed

  * `Position` type (v1) removed, there's no more v1 position on chain anymore.
  * `updateBinArray` function removed since it's not used anywhere.

  ### Changes

  * Update logic of `swapQuote` and `swapQuoteExactOut` to limit order and collect fee mode.
  * `swapExactOutQuoteAtBin` function's 'amountIn\` now include fee.

  ## CLI: `0.6.3`

  [CLI PR #273](https://github.com/MeteoraAg/dlmm-sdk/pull/273)

  ### Added

  * Added `place_limit_order` command to place limit orders
  * Added `cancel_limit_order` command to cancel existing limit orders
  * Added `close_limit_order_if_empty` command to close empty limit order account
  * Added `get_limit_orders` command to query limit orders for a user on a specific pair
  * Added `set_permissionless_operation_bits` command to set operation bits on a position

  ## Commons: `0.3.3`

  [Commons PR #273](https://github.com/MeteoraAg/dlmm-sdk/pull/273)

  ### Added

  * Added `DynamicPosition` in `dynamic_position.rs` to support parsing on position account
  * Added `LimitOrder` in `limit_order.rs` to support parsing on limit order account

  ### Changed

  * `quote_exact_in()` and `quote_exact_out()` now support limit order liquidity
</Update>
