# Meteora DLMM decoder (Carbon 2.0)

> Decode Meteora DLMM instructions, accounts and events in Rust with carbon-meteora-dlmm-decoder 2.0.0. Program ID LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.

`carbon-meteora-dlmm-decoder` decodes the instructions, accounts and events of the Meteora DLMM program (`LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo`): 76 instructions, 12 account types, 30 events. It is generated with Codama from the program's IDL; see [decoders](https://carbon.sevenlabs.org/concepts/decoders.md) for how decoders plug into a pipeline.

|                  |                                                                                                                   |
| ---------------- | ----------------------------------------------------------------------------------------------------------------- |
| Crate            | [`carbon-meteora-dlmm-decoder`](https://crates.io/crates/carbon-meteora-dlmm-decoder/2.0.0) 2.0.0                 |
| Install          | `cargo add carbon-meteora-dlmm-decoder@2.0.0`                                                                     |
| Program ID       | `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo` (`carbon_meteora_dlmm_decoder::PROGRAM_ID`)                         |
| Category         | [DEX & AMM](https://carbon.sevenlabs.org/decoders/dex-and-amm.md)                                                 |
| Decoder          | `carbon_meteora_dlmm_decoder::MeteoraDlmmDecoder`                                                                 |
| Instruction enum | `instructions::MeteoraDlmmInstruction`                                                                            |
| Account enum     | `accounts::MeteoraDlmmAccount`                                                                                    |
| Event enum       | `instructions::CpiEvent`                                                                                          |
| Features         | `serde`, `postgres`, `graphql` (none enabled by default)                                                          |
| API docs         | [docs.rs/carbon-meteora-dlmm-decoder/2.0.0](https://docs.rs/carbon-meteora-dlmm-decoder/2.0.0)                    |
| Source           | [decoders/meteora-dlmm-decoder](https://github.com/sevenlabs-hq/carbon/tree/v2.0.0/decoders/meteora-dlmm-decoder) |

Other DEX and AMM decoders: [BonkSwap](https://carbon.sevenlabs.org/decoders/bonkswap.md), [FluxBeam](https://carbon.sevenlabs.org/decoders/fluxbeam.md), [Gavel](https://carbon.sevenlabs.org/decoders/gavel.md), [Heaven](https://carbon.sevenlabs.org/decoders/heaven.md), [Jupiter Limit Order](https://carbon.sevenlabs.org/decoders/jupiter-limit-order.md), [Jupiter Limit Order v2](https://carbon.sevenlabs.org/decoders/jupiter-limit-order-2.md), [Kamino Limit Order](https://carbon.sevenlabs.org/decoders/kamino-limit-order.md), [Lifinity AMM v2](https://carbon.sevenlabs.org/decoders/lifinity-amm-v2.md), [Meteora DAMM v2](https://carbon.sevenlabs.org/decoders/meteora-damm-v2.md), [Meteora Pools](https://carbon.sevenlabs.org/decoders/meteora-pools.md), [OpenBook v2](https://carbon.sevenlabs.org/decoders/openbook-v2.md), [Orca Whirlpools](https://carbon.sevenlabs.org/decoders/orca-whirlpool.md), [PancakeSwap](https://carbon.sevenlabs.org/decoders/pancake-swap.md), [Phoenix v1](https://carbon.sevenlabs.org/decoders/phoenix-v1.md), [PumpSwap](https://carbon.sevenlabs.org/decoders/pump-swap.md), [Raydium AMM v4](https://carbon.sevenlabs.org/decoders/raydium-amm-v4.md), [Raydium CLMM](https://carbon.sevenlabs.org/decoders/raydium-clmm.md), [Raydium CPMM](https://carbon.sevenlabs.org/decoders/raydium-cpmm.md), [Raydium Stable Swap](https://carbon.sevenlabs.org/decoders/raydium-stable-swap.md), [Stabble Stable Swap](https://carbon.sevenlabs.org/decoders/stabble-stable-swap.md), [Stabble Weighted Swap](https://carbon.sevenlabs.org/decoders/stabble-weighted-swap.md). To decode several in one pipeline, see [dEX and AMM decoders](https://carbon.sevenlabs.org/decoders/dex-and-amm.md).

Guide: [Index swaps across DEXs](https://carbon.sevenlabs.org/guides/index-dex-swaps.md).

The `serde` feature derives `Serialize`/`Deserialize` on every type, `postgres` adds tables and processors for [Postgres](https://carbon.sevenlabs.org/guides/postgres.md), and `graphql` adds a schema for the [GraphQL server](https://carbon.sevenlabs.org/guides/graphql.md).

## Usage

This program crawls recent Meteora DLMM transactions from the public RPC and prints every decoded `Swap` instruction. Add the dependencies:

```sh
cargo add carbon-core@2.0.0 carbon-meteora-dlmm-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/full
```

`src/main.rs`:

```rust
use {
    carbon_core::{
        error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_meteora_dlmm_decoder::{
        instructions::MeteoraDlmmInstruction, MeteoraDlmmDecoder, PROGRAM_ID,
    },
    carbon_rpc_transaction_crawler_datasource::{ConnectionConfig, Filters, RpcTransactionCrawler},
    std::sync::Arc,
};

#[tokio::main]
async fn main() -> CarbonResult<()> {
    env_logger::init();

    // Fetches the program's recent transactions over JSON-RPC, newest first.
    let datasource = RpcTransactionCrawler::new(
        "https://api.mainnet-beta.solana.com".to_string(),
        PROGRAM_ID,
        ConnectionConfig::default(),
        Filters::new(None, None, None),
        None,
    );

    Pipeline::builder()
        .datasource(datasource)
        .metrics(Arc::new(LogMetrics::new()))
        .instruction(MeteoraDlmmDecoder, InstructionLogger)
        .build()?
        .run()
        .await
}

struct InstructionLogger;

impl Processor<InstructionProcessorInputType<'_, MeteoraDlmmInstruction>> for InstructionLogger {
    async fn process(
        &mut self,
        input: &InstructionProcessorInputType<'_, MeteoraDlmmInstruction>,
    ) -> CarbonResult<()> {
        let signature = input.metadata.transaction_metadata.signature;
        if let MeteoraDlmmInstruction::Swap { data, accounts, .. } = input.decoded_instruction {
            println!("swap {signature}: {data:?} lb_pair={}", accounts.lb_pair);
        }
        Ok(())
    }
}
```

```sh
RUST_LOG=info cargo run
```

Each `Swap` instruction prints one line with the transaction signature and the decoded `Swap` data. The public endpoint rate-limits requests, so the first lines can take a while; use your own RPC URL for anything beyond a test. See [stream with RPC](https://carbon.sevenlabs.org/guides/stream-with-rpc.md) for the crawler options.

Events published with Anchor's `emit_cpi!` arrive as the `CpiEvent` instruction. Match them with `MeteoraDlmmInstruction::CpiEvent { data: CpiEvent::AddLiquidity(event), .. }` (import `instructions::CpiEvent`); see [Events](#events). If `CpiEvent` never arrives, the program logs its events with `emit!` instead: decode them with [`decode_log_events`](https://carbon.sevenlabs.org/concepts/instructions.md#log-events).

### Decode accounts

The transaction crawler emits transactions only. To decode accounts, use a datasource that emits account updates. This program subscribes to the program's accounts with `programSubscribe` on the public WebSocket endpoint and prints every decoded `LbPair` account as it changes. Add the datasource and the Solana RPC types it takes:

```sh
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2
```

`src/main.rs`:

```rust
use {
    carbon_core::{
        account::AccountProcessorInputType, error::CarbonResult, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_meteora_dlmm_decoder::{accounts::MeteoraDlmmAccount, MeteoraDlmmDecoder, PROGRAM_ID},
    carbon_rpc_program_subscribe_datasource::{Filters, RpcProgramSubscribe},
    solana_client::rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig, UiAccountEncoding},
    std::sync::Arc,
};

#[tokio::main]
async fn main() -> CarbonResult<()> {
    env_logger::init();

    // Streams every change to an account owned by the program (programSubscribe).
    let config = RpcProgramAccountsConfig {
        account_config: RpcAccountInfoConfig {
            encoding: Some(UiAccountEncoding::Base64),
            ..Default::default()
        },
        ..Default::default()
    };
    let datasource = RpcProgramSubscribe::new(
        "wss://api.mainnet-beta.solana.com".to_string(),
        Filters::new(PROGRAM_ID, Some(config)),
    );

    Pipeline::builder()
        .datasource(datasource)
        .metrics(Arc::new(LogMetrics::new()))
        .account(MeteoraDlmmDecoder, AccountLogger)
        .build()?
        .run()
        .await
}

struct AccountLogger;

impl Processor<AccountProcessorInputType<'_, MeteoraDlmmAccount>> for AccountLogger {
    async fn process(
        &mut self,
        input: &AccountProcessorInputType<'_, MeteoraDlmmAccount>,
    ) -> CarbonResult<()> {
        if let MeteoraDlmmAccount::LbPair(lb_pair) = &input.decoded_account.data {
            println!("lb_pair {}: {lb_pair:?}", input.metadata.pubkey);
        }
        Ok(())
    }
}
```

```sh
RUST_LOG=info cargo run
```

Each update to a `LbPair` account prints its address and decoded fields; the program runs until you stop it. Cargo resolves `solana-client` to 4.2.2, the exact version the datasource pins, so both use the same `RpcProgramAccountsConfig` type. To load every existing account once instead of streaming changes, see [load account state](https://carbon.sevenlabs.org/guides/load-account-state.md).

## Instructions

Variants of `MeteoraDlmmInstruction`. Each is `MeteoraDlmmInstruction::<Variant> { program_id, data, accounts }`, where `data` and `accounts` are the types listed under the variant, exported from `carbon_meteora_dlmm_decoder::instructions`. Discriminators are the leading bytes of the instruction data, in hex.

**How an instruction decodes.** The decoder returns a variant only when all of these hold; otherwise the instruction is skipped and no processor is called:

1. The instruction's program ID is `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo`.
2. The data starts with the variant's discriminator, and the rest deserializes into its data type.
3. The instruction has at least as many accounts as the variant requires (the "Required accounts" count under each variant).

**Accounts.** They are matched by position, in the order listed. An account marked _optional_ is `None` only when the instruction ends before it; Anchor programs pass the program ID as a placeholder for an omitted optional account, so check for `Some(PROGRAM_ID)` too. Accounts after the listed ones are in `accounts.remaining` as `AccountMeta`s. The decoder doesn't record whether an account signed or was writable: read that from `input.raw_instruction.accounts[i].is_signer` and `.is_writable`, which follow the same order. It doesn't check signer, writable, owner or PDA constraints either; the program enforced those when the transaction executed, so a decoded instruction from a successful transaction already satisfied them.

### `AddLiquidity`

Discriminator `b59d59438fb63448` · data `AddLiquidity` · accounts `AddLiquidityInstructionAccounts`.

| Field                 | Type                                        |
| --------------------- | ------------------------------------------- |
| `liquidity_parameter` | [`LiquidityParameter`](#liquidityparameter) |

Required accounts: 16; extras go to `remaining`.

Fields of `AddLiquidityInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `bin_array_lower`            | `Pubkey`           |
| 10  | `bin_array_upper`            | `Pubkey`           |
| 11  | `sender`                     | `Pubkey`           |
| 12  | `token_x_program`            | `Pubkey`           |
| 13  | `token_y_program`            | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidity2`

Discriminator `e4a24e1c46db7473` · data `AddLiquidity2` · accounts `AddLiquidity2InstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `liquidity_parameter`     | [`LiquidityParameter`](#liquidityparameter)       |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 14; extras go to `remaining`.

Fields of `AddLiquidity2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `sender`                     | `Pubkey`           |
| 10  | `token_x_program`            | `Pubkey`           |
| 11  | `token_y_program`            | `Pubkey`           |
| 12  | `event_authority`            | `Pubkey`           |
| 13  | `program`                    | `Pubkey`           |
| 14… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidityByStrategy`

Discriminator `0703967f94283dc8` · data `AddLiquidityByStrategy` · accounts `AddLiquidityByStrategyInstructionAccounts`.

| Field                 | Type                                                            |
| --------------------- | --------------------------------------------------------------- |
| `liquidity_parameter` | [`LiquidityParameterByStrategy`](#liquidityparameterbystrategy) |

Required accounts: 16; extras go to `remaining`.

Fields of `AddLiquidityByStrategyInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `bin_array_lower`            | `Pubkey`           |
| 10  | `bin_array_upper`            | `Pubkey`           |
| 11  | `sender`                     | `Pubkey`           |
| 12  | `token_x_program`            | `Pubkey`           |
| 13  | `token_y_program`            | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidityByStrategy2`

Discriminator `03dd95da6f8d76d5` · data `AddLiquidityByStrategy2` · accounts `AddLiquidityByStrategy2InstructionAccounts`.

| Field                     | Type                                                            |
| ------------------------- | --------------------------------------------------------------- |
| `liquidity_parameter`     | [`LiquidityParameterByStrategy`](#liquidityparameterbystrategy) |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo)               |

Required accounts: 14; extras go to `remaining`.

Fields of `AddLiquidityByStrategy2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `sender`                     | `Pubkey`           |
| 10  | `token_x_program`            | `Pubkey`           |
| 11  | `token_y_program`            | `Pubkey`           |
| 12  | `event_authority`            | `Pubkey`           |
| 13  | `program`                    | `Pubkey`           |
| 14… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidityByStrategyOneSide`

Discriminator `2905eeaf64e106cd` · data `AddLiquidityByStrategyOneSide` · accounts `AddLiquidityByStrategyOneSideInstructionAccounts`.

| Field                 | Type                                                                          |
| --------------------- | ----------------------------------------------------------------------------- |
| `liquidity_parameter` | [`LiquidityParameterByStrategyOneSide`](#liquidityparameterbystrategyoneside) |

Required accounts: 12; extras go to `remaining`.

Fields of `AddLiquidityByStrategyOneSideInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token`                 | `Pubkey`           |
| 4   | `reserve`                    | `Pubkey`           |
| 5   | `token_mint`                 | `Pubkey`           |
| 6   | `bin_array_lower`            | `Pubkey`           |
| 7   | `bin_array_upper`            | `Pubkey`           |
| 8   | `sender`                     | `Pubkey`           |
| 9   | `token_program`              | `Pubkey`           |
| 10  | `event_authority`            | `Pubkey`           |
| 11  | `program`                    | `Pubkey`           |
| 12… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidityByWeight`

Discriminator `1c8cee63e7a21595` · data `AddLiquidityByWeight` · accounts `AddLiquidityByWeightInstructionAccounts`.

| Field                 | Type                                                        |
| --------------------- | ----------------------------------------------------------- |
| `liquidity_parameter` | [`LiquidityParameterByWeight`](#liquidityparameterbyweight) |

Required accounts: 16; extras go to `remaining`.

Fields of `AddLiquidityByWeightInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `bin_array_lower`            | `Pubkey`           |
| 10  | `bin_array_upper`            | `Pubkey`           |
| 11  | `sender`                     | `Pubkey`           |
| 12  | `token_x_program`            | `Pubkey`           |
| 13  | `token_y_program`            | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidityByWeight2`

Discriminator `d13b3f5b6fc899e4` · data `AddLiquidityByWeight2` · accounts `AddLiquidityByWeight2InstructionAccounts`.

| Field                     | Type                                                        |
| ------------------------- | ----------------------------------------------------------- |
| `liquidity_parameter`     | [`LiquidityParameterByWeight`](#liquidityparameterbyweight) |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo)           |

Required accounts: 14; extras go to `remaining`.

Fields of `AddLiquidityByWeight2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `sender`                     | `Pubkey`           |
| 10  | `token_x_program`            | `Pubkey`           |
| 11  | `token_y_program`            | `Pubkey`           |
| 12  | `event_authority`            | `Pubkey`           |
| 13  | `program`                    | `Pubkey`           |
| 14… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidityOneSide`

Discriminator `5e9b6797465fdca5` · data `AddLiquidityOneSide` · accounts `AddLiquidityOneSideInstructionAccounts`.

| Field                 | Type                                                      |
| --------------------- | --------------------------------------------------------- |
| `liquidity_parameter` | [`LiquidityOneSideParameter`](#liquidityonesideparameter) |

Required accounts: 12; extras go to `remaining`.

Fields of `AddLiquidityOneSideInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token`                 | `Pubkey`           |
| 4   | `reserve`                    | `Pubkey`           |
| 5   | `token_mint`                 | `Pubkey`           |
| 6   | `bin_array_lower`            | `Pubkey`           |
| 7   | `bin_array_upper`            | `Pubkey`           |
| 8   | `sender`                     | `Pubkey`           |
| 9   | `token_program`              | `Pubkey`           |
| 10  | `event_authority`            | `Pubkey`           |
| 11  | `program`                    | `Pubkey`           |
| 12… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidityOneSidePrecise`

Discriminator `a1c26754ab47fa9a` · data `AddLiquidityOneSidePrecise` · accounts `AddLiquidityOneSidePreciseInstructionAccounts`.

| Field       | Type                                                                                |
| ----------- | ----------------------------------------------------------------------------------- |
| `parameter` | [`AddLiquiditySingleSidePreciseParameter`](#addliquiditysinglesidepreciseparameter) |

Required accounts: 12; extras go to `remaining`.

Fields of `AddLiquidityOneSidePreciseInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token`                 | `Pubkey`           |
| 4   | `reserve`                    | `Pubkey`           |
| 5   | `token_mint`                 | `Pubkey`           |
| 6   | `bin_array_lower`            | `Pubkey`           |
| 7   | `bin_array_upper`            | `Pubkey`           |
| 8   | `sender`                     | `Pubkey`           |
| 9   | `token_program`              | `Pubkey`           |
| 10  | `event_authority`            | `Pubkey`           |
| 11  | `program`                    | `Pubkey`           |
| 12… | `remaining`                  | `Vec<AccountMeta>` |

### `AddLiquidityOneSidePrecise2`

Discriminator `2133a3c975627de7` · data `AddLiquidityOneSidePrecise2` · accounts `AddLiquidityOneSidePrecise2InstructionAccounts`.

| Field                     | Type                                                                                  |
| ------------------------- | ------------------------------------------------------------------------------------- |
| `liquidity_parameter`     | [`AddLiquiditySingleSidePreciseParameter2`](#addliquiditysinglesidepreciseparameter2) |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo)                                     |

Required accounts: 10; extras go to `remaining`.

Fields of `AddLiquidityOneSidePrecise2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token`                 | `Pubkey`           |
| 4   | `reserve`                    | `Pubkey`           |
| 5   | `token_mint`                 | `Pubkey`           |
| 6   | `sender`                     | `Pubkey`           |
| 7   | `token_program`              | `Pubkey`           |
| 8   | `event_authority`            | `Pubkey`           |
| 9   | `program`                    | `Pubkey`           |
| 10… | `remaining`                  | `Vec<AccountMeta>` |

### `CancelLimitOrder`

Discriminator `849c841f4328e861` · data `CancelLimitOrder` · accounts `CancelLimitOrderInstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `bins`                    | `Vec<i32>`                                        |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 15; extras go to `remaining`.

Fields of `CancelLimitOrderInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `reserve_x`                  | `Pubkey`           |
| 3   | `reserve_y`                  | `Pubkey`           |
| 4   | `token_x_mint`               | `Pubkey`           |
| 5   | `token_y_mint`               | `Pubkey`           |
| 6   | `limit_order`                | `Pubkey`           |
| 7   | `owner_token_x`              | `Pubkey`           |
| 8   | `owner_token_y`              | `Pubkey`           |
| 9   | `owner`                      | `Pubkey`           |
| 10  | `token_x_program`            | `Pubkey`           |
| 11  | `token_y_program`            | `Pubkey`           |
| 12  | `memo_program`               | `Pubkey`           |
| 13  | `event_authority`            | `Pubkey`           |
| 14  | `program`                    | `Pubkey`           |
| 15… | `remaining`                  | `Vec<AccountMeta>` |

### `ClaimFee`

Discriminator `a9204f8988e84689` · data `ClaimFee` · accounts `ClaimFeeInstructionAccounts`.

No data fields.

Required accounts: 14; extras go to `remaining`.

Fields of `ClaimFeeInstructionAccounts`, in account order:

| #   | Field             | Type               |
| --- | ----------------- | ------------------ |
| 0   | `lb_pair`         | `Pubkey`           |
| 1   | `position`        | `Pubkey`           |
| 2   | `bin_array_lower` | `Pubkey`           |
| 3   | `bin_array_upper` | `Pubkey`           |
| 4   | `sender`          | `Pubkey`           |
| 5   | `reserve_x`       | `Pubkey`           |
| 6   | `reserve_y`       | `Pubkey`           |
| 7   | `user_token_x`    | `Pubkey`           |
| 8   | `user_token_y`    | `Pubkey`           |
| 9   | `token_x_mint`    | `Pubkey`           |
| 10  | `token_y_mint`    | `Pubkey`           |
| 11  | `token_program`   | `Pubkey`           |
| 12  | `event_authority` | `Pubkey`           |
| 13  | `program`         | `Pubkey`           |
| 14… | `remaining`       | `Vec<AccountMeta>` |

### `ClaimFee2`

Discriminator `70bf65ab1c907fbb` · data `ClaimFee2` · accounts `ClaimFee2InstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `min_bin_id`              | `i32`                                             |
| `max_bin_id`              | `i32`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 14; extras go to `remaining`.

Fields of `ClaimFee2InstructionAccounts`, in account order:

| #   | Field             | Type               |
| --- | ----------------- | ------------------ |
| 0   | `lb_pair`         | `Pubkey`           |
| 1   | `position`        | `Pubkey`           |
| 2   | `sender`          | `Pubkey`           |
| 3   | `reserve_x`       | `Pubkey`           |
| 4   | `reserve_y`       | `Pubkey`           |
| 5   | `user_token_x`    | `Pubkey`           |
| 6   | `user_token_y`    | `Pubkey`           |
| 7   | `token_x_mint`    | `Pubkey`           |
| 8   | `token_y_mint`    | `Pubkey`           |
| 9   | `token_program_x` | `Pubkey`           |
| 10  | `token_program_y` | `Pubkey`           |
| 11  | `memo_program`    | `Pubkey`           |
| 12  | `event_authority` | `Pubkey`           |
| 13  | `program`         | `Pubkey`           |
| 14… | `remaining`       | `Vec<AccountMeta>` |

### `ClaimReward`

Discriminator `955fb5f25e5a9ea2` · data `ClaimReward` · accounts `ClaimRewardInstructionAccounts`.

| Field          | Type  |
| -------------- | ----- |
| `reward_index` | `u64` |

Required accounts: 11; extras go to `remaining`.

Fields of `ClaimRewardInstructionAccounts`, in account order:

| #   | Field                | Type               |
| --- | -------------------- | ------------------ |
| 0   | `lb_pair`            | `Pubkey`           |
| 1   | `position`           | `Pubkey`           |
| 2   | `bin_array_lower`    | `Pubkey`           |
| 3   | `bin_array_upper`    | `Pubkey`           |
| 4   | `sender`             | `Pubkey`           |
| 5   | `reward_vault`       | `Pubkey`           |
| 6   | `reward_mint`        | `Pubkey`           |
| 7   | `user_token_account` | `Pubkey`           |
| 8   | `token_program`      | `Pubkey`           |
| 9   | `event_authority`    | `Pubkey`           |
| 10  | `program`            | `Pubkey`           |
| 11… | `remaining`          | `Vec<AccountMeta>` |

### `ClaimReward2`

Discriminator `be037f77b2579db7` · data `ClaimReward2` · accounts `ClaimReward2InstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `reward_index`            | `u64`                                             |
| `min_bin_id`              | `i32`                                             |
| `max_bin_id`              | `i32`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 10; extras go to `remaining`.

Fields of `ClaimReward2InstructionAccounts`, in account order:

| #   | Field                | Type               |
| --- | -------------------- | ------------------ |
| 0   | `lb_pair`            | `Pubkey`           |
| 1   | `position`           | `Pubkey`           |
| 2   | `sender`             | `Pubkey`           |
| 3   | `reward_vault`       | `Pubkey`           |
| 4   | `reward_mint`        | `Pubkey`           |
| 5   | `user_token_account` | `Pubkey`           |
| 6   | `token_program`      | `Pubkey`           |
| 7   | `memo_program`       | `Pubkey`           |
| 8   | `event_authority`    | `Pubkey`           |
| 9   | `program`            | `Pubkey`           |
| 10… | `remaining`          | `Vec<AccountMeta>` |

### `CloseBinArray`

Discriminator `44ae5850b5cc13e0` · data `CloseBinArray` · accounts `CloseBinArrayInstructionAccounts`.

No data fields.

Required accounts: 4; extras go to `remaining`.

Fields of `CloseBinArrayInstructionAccounts`, in account order:

| #  | Field           | Type               |
| -- | --------------- | ------------------ |
| 0  | `lb_pair`       | `Pubkey`           |
| 1  | `bin_array`     | `Pubkey`           |
| 2  | `rent_receiver` | `Pubkey`           |
| 3  | `signer`        | `Pubkey`           |
| 4… | `remaining`     | `Vec<AccountMeta>` |

### `CloseClaimFeeOperatorAccount`

Discriminator `b8d5581fb3658224` · data `CloseClaimFeeOperatorAccount` · accounts `CloseClaimFeeOperatorAccountInstructionAccounts`.

No data fields.

Required accounts: 3; extras go to `remaining`.

Fields of `CloseClaimFeeOperatorAccountInstructionAccounts`, in account order:

| #  | Field                | Type               |
| -- | -------------------- | ------------------ |
| 0  | `claim_fee_operator` | `Pubkey`           |
| 1  | `rent_receiver`      | `Pubkey`           |
| 2  | `signer`             | `Pubkey`           |
| 3… | `remaining`          | `Vec<AccountMeta>` |

### `CloseLimitOrderIfEmpty`

Discriminator `397c249b7ef95dab` · data `CloseLimitOrderIfEmpty` · accounts `CloseLimitOrderIfEmptyInstructionAccounts`.

No data fields.

Required accounts: 5; extras go to `remaining`.

Fields of `CloseLimitOrderIfEmptyInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `limit_order`     | `Pubkey`           |
| 1  | `owner`           | `Pubkey`           |
| 2  | `rent_receiver`   | `Pubkey`           |
| 3  | `event_authority` | `Pubkey`           |
| 4  | `program`         | `Pubkey`           |
| 5… | `remaining`       | `Vec<AccountMeta>` |

### `CloseOperatorAccount`

Discriminator `ab09d54a7817031d` · data `CloseOperatorAccount` · accounts `CloseOperatorAccountInstructionAccounts`.

No data fields.

Required accounts: 3; extras go to `remaining`.

Fields of `CloseOperatorAccountInstructionAccounts`, in account order:

| #  | Field           | Type               |
| -- | --------------- | ------------------ |
| 0  | `operator`      | `Pubkey`           |
| 1  | `signer`        | `Pubkey`           |
| 2  | `rent_receiver` | `Pubkey`           |
| 3… | `remaining`     | `Vec<AccountMeta>` |

### `ClosePosition`

Discriminator `7b86510031446262` · data `ClosePosition` · accounts `ClosePositionInstructionAccounts`.

No data fields.

Required accounts: 8; extras go to `remaining`.

Fields of `ClosePositionInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `position`        | `Pubkey`           |
| 1  | `lb_pair`         | `Pubkey`           |
| 2  | `bin_array_lower` | `Pubkey`           |
| 3  | `bin_array_upper` | `Pubkey`           |
| 4  | `sender`          | `Pubkey`           |
| 5  | `rent_receiver`   | `Pubkey`           |
| 6  | `event_authority` | `Pubkey`           |
| 7  | `program`         | `Pubkey`           |
| 8… | `remaining`       | `Vec<AccountMeta>` |

### `ClosePosition2`

Discriminator `ae5a2373ba2893e2` · data `ClosePosition2` · accounts `ClosePosition2InstructionAccounts`.

No data fields.

Required accounts: 5; extras go to `remaining`.

Fields of `ClosePosition2InstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `position`        | `Pubkey`           |
| 1  | `sender`          | `Pubkey`           |
| 2  | `rent_receiver`   | `Pubkey`           |
| 3  | `event_authority` | `Pubkey`           |
| 4  | `program`         | `Pubkey`           |
| 5… | `remaining`       | `Vec<AccountMeta>` |

### `ClosePositionIfEmpty`

Discriminator `3b7cd4765b986e9d` · data `ClosePositionIfEmpty` · accounts `ClosePositionIfEmptyInstructionAccounts`.

No data fields.

Required accounts: 5; extras go to `remaining`.

Fields of `ClosePositionIfEmptyInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `position`        | `Pubkey`           |
| 1  | `sender`          | `Pubkey`           |
| 2  | `rent_receiver`   | `Pubkey`           |
| 3  | `event_authority` | `Pubkey`           |
| 4  | `program`         | `Pubkey`           |
| 5… | `remaining`       | `Vec<AccountMeta>` |

### `ClosePresetParameter`

Discriminator `04949164861ab53d` · data `ClosePresetParameter` · accounts `ClosePresetParameterInstructionAccounts`.

No data fields.

Required accounts: 4; extras go to `remaining`.

Fields of `ClosePresetParameterInstructionAccounts`, in account order:

| #  | Field              | Type               |
| -- | ------------------ | ------------------ |
| 0  | `preset_parameter` | `Pubkey`           |
| 1  | `operator`         | `Pubkey`           |
| 2  | `signer`           | `Pubkey`           |
| 3  | `rent_receiver`    | `Pubkey`           |
| 4… | `remaining`        | `Vec<AccountMeta>` |

### `ClosePresetParameter2`

Discriminator `27195f6b7411731c` · data `ClosePresetParameter2` · accounts `ClosePresetParameter2InstructionAccounts`.

No data fields.

Required accounts: 4; extras go to `remaining`.

Fields of `ClosePresetParameter2InstructionAccounts`, in account order:

| #  | Field              | Type               |
| -- | ------------------ | ------------------ |
| 0  | `preset_parameter` | `Pubkey`           |
| 1  | `operator`         | `Pubkey`           |
| 2  | `signer`           | `Pubkey`           |
| 3  | `rent_receiver`    | `Pubkey`           |
| 4… | `remaining`        | `Vec<AccountMeta>` |

### `CloseTokenBadge`

Discriminator `6c92566eb3fe0a68` · data `CloseTokenBadge` · accounts `CloseTokenBadgeInstructionAccounts`.

No data fields.

Required accounts: 4; extras go to `remaining`.

Fields of `CloseTokenBadgeInstructionAccounts`, in account order:

| #  | Field           | Type               |
| -- | --------------- | ------------------ |
| 0  | `token_badge`   | `Pubkey`           |
| 1  | `rent_receiver` | `Pubkey`           |
| 2  | `operator`      | `Pubkey`           |
| 3  | `signer`        | `Pubkey`           |
| 4… | `remaining`     | `Vec<AccountMeta>` |

### `CreateOperatorAccount`

Discriminator `dd40f695f099e5a3` · data `CreateOperatorAccount` · accounts `CreateOperatorAccountInstructionAccounts`.

| Field        | Type   |
| ------------ | ------ |
| `permission` | `u128` |

Required accounts: 5; extras go to `remaining`.

Fields of `CreateOperatorAccountInstructionAccounts`, in account order:

| #  | Field                | Type               |
| -- | -------------------- | ------------------ |
| 0  | `operator`           | `Pubkey`           |
| 1  | `whitelisted_signer` | `Pubkey`           |
| 2  | `signer`             | `Pubkey`           |
| 3  | `payer`              | `Pubkey`           |
| 4  | `system_program`     | `Pubkey`           |
| 5… | `remaining`          | `Vec<AccountMeta>` |

### `DecreasePositionLength`

Discriminator `c2db882019606925` · data `DecreasePositionLength` · accounts `DecreasePositionLengthInstructionAccounts`.

| Field              | Type  |
| ------------------ | ----- |
| `length_to_remove` | `u16` |
| `side`             | `u8`  |

Required accounts: 6; extras go to `remaining`.

Fields of `DecreasePositionLengthInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `rent_receiver`   | `Pubkey`           |
| 1  | `position`        | `Pubkey`           |
| 2  | `owner`           | `Pubkey`           |
| 3  | `system_program`  | `Pubkey`           |
| 4  | `event_authority` | `Pubkey`           |
| 5  | `program`         | `Pubkey`           |
| 6… | `remaining`       | `Vec<AccountMeta>` |

### `ForIdlTypeGenerationDoNotCall`

Discriminator `b46945505f32496c` · data `ForIdlTypeGenerationDoNotCall` · accounts `ForIdlTypeGenerationDoNotCallInstructionAccounts`.

| Field | Type                  |
| ----- | --------------------- |
| `ix`  | [`DummyIx`](#dummyix) |

Required accounts: 1; extras go to `remaining`.

Fields of `ForIdlTypeGenerationDoNotCallInstructionAccounts`, in account order:

| #  | Field              | Type               |
| -- | ------------------ | ------------------ |
| 0  | `dummy_zc_account` | `Pubkey`           |
| 1… | `remaining`        | `Vec<AccountMeta>` |

### `FundReward`

Discriminator `bc32f9a55d97263f` · data `FundReward` · accounts `FundRewardInstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `reward_index`            | `u64`                                             |
| `amount`                  | `u64`                                             |
| `carry_forward`           | `bool`                                            |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 9; extras go to `remaining`.

Fields of `FundRewardInstructionAccounts`, in account order:

| #  | Field                  | Type               |
| -- | ---------------------- | ------------------ |
| 0  | `lb_pair`              | `Pubkey`           |
| 1  | `reward_vault`         | `Pubkey`           |
| 2  | `reward_mint`          | `Pubkey`           |
| 3  | `funder_token_account` | `Pubkey`           |
| 4  | `funder`               | `Pubkey`           |
| 5  | `bin_array`            | `Pubkey`           |
| 6  | `token_program`        | `Pubkey`           |
| 7  | `event_authority`      | `Pubkey`           |
| 8  | `program`              | `Pubkey`           |
| 9… | `remaining`            | `Vec<AccountMeta>` |

### `GoToABin`

Discriminator `9248aee028fd54ae` · data `GoToABin` · accounts `GoToABinInstructionAccounts`.

| Field    | Type  |
| -------- | ----- |
| `bin_id` | `i32` |

Required accounts: 6; extras go to `remaining`.

Fields of `GoToABinInstructionAccounts`, in account order:

| #  | Field                        | Type               |
| -- | ---------------------------- | ------------------ |
| 0  | `lb_pair`                    | `Pubkey`           |
| 1  | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2  | `from_bin_array`             | `Option<Pubkey>`   |
| 3  | `to_bin_array`               | `Option<Pubkey>`   |
| 4  | `event_authority`            | `Pubkey`           |
| 5  | `program`                    | `Pubkey`           |
| 6… | `remaining`                  | `Vec<AccountMeta>` |

### `IncreaseOracleLength`

Discriminator `be3d7d57674f9ead` · data `IncreaseOracleLength` · accounts `IncreaseOracleLengthInstructionAccounts`.

| Field           | Type  |
| --------------- | ----- |
| `length_to_add` | `u64` |

Required accounts: 5; extras go to `remaining`.

Fields of `IncreaseOracleLengthInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `oracle`          | `Pubkey`           |
| 1  | `funder`          | `Pubkey`           |
| 2  | `system_program`  | `Pubkey`           |
| 3  | `event_authority` | `Pubkey`           |
| 4  | `program`         | `Pubkey`           |
| 5… | `remaining`       | `Vec<AccountMeta>` |

### `IncreasePositionLength`

Discriminator `505375d3420d2195` · data `IncreasePositionLength` · accounts `IncreasePositionLengthInstructionAccounts`.

| Field           | Type  |
| --------------- | ----- |
| `length_to_add` | `u16` |
| `side`          | `u8`  |

Required accounts: 7; extras go to `remaining`.

Fields of `IncreasePositionLengthInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `funder`          | `Pubkey`           |
| 1  | `lb_pair`         | `Pubkey`           |
| 2  | `position`        | `Pubkey`           |
| 3  | `owner`           | `Pubkey`           |
| 4  | `system_program`  | `Pubkey`           |
| 5  | `event_authority` | `Pubkey`           |
| 6  | `program`         | `Pubkey`           |
| 7… | `remaining`       | `Vec<AccountMeta>` |

### `IncreasePositionLength2`

Discriminator `ffd2cc477389e171` · data `IncreasePositionLength2` · accounts `IncreasePositionLength2InstructionAccounts`.

| Field                  | Type  |
| ---------------------- | ----- |
| `minimum_upper_bin_id` | `i32` |

Required accounts: 7; extras go to `remaining`.

Fields of `IncreasePositionLength2InstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `funder`          | `Pubkey`           |
| 1  | `lb_pair`         | `Pubkey`           |
| 2  | `position`        | `Pubkey`           |
| 3  | `owner`           | `Pubkey`           |
| 4  | `system_program`  | `Pubkey`           |
| 5  | `event_authority` | `Pubkey`           |
| 6  | `program`         | `Pubkey`           |
| 7… | `remaining`       | `Vec<AccountMeta>` |

### `InitializeBinArray`

Discriminator `235613b94ed44bd3` · data `InitializeBinArray` · accounts `InitializeBinArrayInstructionAccounts`.

| Field   | Type  |
| ------- | ----- |
| `index` | `i64` |

Required accounts: 4; extras go to `remaining`.

Fields of `InitializeBinArrayInstructionAccounts`, in account order:

| #  | Field            | Type               |
| -- | ---------------- | ------------------ |
| 0  | `lb_pair`        | `Pubkey`           |
| 1  | `bin_array`      | `Pubkey`           |
| 2  | `funder`         | `Pubkey`           |
| 3  | `system_program` | `Pubkey`           |
| 4… | `remaining`      | `Vec<AccountMeta>` |

### `InitializeBinArrayBitmapExtension`

Discriminator `2f9de2b40cf02147` · data `InitializeBinArrayBitmapExtension` · accounts `InitializeBinArrayBitmapExtensionInstructionAccounts`.

No data fields.

Required accounts: 5; extras go to `remaining`.

Fields of `InitializeBinArrayBitmapExtensionInstructionAccounts`, in account order:

| #  | Field                        | Type               |
| -- | ---------------------------- | ------------------ |
| 0  | `lb_pair`                    | `Pubkey`           |
| 1  | `bin_array_bitmap_extension` | `Pubkey`           |
| 2  | `funder`                     | `Pubkey`           |
| 3  | `system_program`             | `Pubkey`           |
| 4  | `rent`                       | `Pubkey`           |
| 5… | `remaining`                  | `Vec<AccountMeta>` |

### `InitializeCustomizablePermissionlessLbPair`

Discriminator `2e2729876fb7c840` · data `InitializeCustomizablePermissionlessLbPair` · accounts `InitializeCustomizablePermissionlessLbPairInstructionAccounts`.

| Field    | Type                                        |
| -------- | ------------------------------------------- |
| `params` | [`CustomizableParams`](#customizableparams) |

Required accounts: 14; extras go to `remaining`.

Fields of `InitializeCustomizablePermissionlessLbPairInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `token_mint_x`               | `Pubkey`           |
| 3   | `token_mint_y`               | `Pubkey`           |
| 4   | `reserve_x`                  | `Pubkey`           |
| 5   | `reserve_y`                  | `Pubkey`           |
| 6   | `oracle`                     | `Pubkey`           |
| 7   | `user_token_x`               | `Pubkey`           |
| 8   | `funder`                     | `Pubkey`           |
| 9   | `token_program`              | `Pubkey`           |
| 10  | `system_program`             | `Pubkey`           |
| 11  | `user_token_y`               | `Pubkey`           |
| 12  | `event_authority`            | `Pubkey`           |
| 13  | `program`                    | `Pubkey`           |
| 14… | `remaining`                  | `Vec<AccountMeta>` |

### `InitializeCustomizablePermissionlessLbPair2`

Discriminator `f349817e3313f16b` · data `InitializeCustomizablePermissionlessLbPair2` · accounts `InitializeCustomizablePermissionlessLbPair2InstructionAccounts`.

| Field    | Type                                        |
| -------- | ------------------------------------------- |
| `params` | [`CustomizableParams`](#customizableparams) |

Required accounts: 17; extras go to `remaining`.

Fields of `InitializeCustomizablePermissionlessLbPair2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `token_mint_x`               | `Pubkey`           |
| 3   | `token_mint_y`               | `Pubkey`           |
| 4   | `reserve_x`                  | `Pubkey`           |
| 5   | `reserve_y`                  | `Pubkey`           |
| 6   | `oracle`                     | `Pubkey`           |
| 7   | `user_token_x`               | `Pubkey`           |
| 8   | `funder`                     | `Pubkey`           |
| 9   | `token_badge_x`              | `Option<Pubkey>`   |
| 10  | `token_badge_y`              | `Option<Pubkey>`   |
| 11  | `token_program_x`            | `Pubkey`           |
| 12  | `token_program_y`            | `Pubkey`           |
| 13  | `system_program`             | `Pubkey`           |
| 14  | `user_token_y`               | `Pubkey`           |
| 15  | `event_authority`            | `Pubkey`           |
| 16  | `program`                    | `Pubkey`           |
| 17… | `remaining`                  | `Vec<AccountMeta>` |

### `InitializeLbPair`

Discriminator `2d9aedd2dd0fa65c` · data `InitializeLbPair` · accounts `InitializeLbPairInstructionAccounts`.

| Field       | Type  |
| ----------- | ----- |
| `active_id` | `i32` |
| `bin_step`  | `u16` |

Required accounts: 14; extras go to `remaining`.

Fields of `InitializeLbPairInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `token_mint_x`               | `Pubkey`           |
| 3   | `token_mint_y`               | `Pubkey`           |
| 4   | `reserve_x`                  | `Pubkey`           |
| 5   | `reserve_y`                  | `Pubkey`           |
| 6   | `oracle`                     | `Pubkey`           |
| 7   | `preset_parameter`           | `Pubkey`           |
| 8   | `funder`                     | `Pubkey`           |
| 9   | `token_program`              | `Pubkey`           |
| 10  | `system_program`             | `Pubkey`           |
| 11  | `rent`                       | `Pubkey`           |
| 12  | `event_authority`            | `Pubkey`           |
| 13  | `program`                    | `Pubkey`           |
| 14… | `remaining`                  | `Vec<AccountMeta>` |

### `InitializeLbPair2`

Discriminator `493b2478ed536cc6` · data `InitializeLbPair2` · accounts `InitializeLbPair2InstructionAccounts`.

| Field    | Type                                                  |
| -------- | ----------------------------------------------------- |
| `params` | [`InitializeLbPair2Params`](#initializelbpair2params) |

Required accounts: 16; extras go to `remaining`.

Fields of `InitializeLbPair2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `token_mint_x`               | `Pubkey`           |
| 3   | `token_mint_y`               | `Pubkey`           |
| 4   | `reserve_x`                  | `Pubkey`           |
| 5   | `reserve_y`                  | `Pubkey`           |
| 6   | `oracle`                     | `Pubkey`           |
| 7   | `preset_parameter`           | `Pubkey`           |
| 8   | `funder`                     | `Pubkey`           |
| 9   | `token_badge_x`              | `Option<Pubkey>`   |
| 10  | `token_badge_y`              | `Option<Pubkey>`   |
| 11  | `token_program_x`            | `Pubkey`           |
| 12  | `token_program_y`            | `Pubkey`           |
| 13  | `system_program`             | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `InitializePermissionLbPair`

Discriminator `6c66d555fb033515` · data `InitializePermissionLbPair` · accounts `InitializePermissionLbPairInstructionAccounts`.

| Field     | Type                                            |
| --------- | ----------------------------------------------- |
| `ix_data` | [`InitPermissionPairIx`](#initpermissionpairix) |

Required accounts: 18; extras go to `remaining`.

Fields of `InitializePermissionLbPairInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `base`                       | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `token_mint_x`               | `Pubkey`           |
| 4   | `token_mint_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `oracle`                     | `Pubkey`           |
| 8   | `payer`                      | `Pubkey`           |
| 9   | `operator`                   | `Pubkey`           |
| 10  | `signer`                     | `Pubkey`           |
| 11  | `token_badge_x`              | `Option<Pubkey>`   |
| 12  | `token_badge_y`              | `Option<Pubkey>`   |
| 13  | `token_program_x`            | `Pubkey`           |
| 14  | `token_program_y`            | `Pubkey`           |
| 15  | `system_program`             | `Pubkey`           |
| 16  | `event_authority`            | `Pubkey`           |
| 17  | `program`                    | `Pubkey`           |
| 18… | `remaining`                  | `Vec<AccountMeta>` |

### `InitializePosition`

Discriminator `dbc0ea47bebf6650` · data `InitializePosition` · accounts `InitializePositionInstructionAccounts`.

| Field          | Type  |
| -------------- | ----- |
| `lower_bin_id` | `i32` |
| `width`        | `i32` |

Required accounts: 8; extras go to `remaining`.

Fields of `InitializePositionInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `payer`           | `Pubkey`           |
| 1  | `position`        | `Pubkey`           |
| 2  | `lb_pair`         | `Pubkey`           |
| 3  | `owner`           | `Pubkey`           |
| 4  | `system_program`  | `Pubkey`           |
| 5  | `rent`            | `Pubkey`           |
| 6  | `event_authority` | `Pubkey`           |
| 7  | `program`         | `Pubkey`           |
| 8… | `remaining`       | `Vec<AccountMeta>` |

### `InitializePosition2`

Discriminator `8f13f291d50f6873` · data `InitializePosition2` · accounts `InitializePosition2InstructionAccounts`.

| Field          | Type  |
| -------------- | ----- |
| `lower_bin_id` | `i32` |
| `width`        | `i32` |

Required accounts: 7; extras go to `remaining`.

Fields of `InitializePosition2InstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `payer`           | `Pubkey`           |
| 1  | `position`        | `Pubkey`           |
| 2  | `lb_pair`         | `Pubkey`           |
| 3  | `owner`           | `Pubkey`           |
| 4  | `system_program`  | `Pubkey`           |
| 5  | `event_authority` | `Pubkey`           |
| 6  | `program`         | `Pubkey`           |
| 7… | `remaining`       | `Vec<AccountMeta>` |

### `InitializePositionByOperator`

Discriminator `fbbdbef475fe2394` · data `InitializePositionByOperator` · accounts `InitializePositionByOperatorInstructionAccounts`.

| Field                | Type     |
| -------------------- | -------- |
| `lower_bin_id`       | `i32`    |
| `width`              | `i32`    |
| `fee_owner`          | `Pubkey` |
| `lock_release_point` | `u64`    |

Required accounts: 11; extras go to `remaining`.

Fields of `InitializePositionByOperatorInstructionAccounts`, in account order:

| #   | Field              | Type               |
| --- | ------------------ | ------------------ |
| 0   | `payer`            | `Pubkey`           |
| 1   | `base`             | `Pubkey`           |
| 2   | `position`         | `Pubkey`           |
| 3   | `lb_pair`          | `Pubkey`           |
| 4   | `owner`            | `Pubkey`           |
| 5   | `operator`         | `Pubkey`           |
| 6   | `operator_token_x` | `Pubkey`           |
| 7   | `owner_token_x`    | `Pubkey`           |
| 8   | `system_program`   | `Pubkey`           |
| 9   | `event_authority`  | `Pubkey`           |
| 10  | `program`          | `Pubkey`           |
| 11… | `remaining`        | `Vec<AccountMeta>` |

### `InitializePositionPda`

Discriminator `2e527d92558de499` · data `InitializePositionPda` · accounts `InitializePositionPdaInstructionAccounts`.

| Field          | Type  |
| -------------- | ----- |
| `lower_bin_id` | `i32` |
| `width`        | `i32` |

Required accounts: 9; extras go to `remaining`.

Fields of `InitializePositionPdaInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `payer`           | `Pubkey`           |
| 1  | `base`            | `Pubkey`           |
| 2  | `position`        | `Pubkey`           |
| 3  | `lb_pair`         | `Pubkey`           |
| 4  | `owner`           | `Pubkey`           |
| 5  | `system_program`  | `Pubkey`           |
| 6  | `rent`            | `Pubkey`           |
| 7  | `event_authority` | `Pubkey`           |
| 8  | `program`         | `Pubkey`           |
| 9… | `remaining`       | `Vec<AccountMeta>` |

### `InitializePresetParameter`

Discriminator `42bc47d3626d0eba` · data `InitializePresetParameter` · accounts `InitializePresetParameterInstructionAccounts`.

| Field | Type                                                |
| ----- | --------------------------------------------------- |
| `ix`  | [`InitPresetParametersIx`](#initpresetparametersix) |

Required accounts: 5; extras go to `remaining`.

Fields of `InitializePresetParameterInstructionAccounts`, in account order:

| #  | Field              | Type               |
| -- | ------------------ | ------------------ |
| 0  | `preset_parameter` | `Pubkey`           |
| 1  | `operator`         | `Pubkey`           |
| 2  | `signer`           | `Pubkey`           |
| 3  | `payer`            | `Pubkey`           |
| 4  | `system_program`   | `Pubkey`           |
| 5… | `remaining`        | `Vec<AccountMeta>` |

### `InitializeReward`

Discriminator `5f87c0c4f281e644` · data `InitializeReward` · accounts `InitializeRewardInstructionAccounts`.

| Field             | Type     |
| ----------------- | -------- |
| `reward_index`    | `u64`    |
| `reward_duration` | `u64`    |
| `funder`          | `Pubkey` |

Required accounts: 11; extras go to `remaining`.

Fields of `InitializeRewardInstructionAccounts`, in account order:

| #   | Field             | Type               |
| --- | ----------------- | ------------------ |
| 0   | `lb_pair`         | `Pubkey`           |
| 1   | `reward_vault`    | `Pubkey`           |
| 2   | `reward_mint`     | `Pubkey`           |
| 3   | `token_badge`     | `Option<Pubkey>`   |
| 4   | `operator`        | `Pubkey`           |
| 5   | `signer`          | `Pubkey`           |
| 6   | `payer`           | `Pubkey`           |
| 7   | `token_program`   | `Pubkey`           |
| 8   | `system_program`  | `Pubkey`           |
| 9   | `event_authority` | `Pubkey`           |
| 10  | `program`         | `Pubkey`           |
| 11… | `remaining`       | `Vec<AccountMeta>` |

### `InitializeTokenBadge`

Discriminator `fd4dcd5f1be059df` · data `InitializeTokenBadge` · accounts `InitializeTokenBadgeInstructionAccounts`.

No data fields.

Required accounts: 6; extras go to `remaining`.

Fields of `InitializeTokenBadgeInstructionAccounts`, in account order:

| #  | Field            | Type               |
| -- | ---------------- | ------------------ |
| 0  | `token_mint`     | `Pubkey`           |
| 1  | `token_badge`    | `Pubkey`           |
| 2  | `operator`       | `Pubkey`           |
| 3  | `signer`         | `Pubkey`           |
| 4  | `payer`          | `Pubkey`           |
| 5  | `system_program` | `Pubkey`           |
| 6… | `remaining`      | `Vec<AccountMeta>` |

### `PlaceLimitOrder`

Discriminator `6cb021ba92e501c5` · data `PlaceLimitOrder` · accounts `PlaceLimitOrderInstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `params`                  | [`PlaceLimitOrderParams`](#placelimitorderparams) |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 13; extras go to `remaining`.

Fields of `PlaceLimitOrderInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `reserve`                    | `Pubkey`           |
| 3   | `token_mint`                 | `Pubkey`           |
| 4   | `limit_order`                | `Pubkey`           |
| 5   | `payer`                      | `Pubkey`           |
| 6   | `owner`                      | `Pubkey`           |
| 7   | `user_token`                 | `Pubkey`           |
| 8   | `sender`                     | `Pubkey`           |
| 9   | `token_program`              | `Pubkey`           |
| 10  | `system_program`             | `Pubkey`           |
| 11  | `event_authority`            | `Pubkey`           |
| 12  | `program`                    | `Pubkey`           |
| 13… | `remaining`                  | `Vec<AccountMeta>` |

### `RebalanceLiquidity`

Discriminator `5c04b0c177b95309` · data `RebalanceLiquidity` · accounts `RebalanceLiquidityInstructionAccounts`.

| Field                     | Type                                                    |
| ------------------------- | ------------------------------------------------------- |
| `params`                  | [`RebalanceLiquidityParams`](#rebalanceliquidityparams) |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo)       |

Required accounts: 17; extras go to `remaining`.

Fields of `RebalanceLiquidityInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `owner`                      | `Pubkey`           |
| 10  | `rent_payer`                 | `Pubkey`           |
| 11  | `token_x_program`            | `Pubkey`           |
| 12  | `token_y_program`            | `Pubkey`           |
| 13  | `memo_program`               | `Pubkey`           |
| 14  | `system_program`             | `Pubkey`           |
| 15  | `event_authority`            | `Pubkey`           |
| 16  | `program`                    | `Pubkey`           |
| 17… | `remaining`                  | `Vec<AccountMeta>` |

### `RemoveAllLiquidity`

Discriminator `0a333d2370691855` · data `RemoveAllLiquidity` · accounts `RemoveAllLiquidityInstructionAccounts`.

No data fields.

Required accounts: 16; extras go to `remaining`.

Fields of `RemoveAllLiquidityInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `bin_array_lower`            | `Pubkey`           |
| 10  | `bin_array_upper`            | `Pubkey`           |
| 11  | `sender`                     | `Pubkey`           |
| 12  | `token_x_program`            | `Pubkey`           |
| 13  | `token_y_program`            | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `RemoveLiquidity`

Discriminator `5055d14818ceb16c` · data `RemoveLiquidity` · accounts `RemoveLiquidityInstructionAccounts`.

| Field                   | Type                                                   |
| ----------------------- | ------------------------------------------------------ |
| `bin_liquidity_removal` | [`Vec<BinLiquidityReduction>`](#binliquidityreduction) |

Required accounts: 16; extras go to `remaining`.

Fields of `RemoveLiquidityInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `bin_array_lower`            | `Pubkey`           |
| 10  | `bin_array_upper`            | `Pubkey`           |
| 11  | `sender`                     | `Pubkey`           |
| 12  | `token_x_program`            | `Pubkey`           |
| 13  | `token_y_program`            | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `RemoveLiquidity2`

Discriminator `e6d7527ff165e392` · data `RemoveLiquidity2` · accounts `RemoveLiquidity2InstructionAccounts`.

| Field                     | Type                                                   |
| ------------------------- | ------------------------------------------------------ |
| `bin_liquidity_removal`   | [`Vec<BinLiquidityReduction>`](#binliquidityreduction) |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo)      |

Required accounts: 15; extras go to `remaining`.

Fields of `RemoveLiquidity2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `sender`                     | `Pubkey`           |
| 10  | `token_x_program`            | `Pubkey`           |
| 11  | `token_y_program`            | `Pubkey`           |
| 12  | `memo_program`               | `Pubkey`           |
| 13  | `event_authority`            | `Pubkey`           |
| 14  | `program`                    | `Pubkey`           |
| 15… | `remaining`                  | `Vec<AccountMeta>` |

### `RemoveLiquidityByRange`

Discriminator `1a526698f04a691a` · data `RemoveLiquidityByRange` · accounts `RemoveLiquidityByRangeInstructionAccounts`.

| Field           | Type  |
| --------------- | ----- |
| `from_bin_id`   | `i32` |
| `to_bin_id`     | `i32` |
| `bps_to_remove` | `u16` |

Required accounts: 16; extras go to `remaining`.

Fields of `RemoveLiquidityByRangeInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `bin_array_lower`            | `Pubkey`           |
| 10  | `bin_array_upper`            | `Pubkey`           |
| 11  | `sender`                     | `Pubkey`           |
| 12  | `token_x_program`            | `Pubkey`           |
| 13  | `token_y_program`            | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `RemoveLiquidityByRange2`

Discriminator `cc02c391359191cd` · data `RemoveLiquidityByRange2` · accounts `RemoveLiquidityByRange2InstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `from_bin_id`             | `i32`                                             |
| `to_bin_id`               | `i32`                                             |
| `bps_to_remove`           | `u16`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 15; extras go to `remaining`.

Fields of `RemoveLiquidityByRange2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `position`                   | `Pubkey`           |
| 1   | `lb_pair`                    | `Pubkey`           |
| 2   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 3   | `user_token_x`               | `Pubkey`           |
| 4   | `user_token_y`               | `Pubkey`           |
| 5   | `reserve_x`                  | `Pubkey`           |
| 6   | `reserve_y`                  | `Pubkey`           |
| 7   | `token_x_mint`               | `Pubkey`           |
| 8   | `token_y_mint`               | `Pubkey`           |
| 9   | `sender`                     | `Pubkey`           |
| 10  | `token_x_program`            | `Pubkey`           |
| 11  | `token_y_program`            | `Pubkey`           |
| 12  | `memo_program`               | `Pubkey`           |
| 13  | `event_authority`            | `Pubkey`           |
| 14  | `program`                    | `Pubkey`           |
| 15… | `remaining`                  | `Vec<AccountMeta>` |

### `SetActivationPoint`

Discriminator `5bf90fa51a81fe7d` · data `SetActivationPoint` · accounts `SetActivationPointInstructionAccounts`.

| Field              | Type  |
| ------------------ | ----- |
| `activation_point` | `u64` |

Required accounts: 2; extras go to `remaining`.

Fields of `SetActivationPointInstructionAccounts`, in account order:

| #  | Field       | Type               |
| -- | ----------- | ------------------ |
| 0  | `lb_pair`   | `Pubkey`           |
| 1  | `signer`    | `Pubkey`           |
| 2… | `remaining` | `Vec<AccountMeta>` |

### `SetPairStatus`

Discriminator `43f8e7899a95d9ae` · data `SetPairStatus` · accounts `SetPairStatusInstructionAccounts`.

| Field    | Type |
| -------- | ---- |
| `status` | `u8` |

Required accounts: 3; extras go to `remaining`.

Fields of `SetPairStatusInstructionAccounts`, in account order:

| #  | Field       | Type               |
| -- | ----------- | ------------------ |
| 0  | `lb_pair`   | `Pubkey`           |
| 1  | `operator`  | `Pubkey`           |
| 2  | `signer`    | `Pubkey`           |
| 3… | `remaining` | `Vec<AccountMeta>` |

### `SetPairStatusPermissionless`

Discriminator `4e3b98d346b72ed0` · data `SetPairStatusPermissionless` · accounts `SetPairStatusPermissionlessInstructionAccounts`.

| Field    | Type |
| -------- | ---- |
| `status` | `u8` |

Required accounts: 2; extras go to `remaining`.

Fields of `SetPairStatusPermissionlessInstructionAccounts`, in account order:

| #  | Field       | Type               |
| -- | ----------- | ------------------ |
| 0  | `lb_pair`   | `Pubkey`           |
| 1  | `signer`    | `Pubkey`           |
| 2… | `remaining` | `Vec<AccountMeta>` |

### `SetPermissionlessOperationBits`

Discriminator `543acb8ba351beba` · data `SetPermissionlessOperationBits` · accounts `SetPermissionlessOperationBitsInstructionAccounts`.

| Field  | Type |
| ------ | ---- |
| `bits` | `u8` |

Required accounts: 4; extras go to `remaining`.

Fields of `SetPermissionlessOperationBitsInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `position`        | `Pubkey`           |
| 1  | `owner`           | `Pubkey`           |
| 2  | `event_authority` | `Pubkey`           |
| 3  | `program`         | `Pubkey`           |
| 4… | `remaining`       | `Vec<AccountMeta>` |

### `SetPreActivationDuration`

Discriminator `a53dc9f4829f1664` · data `SetPreActivationDuration` · accounts `SetPreActivationDurationInstructionAccounts`.

| Field                     | Type  |
| ------------------------- | ----- |
| `pre_activation_duration` | `u64` |

Required accounts: 2; extras go to `remaining`.

Fields of `SetPreActivationDurationInstructionAccounts`, in account order:

| #  | Field       | Type               |
| -- | ----------- | ------------------ |
| 0  | `lb_pair`   | `Pubkey`           |
| 1  | `signer`    | `Pubkey`           |
| 2… | `remaining` | `Vec<AccountMeta>` |

### `SetPreActivationSwapAddress`

Discriminator `398b2f7bd850df0a` · data `SetPreActivationSwapAddress` · accounts `SetPreActivationSwapAddressInstructionAccounts`.

| Field                         | Type     |
| ----------------------------- | -------- |
| `pre_activation_swap_address` | `Pubkey` |

Required accounts: 2; extras go to `remaining`.

Fields of `SetPreActivationSwapAddressInstructionAccounts`, in account order:

| #  | Field       | Type               |
| -- | ----------- | ------------------ |
| 0  | `lb_pair`   | `Pubkey`           |
| 1  | `signer`    | `Pubkey`           |
| 2… | `remaining` | `Vec<AccountMeta>` |

### `Swap`

Discriminator `f8c69e91e17587c8` · data `Swap` · accounts `SwapInstructionAccounts`.

| Field            | Type  |
| ---------------- | ----- |
| `amount_in`      | `u64` |
| `min_amount_out` | `u64` |

Required accounts: 15; extras go to `remaining`.

Fields of `SwapInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `reserve_x`                  | `Pubkey`           |
| 3   | `reserve_y`                  | `Pubkey`           |
| 4   | `user_token_in`              | `Pubkey`           |
| 5   | `user_token_out`             | `Pubkey`           |
| 6   | `token_x_mint`               | `Pubkey`           |
| 7   | `token_y_mint`               | `Pubkey`           |
| 8   | `oracle`                     | `Pubkey`           |
| 9   | `host_fee_in`                | `Option<Pubkey>`   |
| 10  | `user`                       | `Pubkey`           |
| 11  | `token_x_program`            | `Pubkey`           |
| 12  | `token_y_program`            | `Pubkey`           |
| 13  | `event_authority`            | `Pubkey`           |
| 14  | `program`                    | `Pubkey`           |
| 15… | `remaining`                  | `Vec<AccountMeta>` |

### `Swap2`

Discriminator `414b3f4ceb5b5b88` · data `Swap2` · accounts `Swap2InstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `amount_in`               | `u64`                                             |
| `min_amount_out`          | `u64`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 16; extras go to `remaining`.

Fields of `Swap2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `reserve_x`                  | `Pubkey`           |
| 3   | `reserve_y`                  | `Pubkey`           |
| 4   | `user_token_in`              | `Pubkey`           |
| 5   | `user_token_out`             | `Pubkey`           |
| 6   | `token_x_mint`               | `Pubkey`           |
| 7   | `token_y_mint`               | `Pubkey`           |
| 8   | `oracle`                     | `Pubkey`           |
| 9   | `host_fee_in`                | `Option<Pubkey>`   |
| 10  | `user`                       | `Pubkey`           |
| 11  | `token_x_program`            | `Pubkey`           |
| 12  | `token_y_program`            | `Pubkey`           |
| 13  | `memo_program`               | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `SwapExactOut`

Discriminator `fa49652126cf4bb8` · data `SwapExactOut` · accounts `SwapExactOutInstructionAccounts`.

| Field           | Type  |
| --------------- | ----- |
| `max_in_amount` | `u64` |
| `out_amount`    | `u64` |

Required accounts: 15; extras go to `remaining`.

Fields of `SwapExactOutInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `reserve_x`                  | `Pubkey`           |
| 3   | `reserve_y`                  | `Pubkey`           |
| 4   | `user_token_in`              | `Pubkey`           |
| 5   | `user_token_out`             | `Pubkey`           |
| 6   | `token_x_mint`               | `Pubkey`           |
| 7   | `token_y_mint`               | `Pubkey`           |
| 8   | `oracle`                     | `Pubkey`           |
| 9   | `host_fee_in`                | `Option<Pubkey>`   |
| 10  | `user`                       | `Pubkey`           |
| 11  | `token_x_program`            | `Pubkey`           |
| 12  | `token_y_program`            | `Pubkey`           |
| 13  | `event_authority`            | `Pubkey`           |
| 14  | `program`                    | `Pubkey`           |
| 15… | `remaining`                  | `Vec<AccountMeta>` |

### `SwapExactOut2`

Discriminator `2bd7f784893cf351` · data `SwapExactOut2` · accounts `SwapExactOut2InstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `max_in_amount`           | `u64`                                             |
| `out_amount`              | `u64`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 16; extras go to `remaining`.

Fields of `SwapExactOut2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `reserve_x`                  | `Pubkey`           |
| 3   | `reserve_y`                  | `Pubkey`           |
| 4   | `user_token_in`              | `Pubkey`           |
| 5   | `user_token_out`             | `Pubkey`           |
| 6   | `token_x_mint`               | `Pubkey`           |
| 7   | `token_y_mint`               | `Pubkey`           |
| 8   | `oracle`                     | `Pubkey`           |
| 9   | `host_fee_in`                | `Option<Pubkey>`   |
| 10  | `user`                       | `Pubkey`           |
| 11  | `token_x_program`            | `Pubkey`           |
| 12  | `token_y_program`            | `Pubkey`           |
| 13  | `memo_program`               | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `SwapWithPriceImpact`

Discriminator `38ade6d0ade49ccd` · data `SwapWithPriceImpact` · accounts `SwapWithPriceImpactInstructionAccounts`.

| Field                  | Type          |
| ---------------------- | ------------- |
| `amount_in`            | `u64`         |
| `active_id`            | `Option<i32>` |
| `max_price_impact_bps` | `u16`         |

Required accounts: 15; extras go to `remaining`.

Fields of `SwapWithPriceImpactInstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `reserve_x`                  | `Pubkey`           |
| 3   | `reserve_y`                  | `Pubkey`           |
| 4   | `user_token_in`              | `Pubkey`           |
| 5   | `user_token_out`             | `Pubkey`           |
| 6   | `token_x_mint`               | `Pubkey`           |
| 7   | `token_y_mint`               | `Pubkey`           |
| 8   | `oracle`                     | `Pubkey`           |
| 9   | `host_fee_in`                | `Option<Pubkey>`   |
| 10  | `user`                       | `Pubkey`           |
| 11  | `token_x_program`            | `Pubkey`           |
| 12  | `token_y_program`            | `Pubkey`           |
| 13  | `event_authority`            | `Pubkey`           |
| 14  | `program`                    | `Pubkey`           |
| 15… | `remaining`                  | `Vec<AccountMeta>` |

### `SwapWithPriceImpact2`

Discriminator `4a62c0d6b1334b33` · data `SwapWithPriceImpact2` · accounts `SwapWithPriceImpact2InstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `amount_in`               | `u64`                                             |
| `active_id`               | `Option<i32>`                                     |
| `max_price_impact_bps`    | `u16`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 16; extras go to `remaining`.

Fields of `SwapWithPriceImpact2InstructionAccounts`, in account order:

| #   | Field                        | Type               |
| --- | ---------------------------- | ------------------ |
| 0   | `lb_pair`                    | `Pubkey`           |
| 1   | `bin_array_bitmap_extension` | `Option<Pubkey>`   |
| 2   | `reserve_x`                  | `Pubkey`           |
| 3   | `reserve_y`                  | `Pubkey`           |
| 4   | `user_token_in`              | `Pubkey`           |
| 5   | `user_token_out`             | `Pubkey`           |
| 6   | `token_x_mint`               | `Pubkey`           |
| 7   | `token_y_mint`               | `Pubkey`           |
| 8   | `oracle`                     | `Pubkey`           |
| 9   | `host_fee_in`                | `Option<Pubkey>`   |
| 10  | `user`                       | `Pubkey`           |
| 11  | `token_x_program`            | `Pubkey`           |
| 12  | `token_y_program`            | `Pubkey`           |
| 13  | `memo_program`               | `Pubkey`           |
| 14  | `event_authority`            | `Pubkey`           |
| 15  | `program`                    | `Pubkey`           |
| 16… | `remaining`                  | `Vec<AccountMeta>` |

### `UpdateBaseFeeParameters`

Discriminator `4ba8dfa110c3032f` · data `UpdateBaseFeeParameters` · accounts `UpdateBaseFeeParametersInstructionAccounts`.

| Field           | Type                                    |
| --------------- | --------------------------------------- |
| `fee_parameter` | [`BaseFeeParameter`](#basefeeparameter) |

Required accounts: 5; extras go to `remaining`.

Fields of `UpdateBaseFeeParametersInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `lb_pair`         | `Pubkey`           |
| 1  | `operator`        | `Pubkey`           |
| 2  | `signer`          | `Pubkey`           |
| 3  | `event_authority` | `Pubkey`           |
| 4  | `program`         | `Pubkey`           |
| 5… | `remaining`       | `Vec<AccountMeta>` |

### `UpdateDynamicFeeParameters`

Discriminator `5ca12ef6ffbd1616` · data `UpdateDynamicFeeParameters` · accounts `UpdateDynamicFeeParametersInstructionAccounts`.

| Field           | Type                                          |
| --------------- | --------------------------------------------- |
| `fee_parameter` | [`DynamicFeeParameter`](#dynamicfeeparameter) |

Required accounts: 5; extras go to `remaining`.

Fields of `UpdateDynamicFeeParametersInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `lb_pair`         | `Pubkey`           |
| 1  | `operator`        | `Pubkey`           |
| 2  | `signer`          | `Pubkey`           |
| 3  | `event_authority` | `Pubkey`           |
| 4  | `program`         | `Pubkey`           |
| 5… | `remaining`       | `Vec<AccountMeta>` |

### `UpdateFeesAndReward2`

Discriminator `208eb89a6741b858` · data `UpdateFeesAndReward2` · accounts `UpdateFeesAndReward2InstructionAccounts`.

| Field        | Type  |
| ------------ | ----- |
| `min_bin_id` | `i32` |
| `max_bin_id` | `i32` |

Required accounts: 3; extras go to `remaining`.

Fields of `UpdateFeesAndReward2InstructionAccounts`, in account order:

| #  | Field       | Type               |
| -- | ----------- | ------------------ |
| 0  | `position`  | `Pubkey`           |
| 1  | `lb_pair`   | `Pubkey`           |
| 2  | `owner`     | `Pubkey`           |
| 3… | `remaining` | `Vec<AccountMeta>` |

### `UpdateFeesAndRewards`

Discriminator `9ae6fa0decd14bdf` · data `UpdateFeesAndRewards` · accounts `UpdateFeesAndRewardsInstructionAccounts`.

No data fields.

Required accounts: 5; extras go to `remaining`.

Fields of `UpdateFeesAndRewardsInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `position`        | `Pubkey`           |
| 1  | `lb_pair`         | `Pubkey`           |
| 2  | `bin_array_lower` | `Pubkey`           |
| 3  | `bin_array_upper` | `Pubkey`           |
| 4  | `owner`           | `Pubkey`           |
| 5… | `remaining`       | `Vec<AccountMeta>` |

### `UpdatePositionOperator`

Discriminator `cab8678fb4bf74d9` · data `UpdatePositionOperator` · accounts `UpdatePositionOperatorInstructionAccounts`.

| Field      | Type     |
| ---------- | -------- |
| `operator` | `Pubkey` |

Required accounts: 4; extras go to `remaining`.

Fields of `UpdatePositionOperatorInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `position`        | `Pubkey`           |
| 1  | `owner`           | `Pubkey`           |
| 2  | `event_authority` | `Pubkey`           |
| 3  | `program`         | `Pubkey`           |
| 4… | `remaining`       | `Vec<AccountMeta>` |

### `UpdateRewardDuration`

Discriminator `8aaec4a9d5ebfe6b` · data `UpdateRewardDuration` · accounts `UpdateRewardDurationInstructionAccounts`.

| Field          | Type  |
| -------------- | ----- |
| `reward_index` | `u64` |
| `new_duration` | `u64` |

Required accounts: 6; extras go to `remaining`.

Fields of `UpdateRewardDurationInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `lb_pair`         | `Pubkey`           |
| 1  | `operator`        | `Pubkey`           |
| 2  | `signer`          | `Pubkey`           |
| 3  | `bin_array`       | `Pubkey`           |
| 4  | `event_authority` | `Pubkey`           |
| 5  | `program`         | `Pubkey`           |
| 6… | `remaining`       | `Vec<AccountMeta>` |

### `UpdateRewardFunder`

Discriminator `d31c3020d7a02317` · data `UpdateRewardFunder` · accounts `UpdateRewardFunderInstructionAccounts`.

| Field          | Type     |
| -------------- | -------- |
| `reward_index` | `u64`    |
| `new_funder`   | `Pubkey` |

Required accounts: 5; extras go to `remaining`.

Fields of `UpdateRewardFunderInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `lb_pair`         | `Pubkey`           |
| 1  | `operator`        | `Pubkey`           |
| 2  | `signer`          | `Pubkey`           |
| 3  | `event_authority` | `Pubkey`           |
| 4  | `program`         | `Pubkey`           |
| 5… | `remaining`       | `Vec<AccountMeta>` |

### `WithdrawIneligibleReward`

Discriminator `94ce2ac3f7316708` · data `WithdrawIneligibleReward` · accounts `WithdrawIneligibleRewardInstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `reward_index`            | `u64`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 10; extras go to `remaining`.

Fields of `WithdrawIneligibleRewardInstructionAccounts`, in account order:

| #   | Field                  | Type               |
| --- | ---------------------- | ------------------ |
| 0   | `lb_pair`              | `Pubkey`           |
| 1   | `reward_vault`         | `Pubkey`           |
| 2   | `reward_mint`          | `Pubkey`           |
| 3   | `funder_token_account` | `Pubkey`           |
| 4   | `funder`               | `Pubkey`           |
| 5   | `bin_array`            | `Pubkey`           |
| 6   | `token_program`        | `Pubkey`           |
| 7   | `memo_program`         | `Pubkey`           |
| 8   | `event_authority`      | `Pubkey`           |
| 9   | `program`              | `Pubkey`           |
| 10… | `remaining`            | `Vec<AccountMeta>` |

### `WithdrawProtocolFee`

Discriminator `9ec99ebd215da267` · data `WithdrawProtocolFee` · accounts `WithdrawProtocolFeeInstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `max_amount_x`            | `u64`                                             |
| `max_amount_y`            | `u64`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 11; extras go to `remaining`.

Fields of `WithdrawProtocolFeeInstructionAccounts`, in account order:

| #   | Field              | Type               |
| --- | ------------------ | ------------------ |
| 0   | `lb_pair`          | `Pubkey`           |
| 1   | `reserve_x`        | `Pubkey`           |
| 2   | `reserve_y`        | `Pubkey`           |
| 3   | `token_x_mint`     | `Pubkey`           |
| 4   | `token_y_mint`     | `Pubkey`           |
| 5   | `receiver_token_x` | `Pubkey`           |
| 6   | `receiver_token_y` | `Pubkey`           |
| 7   | `operator`         | `Pubkey`           |
| 8   | `signer`           | `Pubkey`           |
| 9   | `token_x_program`  | `Pubkey`           |
| 10  | `token_y_program`  | `Pubkey`           |
| 11… | `remaining`        | `Vec<AccountMeta>` |

### `ZapProtocolFee`

Discriminator `d59bbb2238b65bf0` · data `ZapProtocolFee` · accounts `ZapProtocolFeeInstructionAccounts`.

| Field                     | Type                                              |
| ------------------------- | ------------------------------------------------- |
| `max_amount`              | `u64`                                             |
| `remaining_accounts_info` | [`RemainingAccountsInfo`](#remainingaccountsinfo) |

Required accounts: 8; extras go to `remaining`.

Fields of `ZapProtocolFeeInstructionAccounts`, in account order:

| #  | Field                 | Type               |
| -- | --------------------- | ------------------ |
| 0  | `lb_pair`             | `Pubkey`           |
| 1  | `reserve`             | `Pubkey`           |
| 2  | `token_mint`          | `Pubkey`           |
| 3  | `receiver_token`      | `Pubkey`           |
| 4  | `operator`            | `Pubkey`           |
| 5  | `signer`              | `Pubkey`           |
| 6  | `token_program`       | `Pubkey`           |
| 7  | `sysvar_instructions` | `Pubkey`           |
| 8… | `remaining`           | `Vec<AccountMeta>` |

### `CpiEvent`

Anchor self-CPI that carries one of the program's [events](#events). `data` is the `CpiEvent` enum.

Discriminator `e445a52e51cb9a1d` · data `CpiEvent` · accounts `CpiEventInstructionAccounts`.

Required accounts: 2; extras go to `remaining`.

Fields of `CpiEventInstructionAccounts`, in account order:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `program`         | `Pubkey`           |
| 1  | `event_authority` | `Pubkey`           |
| 2… | `remaining`       | `Vec<AccountMeta>` |

## Accounts

Variants of `MeteoraDlmmAccount`. Each wraps a boxed struct from `carbon_meteora_dlmm_decoder::accounts::<module>`. `decode_account` only considers accounts owned by `PROGRAM_ID` and returns the first variant that matches.

### `BinArray`

Discriminator `5c8e5cdc059446b5` · `accounts::bin_array::BinArray`.

| Field      | Type                |
| ---------- | ------------------- |
| `index`    | `i64`               |
| `version`  | `u8`                |
| `padding1` | `[u8; 7]`           |
| `lb_pair`  | `Pubkey`            |
| `bins`     | [`[Bin; 70]`](#bin) |

### `BinArrayBitmapExtension`

Discriminator `506f7c7137ed1205` · `accounts::bin_array_bitmap_extension::BinArrayBitmapExtension`.

| Field                       | Type             | Description                                                        |
| --------------------------- | ---------------- | ------------------------------------------------------------------ |
| `lb_pair`                   | `Pubkey`         |                                                                    |
| `positive_bin_array_bitmap` | `[[u64; 8]; 12]` | Packed initialized bin array state for start_bin_index is positive |
| `negative_bin_array_bitmap` | `[[u64; 8]; 12]` | Packed initialized bin array state for start_bin_index is negative |

### `ClaimFeeOperator`

Discriminator `a630865622c8bc96` · `accounts::claim_fee_operator::ClaimFeeOperator`.

| Field      | Type        | Description |
| ---------- | ----------- | ----------- |
| `operator` | `Pubkey`    | operator    |
| `padding`  | `[u8; 128]` | Reserve     |

### `DummyZcAccount`

Discriminator `5e6bee50d030b408` · `accounts::dummy_zc_account::DummyZcAccount`.

| Field               | Type                                  |
| ------------------- | ------------------------------------- |
| `position_bin_data` | [`PositionBinData`](#positionbindata) |

### `LbPair`

Discriminator `210b3162b565b10d` · `accounts::lb_pair::LbPair`.

| Field                         | Type                                        | Description                                                                                                                                                                                  |
| ----------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters`                  | [`StaticParameters`](#staticparameters)     |                                                                                                                                                                                              |
| `v_parameters`                | [`VariableParameters`](#variableparameters) |                                                                                                                                                                                              |
| `bump_seed`                   | `[u8; 1]`                                   |                                                                                                                                                                                              |
| `bin_step_seed`               | `[u8; 2]`                                   | Bin step signer seed                                                                                                                                                                         |
| `pair_type`                   | `u8`                                        | Type of the pair                                                                                                                                                                             |
| `active_id`                   | `i32`                                       | Active bin id                                                                                                                                                                                |
| `bin_step`                    | `u16`                                       | Bin step. Represent the price increment / decrement.                                                                                                                                         |
| `status`                      | `u8`                                        | Status of the pair. Check PairStatus enum.                                                                                                                                                   |
| `require_base_factor_seed`    | `u8`                                        | Require base factor seed                                                                                                                                                                     |
| `base_factor_seed`            | `[u8; 2]`                                   | Base factor seed                                                                                                                                                                             |
| `activation_type`             | `u8`                                        | Activation type                                                                                                                                                                              |
| `creator_pool_on_off_control` | `u8`                                        | Allow pool creator to enable/disable pool with restricted validation. Only applicable for customizable permissionless pair type.                                                             |
| `token_x_mint`                | `Pubkey`                                    | Token X mint                                                                                                                                                                                 |
| `token_y_mint`                | `Pubkey`                                    | Token Y mint                                                                                                                                                                                 |
| `reserve_x`                   | `Pubkey`                                    | LB token X vault                                                                                                                                                                             |
| `reserve_y`                   | `Pubkey`                                    | LB token Y vault                                                                                                                                                                             |
| `protocol_fee`                | [`ProtocolFee`](#protocolfee)               | Uncollected protocol fee                                                                                                                                                                     |
| `padding1`                    | `[u8; 32]`                                  | padding 1                                                                                                                                                                                    |
| `reward_infos`                | [`[RewardInfo; 2]`](#rewardinfo)            | Farming reward information                                                                                                                                                                   |
| `oracle`                      | `Pubkey`                                    | Oracle pubkey                                                                                                                                                                                |
| `bin_array_bitmap`            | `[u64; 16]`                                 | Packed initialized bin array state                                                                                                                                                           |
| `last_updated_at`             | `i64`                                       | Last time the pool fee parameter was updated                                                                                                                                                 |
| `padding2`                    | `[u8; 32]`                                  | \_padding_2                                                                                                                                                                                  |
| `pre_activation_swap_address` | `Pubkey`                                    | Address allowed to swap when the current point is greater than or equal to the pre-activation point. The pre-activation point is calculated as `activation_point - pre_activation_duration`. |
| `base_key`                    | `Pubkey`                                    | Base keypair. Only required for permission pair                                                                                                                                              |
| `activation_point`            | `u64`                                       | Time point to enable the pair. Only applicable for permission pair.                                                                                                                          |
| `pre_activation_duration`     | `u64`                                       | Duration before activation activation_point. Used to calculate pre-activation time point for pre_activation_swap_address                                                                     |
| `padding3`                    | `[u8; 8]`                                   | \_padding 3                                                                                                                                                                                  |
| `padding4`                    | `u64`                                       | \_padding_4                                                                                                                                                                                  |
| `creator`                     | `Pubkey`                                    | Pool creator                                                                                                                                                                                 |
| `token_mint_x_program_flag`   | `u8`                                        | token_mint_x_program_flag                                                                                                                                                                    |
| `token_mint_y_program_flag`   | `u8`                                        | token_mint_y_program_flag                                                                                                                                                                    |
| `version`                     | `u8`                                        | version to know whether we have reset tombstone fields                                                                                                                                       |
| `reserved`                    | `[u8; 21]`                                  | Reserved space for future use                                                                                                                                                                |

### `LimitOrder`

Discriminator `89b7d45b731d8de3` · `accounts::limit_order::LimitOrder`.

| Field       | Type       | Description                                                 |
| ----------- | ---------- | ----------------------------------------------------------- |
| `lb_pair`   | `Pubkey`   | The LB pair of this LO                                      |
| `owner`     | `Pubkey`   | Owner of the LO. Client rely on this to to fetch their LOs. |
| `bin_count` | `u16`      | Bin count                                                   |
| `padding0`  | `[u8; 14]` | Padding                                                     |
| `padding1`  | `[u64; 4]` | Reserved space for future use                               |

### `Operator`

Discriminator `db1fbc91458bcc75` · `accounts::operator::Operator`.

| Field        | Type       |
| ------------ | ---------- |
| `signer`     | `Pubkey`   |
| `permission` | `u128`     |
| `padding`    | `[u64; 2]` |

### `Oracle`

Discriminator `8bc283b38cb3e5f4` · `accounts::oracle::Oracle`.

| Field         | Type  | Description                                                      |
| ------------- | ----- | ---------------------------------------------------------------- |
| `idx`         | `u64` | Index of latest observation                                      |
| `active_size` | `u64` | Size of active sample. Active sample is initialized observation. |
| `length`      | `u64` | Number of observations                                           |

### `PositionV2`

Discriminator `75b0d4c7f5b485b6` · `accounts::position_v2::PositionV2`.

| Field                           | Type                                      | Description                                                                                                |
| ------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `lb_pair`                       | `Pubkey`                                  | The LB pair of this position                                                                               |
| `owner`                         | `Pubkey`                                  | Owner of the position. Client rely on this to to fetch their positions.                                    |
| `liquidity_shares`              | `[u128; 70]`                              | Liquidity shares of this position in bins (lower_bin_id <-> upper_bin_id). This is the same as LP concept. |
| `reward_infos`                  | [`[UserRewardInfo; 70]`](#userrewardinfo) | Farming reward information                                                                                 |
| `fee_infos`                     | [`[FeeInfo; 70]`](#feeinfo)               | Swap fee to claim information                                                                              |
| `lower_bin_id`                  | `i32`                                     | Lower bin ID                                                                                               |
| `upper_bin_id`                  | `i32`                                     | Upper bin ID                                                                                               |
| `last_updated_at`               | `i64`                                     | Last updated timestamp                                                                                     |
| `total_claimed_fee_x_amount`    | `u64`                                     | Total claimed token fee X                                                                                  |
| `total_claimed_fee_y_amount`    | `u64`                                     | Total claimed token fee Y                                                                                  |
| `total_claimed_rewards`         | `[u64; 2]`                                | Total claimed rewards                                                                                      |
| `operator`                      | `Pubkey`                                  | Operator of position                                                                                       |
| `lock_release_point`            | `u64`                                     | Time point which the locked liquidity can be withdraw                                                      |
| `padding0`                      | `u8`                                      | \_padding_0, previous subjected_to_bootstrap_liquidity_locking, BE CAREFUL FOR TOMBSTONE WHEN REUSE !!     |
| `fee_owner`                     | `Pubkey`                                  | Address is able to claim fee in this position, only valid for bootstrap_liquidity_position                 |
| `version`                       | `u8`                                      | version to know whether we have reset tombstone fields                                                     |
| `permissionless_operation_bits` | `u8`                                      |                                                                                                            |
| `reserved`                      | `[u8; 85]`                                | Reserved space for future use                                                                              |

### `PresetParameter`

Discriminator `f23ef422b5703aaa` · `accounts::preset_parameter::PresetParameter`.

| Field                        | Type  | Description                                                                                                                                 |
| ---------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `bin_step`                   | `u16` | Bin step. Represent the price increment / decrement.                                                                                        |
| `base_factor`                | `u16` | Used for base fee calculation. base_fee_rate = base_factor \* bin_step \* 10 \* 10^base_fee_power_factor                                    |
| `filter_period`              | `u16` | Filter period determine high frequency trading time window.                                                                                 |
| `decay_period`               | `u16` | Decay period determine when the volatile fee start decay / decrease.                                                                        |
| `reduction_factor`           | `u16` | Reduction factor controls the volatile fee rate decrement rate.                                                                             |
| `variable_fee_control`       | `u32` | Used to scale the variable fee component depending on the dynamic of the market                                                             |
| `max_volatility_accumulator` | `u32` | Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.                                                            |
| `min_bin_id`                 | `i32` | Min bin id supported by the pool based on the configured bin step.                                                                          |
| `max_bin_id`                 | `i32` | Max bin id supported by the pool based on the configured bin step.                                                                          |
| `protocol_share`             | `u16` | Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share \* total_swap_fee |

### `PresetParameter2`

Discriminator `abec9473a271deae` · `accounts::preset_parameter2::PresetParameter2`.

| Field                        | Type        | Description                                                                                                                                 |
| ---------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `bin_step`                   | `u16`       | Bin step. Represent the price increment / decrement.                                                                                        |
| `base_factor`                | `u16`       | Used for base fee calculation. base_fee_rate = base_factor \* bin_step \* 10 \* 10^base_fee_power_factor                                    |
| `filter_period`              | `u16`       | Filter period determine high frequency trading time window.                                                                                 |
| `decay_period`               | `u16`       | Decay period determine when the volatile fee start decay / decrease.                                                                        |
| `variable_fee_control`       | `u32`       | Used to scale the variable fee component depending on the dynamic of the market                                                             |
| `max_volatility_accumulator` | `u32`       | Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.                                                            |
| `reduction_factor`           | `u16`       | Reduction factor controls the volatile fee rate decrement rate.                                                                             |
| `protocol_share`             | `u16`       | Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share \* total_swap_fee |
| `index`                      | `u16`       | index                                                                                                                                       |
| `base_fee_power_factor`      | `u8`        | Base fee power factor                                                                                                                       |
| `concrete_function_type`     | `u8`        | function type, to check whether the pool should have LM farming or other functions in the future, refer ConcreteFunctionType                |
| `collect_fee_mode`           | `u8`        | collect fee mode                                                                                                                            |
| `padding0`                   | `[u8; 7]`   |                                                                                                                                             |
| `padding1`                   | `[u64; 19]` | Padding 1 for future use                                                                                                                    |

### `TokenBadge`

Discriminator `74dbcce5f974ff96` · `accounts::token_badge::TokenBadge`.

| Field        | Type        | Description |
| ------------ | ----------- | ----------- |
| `token_mint` | `Pubkey`    | token mint  |
| `padding`    | `[u8; 128]` | Reserve     |

## Events

Variants of `instructions::CpiEvent`, decoded from the `CpiEvent` instruction. Each wraps a struct from `carbon_meteora_dlmm_decoder::events::<module>`. The discriminator is the 8-byte event discriminator that follows the `e445a52e51cb9a1d` CPI-event tag.

### `AddLiquidity`

Discriminator `1f5e7d5ae3343dba` · `events::add_liquidity::AddLiquidityEvent`.

| Field           | Type       |
| --------------- | ---------- |
| `lb_pair`       | `Pubkey`   |
| `from`          | `Pubkey`   |
| `position`      | `Pubkey`   |
| `amounts`       | `[u64; 2]` |
| `active_bin_id` | `i32`      |

### `CancelLimitOrderEvt`

Discriminator `83eac285090ebdd1` · `events::cancel_limit_order_evt::CancelLimitOrderEvtEvent`.

| Field         | Type       |
| ------------- | ---------- |
| `lb_pair`     | `Pubkey`   |
| `from`        | `Pubkey`   |
| `limit_order` | `Pubkey`   |
| `amounts`     | `[u64; 2]` |
| `active_id`   | `i32`      |
| `bins`        | `Vec<i32>` |

### `ClaimFee`

Discriminator `4b7a9a308c4a7ba3` · `events::claim_fee::ClaimFeeEvent`.

| Field      | Type     |
| ---------- | -------- |
| `lb_pair`  | `Pubkey` |
| `position` | `Pubkey` |
| `owner`    | `Pubkey` |
| `fee_x`    | `u64`    |
| `fee_y`    | `u64`    |

### `ClaimFee2`

Discriminator `e8abf2613a4d232d` · `events::claim_fee2::ClaimFee2Event`.

| Field           | Type     |
| --------------- | -------- |
| `lb_pair`       | `Pubkey` |
| `position`      | `Pubkey` |
| `owner`         | `Pubkey` |
| `fee_x`         | `u64`    |
| `fee_y`         | `u64`    |
| `active_bin_id` | `i32`    |

### `ClaimReward`

Discriminator `947486cc16ab555f` · `events::claim_reward::ClaimRewardEvent`.

| Field          | Type     |
| -------------- | -------- |
| `lb_pair`      | `Pubkey` |
| `position`     | `Pubkey` |
| `owner`        | `Pubkey` |
| `reward_index` | `u64`    |
| `total_reward` | `u64`    |

### `ClaimReward2`

Discriminator `1b8ff421502b6e92` · `events::claim_reward2::ClaimReward2Event`.

| Field           | Type     |
| --------------- | -------- |
| `lb_pair`       | `Pubkey` |
| `position`      | `Pubkey` |
| `owner`         | `Pubkey` |
| `reward_index`  | `u64`    |
| `total_reward`  | `u64`    |
| `active_bin_id` | `i32`    |

### `CloseLimitOrderEvt`

Discriminator `8e87084c5c3f7653` · `events::close_limit_order_evt::CloseLimitOrderEvtEvent`.

| Field         | Type     |
| ------------- | -------- |
| `lb_pair`     | `Pubkey` |
| `owner`       | `Pubkey` |
| `limit_order` | `Pubkey` |

### `CompositionFee`

Discriminator `80977b6a1166718e` · `events::composition_fee::CompositionFeeEvent`.

| Field                         | Type     |
| ----------------------------- | -------- |
| `from`                        | `Pubkey` |
| `bin_id`                      | `i16`    |
| `token_x_fee_amount`          | `u64`    |
| `token_y_fee_amount`          | `u64`    |
| `protocol_token_x_fee_amount` | `u64`    |
| `protocol_token_y_fee_amount` | `u64`    |

### `DecreasePositionLength`

Discriminator `3476eb55aca90f80` · `events::decrease_position_length::DecreasePositionLengthEvent`.

| Field              | Type     |
| ------------------ | -------- |
| `lb_pair`          | `Pubkey` |
| `position`         | `Pubkey` |
| `owner`            | `Pubkey` |
| `length_to_remove` | `u16`    |
| `side`             | `u8`     |

### `DynamicFeeParameterUpdate`

Discriminator `5858b287c2925bf3` · `events::dynamic_fee_parameter_update::DynamicFeeParameterUpdateEvent`.

| Field                        | Type     | Description                                                                      |
| ---------------------------- | -------- | -------------------------------------------------------------------------------- |
| `lb_pair`                    | `Pubkey` |                                                                                  |
| `filter_period`              | `u16`    | Filter period determine high frequency trading time window.                      |
| `decay_period`               | `u16`    | Decay period determine when the volatile fee start decay / decrease.             |
| `reduction_factor`           | `u16`    | Reduction factor controls the volatile fee rate decrement rate.                  |
| `variable_fee_control`       | `u32`    | Used to scale the variable fee component depending on the dynamic of the market  |
| `max_volatility_accumulator` | `u32`    | Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate. |

### `FeeParameterUpdate`

Discriminator `304cf17590d7f22c` · `events::fee_parameter_update::FeeParameterUpdateEvent`.

| Field                   | Type     |
| ----------------------- | -------- |
| `lb_pair`               | `Pubkey` |
| `protocol_share`        | `u16`    |
| `base_factor`           | `u16`    |
| `base_fee_power_factor` | `u8`     |

### `FundReward`

Discriminator `f6e43a8291aa4fcc` · `events::fund_reward::FundRewardEvent`.

| Field          | Type     |
| -------------- | -------- |
| `lb_pair`      | `Pubkey` |
| `funder`       | `Pubkey` |
| `reward_index` | `u64`    |
| `amount`       | `u64`    |

### `GoToABin`

Discriminator `3b8a4c448a83b043` · `events::go_to_a_bin::GoToABinEvent`.

| Field         | Type     |
| ------------- | -------- |
| `lb_pair`     | `Pubkey` |
| `from_bin_id` | `i32`    |
| `to_bin_id`   | `i32`    |

### `IncreaseObservation`

Discriminator `63f91179a69ccfd7` · `events::increase_observation::IncreaseObservationEvent`.

| Field                    | Type     |
| ------------------------ | -------- |
| `oracle`                 | `Pubkey` |
| `new_observation_length` | `u64`    |

### `IncreasePositionLength`

Discriminator `9def2acc1e38df2e` · `events::increase_position_length::IncreasePositionLengthEvent`.

| Field           | Type     |
| --------------- | -------- |
| `lb_pair`       | `Pubkey` |
| `position`      | `Pubkey` |
| `owner`         | `Pubkey` |
| `length_to_add` | `u16`    |
| `side`          | `u8`     |

### `InitializeReward`

Discriminator `d399583e953cb146` · `events::initialize_reward::InitializeRewardEvent`.

| Field             | Type     |
| ----------------- | -------- |
| `lb_pair`         | `Pubkey` |
| `reward_mint`     | `Pubkey` |
| `funder`          | `Pubkey` |
| `reward_index`    | `u64`    |
| `reward_duration` | `u64`    |

### `LbPairCreate`

Discriminator `b94afc7d1bd7bc6f` · `events::lb_pair_create::LbPairCreateEvent`.

| Field      | Type     |
| ---------- | -------- |
| `lb_pair`  | `Pubkey` |
| `bin_step` | `u16`    |
| `token_x`  | `Pubkey` |
| `token_y`  | `Pubkey` |

### `PlaceLimitOrderEvt`

Discriminator `2b4f1ba9f41ce13f` · `events::place_limit_order_evt::PlaceLimitOrderEvtEvent`.

| Field         | Type                                              |
| ------------- | ------------------------------------------------- |
| `lb_pair`     | `Pubkey`                                          |
| `sender`      | `Pubkey`                                          |
| `owner`       | `Pubkey`                                          |
| `limit_order` | `Pubkey`                                          |
| `active_id`   | `i32`                                             |
| `params`      | [`PlaceLimitOrderParams`](#placelimitorderparams) |

### `PositionClose`

Discriminator `ffc4106b1cca3580` · `events::position_close::PositionCloseEvent`.

| Field      | Type     |
| ---------- | -------- |
| `position` | `Pubkey` |
| `owner`    | `Pubkey` |

### `PositionCreate`

Discriminator `908efc549d352579` · `events::position_create::PositionCreateEvent`.

| Field      | Type     |
| ---------- | -------- |
| `lb_pair`  | `Pubkey` |
| `position` | `Pubkey` |
| `owner`    | `Pubkey` |

### `Rebalancing`

Discriminator `006d75b33d5bc7c8` · `events::rebalancing::RebalancingEvent`.

| Field                | Type       |
| -------------------- | ---------- |
| `lb_pair`            | `Pubkey`   |
| `position`           | `Pubkey`   |
| `owner`              | `Pubkey`   |
| `active_bin_id`      | `i32`      |
| `x_withdrawn_amount` | `u64`      |
| `x_added_amount`     | `u64`      |
| `y_withdrawn_amount` | `u64`      |
| `y_added_amount`     | `u64`      |
| `x_fee_amount`       | `u64`      |
| `y_fee_amount`       | `u64`      |
| `old_min_id`         | `i32`      |
| `old_max_id`         | `i32`      |
| `new_min_id`         | `i32`      |
| `new_max_id`         | `i32`      |
| `rewards`            | `[u64; 2]` |

### `RemoveLiquidity`

Discriminator `74f461e8671f983a` · `events::remove_liquidity::RemoveLiquidityEvent`.

| Field           | Type       |
| --------------- | ---------- |
| `lb_pair`       | `Pubkey`   |
| `from`          | `Pubkey`   |
| `position`      | `Pubkey`   |
| `amounts`       | `[u64; 2]` |
| `active_bin_id` | `i32`      |

### `SetPositionPermissionlessOperationBitsEvt`

Discriminator `c3e593f51d7d30a8` · `events::set_position_permissionless_operation_bits_evt::SetPositionPermissionlessOperationBitsEvtEvent`.

| Field      | Type     |
| ---------- | -------- |
| `position` | `Pubkey` |
| `owner`    | `Pubkey` |
| `old_bits` | `u8`     |
| `new_bits` | `u8`     |

### `Swap`

Discriminator `516ce3becdd00ac4` · `events::swap::SwapEvent`.

| Field          | Type     |
| -------------- | -------- |
| `lb_pair`      | `Pubkey` |
| `from`         | `Pubkey` |
| `start_bin_id` | `i32`    |
| `end_bin_id`   | `i32`    |
| `amount_in`    | `u64`    |
| `amount_out`   | `u64`    |
| `swap_for_y`   | `bool`   |
| `fee`          | `u64`    |
| `protocol_fee` | `u64`    |
| `fee_bps`      | `u128`   |
| `host_fee`     | `u64`    |

### `Swap2Evt`

Discriminator `2e7452d7941b544d` · `events::swap2_evt::Swap2EvtEvent`.

| Field             | Type     | Description                                           |
| ----------------- | -------- | ----------------------------------------------------- |
| `lb_pair`         | `Pubkey` |                                                       |
| `from`            | `Pubkey` |                                                       |
| `start_bin_id`    | `i32`    |                                                       |
| `end_bin_id`      | `i32`    |                                                       |
| `swap_for_y`      | `bool`   |                                                       |
| `fee_bps`         | `u128`   |                                                       |
| `amount_in`       | `u64`    | Total amount, user transfer out                       |
| `amount_left`     | `u64`    | Leftover amount                                       |
| `amount_out`      | `u64`    | Total amount transfer to user, including transfer fee |
| `mm_fee`          | `u64`    | Market maker fee                                      |
| `protocol_fee`    | `u64`    | Total protocol fee                                    |
| `limit_order_fee` | `u64`    | Total limit order fee                                 |
| `host_fee`        | `u64`    | Total host fee                                        |
| `fees_on_input`   | `bool`   | check if fees on input                                |
| `fees_on_token_x` | `bool`   | check if fees is on token x                           |

### `UpdatePositionLockReleasePoint`

Discriminator `85d642e0400c07bf` · `events::update_position_lock_release_point::UpdatePositionLockReleasePointEvent`.

| Field                    | Type     |
| ------------------------ | -------- |
| `position`               | `Pubkey` |
| `current_point`          | `u64`    |
| `new_lock_release_point` | `u64`    |
| `old_lock_release_point` | `u64`    |
| `sender`                 | `Pubkey` |

### `UpdatePositionOperator`

Discriminator `277330ccf62f4239` · `events::update_position_operator::UpdatePositionOperatorEvent`.

| Field          | Type     |
| -------------- | -------- |
| `position`     | `Pubkey` |
| `old_operator` | `Pubkey` |
| `new_operator` | `Pubkey` |

### `UpdateRewardDuration`

Discriminator `dff5e099311da3ac` · `events::update_reward_duration::UpdateRewardDurationEvent`.

| Field                 | Type     |
| --------------------- | -------- |
| `lb_pair`             | `Pubkey` |
| `reward_index`        | `u64`    |
| `old_reward_duration` | `u64`    |
| `new_reward_duration` | `u64`    |

### `UpdateRewardFunder`

Discriminator `e0b2ae4afca555b4` · `events::update_reward_funder::UpdateRewardFunderEvent`.

| Field          | Type     |
| -------------- | -------- |
| `lb_pair`      | `Pubkey` |
| `reward_index` | `u64`    |
| `old_funder`   | `Pubkey` |
| `new_funder`   | `Pubkey` |

### `WithdrawIneligibleReward`

Discriminator `e7bd419566d79af4` · `events::withdraw_ineligible_reward::WithdrawIneligibleRewardEvent`.

| Field         | Type     |
| ------------- | -------- |
| `lb_pair`     | `Pubkey` |
| `reward_mint` | `Pubkey` |
| `amount`      | `u64`    |

## Types

Types used by the instructions, accounts and events above, exported from `carbon_meteora_dlmm_decoder::types`.

### `AccountsType`

Enum `types::AccountsType`.

| Variant                   | Fields |
| ------------------------- | ------ |
| `TransferHookX`           |        |
| `TransferHookY`           |        |
| `TransferHookReward`      |        |
| `TransferHookMultiReward` | `u8`   |
| `TransferHookReferral`    |        |

### `ActivationType`

> _From the program's IDL:_
>
> Type of the activation

Enum `types::ActivationType`.

| Variant     |
| ----------- |
| `Slot`      |
| `Timestamp` |

### `AddLiquidity`

Struct `types::AddLiquidity`. Same fields as the [`AddLiquidity`](#addliquidity-1) event.

### `AddLiquidityParams`

Struct `types::AddLiquidityParams`.

| Field                  | Type       |
| ---------------------- | ---------- |
| `min_delta_id`         | `i32`      |
| `max_delta_id`         | `i32`      |
| `x0`                   | `u64`      |
| `y0`                   | `u64`      |
| `delta_x`              | `u64`      |
| `delta_y`              | `u64`      |
| `bit_flag`             | `u8`       |
| `favor_x_in_active_id` | `bool`     |
| `padding`              | `[u8; 16]` |

### `AddLiquiditySingleSidePreciseParameter`

Struct `types::AddLiquiditySingleSidePreciseParameter`.

| Field                   | Type                                                             |
| ----------------------- | ---------------------------------------------------------------- |
| `bins`                  | [`Vec<CompressedBinDepositAmount>`](#compressedbindepositamount) |
| `decompress_multiplier` | `u64`                                                            |

### `AddLiquiditySingleSidePreciseParameter2`

Struct `types::AddLiquiditySingleSidePreciseParameter2`.

| Field                   | Type                                                             |
| ----------------------- | ---------------------------------------------------------------- |
| `bins`                  | [`Vec<CompressedBinDepositAmount>`](#compressedbindepositamount) |
| `decompress_multiplier` | `u64`                                                            |
| `max_amount`            | `u64`                                                            |

### `BaseFeeParameter`

Struct `types::BaseFeeParameter`.

| Field                   | Type  | Description                                                                                                                                 |
| ----------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `protocol_share`        | `u16` | Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share \* total_swap_fee |
| `base_factor`           | `u16` | Base factor for base fee rate                                                                                                               |
| `base_fee_power_factor` | `u8`  | Base fee power factor                                                                                                                       |

### `Bin`

Struct `types::Bin`.

| Field                              | Type      | Description                                                                          |
| ---------------------------------- | --------- | ------------------------------------------------------------------------------------ |
| `amount_x`                         | `u64`     | Amount of token X in the bin for market making. This already excluded protocol fees. |
| `amount_y`                         | `u64`     | Amount of token Y in the bin for market making. This already excluded protocol fees. |
| `price`                            | `u128`    | Bin price                                                                            |
| `liquidity_supply`                 | `u128`    | Bin MM liquidity supply.                                                             |
| `fulfilled_order_amount_x`         | `u64`     | Total fulfilled order amount x                                                       |
| `fulfilled_order_amount_y`         | `u64`     | Total fulfilled order amount y                                                       |
| `limit_order_fee_ask_side`         | `u64`     | Limit order fee collected by ask side orders                                         |
| `limit_order_fee_bid_side`         | `u64`     | Limit order fee collected by bid side orders                                         |
| `fee_amount_x_per_token_stored`    | `u128`    | Swap fee amount of token X per liquidity deposited.                                  |
| `fee_amount_y_per_token_stored`    | `u128`    | Swap fee amount of token Y per liquidity deposited.                                  |
| `open_order_amount`                | `u64`     | Pending open limit orders amount in the bin.                                         |
| `total_processing_order_amount`    | `u64`     | Total processing order amount                                                        |
| `processed_order_remaining_amount` | `u64`     | Remaining in processing open limit orders amount in the bin.                         |
| `order_age`                        | `u32`     | Age                                                                                  |
| `limit_order_ask_side`             | `u8`      | limit order flag                                                                     |
| `padding1`                         | `[u8; 3]` | padding                                                                              |

### `BinLimitOrderAmount`

Struct `types::BinLimitOrderAmount`.

| Field    | Type  |
| -------- | ----- |
| `id`     | `i32` |
| `amount` | `u64` |

### `BinLiquidityDistribution`

Struct `types::BinLiquidityDistribution`.

| Field            | Type  | Description                                                                                              |
| ---------------- | ----- | -------------------------------------------------------------------------------------------------------- |
| `bin_id`         | `i32` | Define the bin ID wish to deposit to.                                                                    |
| `distribution_x` | `u16` | DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin. |
| `distribution_y` | `u16` | DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin. |

### `BinLiquidityDistributionByWeight`

Struct `types::BinLiquidityDistributionByWeight`.

| Field    | Type  | Description                                     |
| -------- | ----- | ----------------------------------------------- |
| `bin_id` | `i32` | Define the bin ID wish to deposit to.           |
| `weight` | `u16` | weight of liquidity distributed for this bin id |

### `BinLiquidityReduction`

Struct `types::BinLiquidityReduction`.

| Field           | Type  |
| --------------- | ----- |
| `bin_id`        | `i32` |
| `bps_to_remove` | `u16` |

### `CancelLimitOrderEvt`

Struct `types::CancelLimitOrderEvt`. Same fields as the [`CancelLimitOrderEvt`](#cancellimitorderevt) event.

### `ClaimFee`

Struct `types::ClaimFee`. Same fields as the [`ClaimFee`](#claimfee-1) event.

### `ClaimFee2`

Struct `types::ClaimFee2`. Same fields as the [`ClaimFee2`](#claimfee2-1) event.

### `ClaimReward`

Struct `types::ClaimReward`. Same fields as the [`ClaimReward`](#claimreward-1) event.

### `ClaimReward2`

Struct `types::ClaimReward2`. Same fields as the [`ClaimReward2`](#claimreward2-1) event.

### `CloseLimitOrderEvt`

Struct `types::CloseLimitOrderEvt`. Same fields as the [`CloseLimitOrderEvt`](#closelimitorderevt) event.

### `CompositionFee`

Struct `types::CompositionFee`. Same fields as the [`CompositionFee`](#compositionfee) event.

### `CompressedBinDepositAmount`

Struct `types::CompressedBinDepositAmount`.

| Field    | Type  |
| -------- | ----- |
| `bin_id` | `i32` |
| `amount` | `u32` |

### `CustomizableParams`

Struct `types::CustomizableParams`.

| Field                         | Type          | Description                                                                                                                                   |
| ----------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `active_id`                   | `i32`         | Pool price                                                                                                                                    |
| `bin_step`                    | `u16`         | Bin step                                                                                                                                      |
| `base_factor`                 | `u16`         | Base factor                                                                                                                                   |
| `activation_type`             | `u8`          | Activation type. 0 = Slot, 1 = Time. Check ActivationType enum                                                                                |
| `has_alpha_vault`             | `bool`        | Whether the pool has an alpha vault                                                                                                           |
| `activation_point`            | `Option<u64>` | Decide when does the pool start trade. None = Now                                                                                             |
| `creator_pool_on_off_control` | `bool`        | Pool creator have permission to enable/disable pool with restricted program validation. Only applicable for customizable permissionless pool. |
| `base_fee_power_factor`       | `u8`          | Base fee power factor                                                                                                                         |
| `concrete_function_type`      | `u8`          | Concrete function type                                                                                                                        |
| `collect_fee_mode`            | `u8`          | Collect fee mode                                                                                                                              |
| `padding`                     | `[u8; 60]`    | Padding, for future use                                                                                                                       |

### `DecreasePositionLength`

Struct `types::DecreasePositionLength`. Same fields as the [`DecreasePositionLength`](#decreasepositionlength-1) event.

### `DummyIx`

Struct `types::DummyIx`.

| Field                | Type                                      |
| -------------------- | ----------------------------------------- |
| `pair_status`        | [`PairStatus`](#pairstatus)               |
| `pair_type`          | [`PairType`](#pairtype)                   |
| `activation_type`    | [`ActivationType`](#activationtype)       |
| `token_program_flag` | [`TokenProgramFlags`](#tokenprogramflags) |
| `resize_side`        | [`ResizeSide`](#resizeside)               |
| `rounding`           | [`Rounding`](#rounding)                   |

### `DynamicFeeParameter`

Struct `types::DynamicFeeParameter`.

| Field                        | Type  | Description                                                                      |
| ---------------------------- | ----- | -------------------------------------------------------------------------------- |
| `filter_period`              | `u16` | Filter period determine high frequency trading time window.                      |
| `decay_period`               | `u16` | Decay period determine when the volatile fee start decay / decrease.             |
| `reduction_factor`           | `u16` | Reduction factor controls the volatile fee rate decrement rate.                  |
| `variable_fee_control`       | `u32` | Used to scale the variable fee component depending on the dynamic of the market  |
| `max_volatility_accumulator` | `u32` | Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate. |

### `DynamicFeeParameterUpdate`

Struct `types::DynamicFeeParameterUpdate`. Same fields as the [`DynamicFeeParameterUpdate`](#dynamicfeeparameterupdate) event.

### `FeeInfo`

Struct `types::FeeInfo`.

| Field                      | Type   |
| -------------------------- | ------ |
| `fee_x_per_token_complete` | `u128` |
| `fee_y_per_token_complete` | `u128` |
| `fee_x_pending`            | `u64`  |
| `fee_y_pending`            | `u64`  |

### `FeeParameterUpdate`

Struct `types::FeeParameterUpdate`. Same fields as the [`FeeParameterUpdate`](#feeparameterupdate) event.

### `FundReward`

Struct `types::FundReward`. Same fields as the [`FundReward`](#fundreward-1) event.

### `GoToABin`

Struct `types::GoToABin`. Same fields as the [`GoToABin`](#gotoabin-1) event.

### `IncreaseObservation`

Struct `types::IncreaseObservation`. Same fields as the [`IncreaseObservation`](#increaseobservation) event.

### `IncreasePositionLength`

Struct `types::IncreasePositionLength`. Same fields as the [`IncreasePositionLength`](#increasepositionlength-1) event.

### `InitializeLbPair2Params`

Struct `types::InitializeLbPair2Params`.

| Field       | Type       | Description             |
| ----------- | ---------- | ----------------------- |
| `active_id` | `i32`      | Pool price              |
| `padding`   | `[u8; 96]` | Padding, for future use |

### `InitializeReward`

Struct `types::InitializeReward`. Same fields as the [`InitializeReward`](#initializereward-1) event.

### `InitPermissionPairIx`

Struct `types::InitPermissionPairIx`.

| Field                    | Type  |
| ------------------------ | ----- |
| `active_id`              | `i32` |
| `bin_step`               | `u16` |
| `base_factor`            | `u16` |
| `base_fee_power_factor`  | `u8`  |
| `activation_type`        | `u8`  |
| `padding0`               | `u16` |
| `concrete_function_type` | `u8`  |
| `collect_fee_mode`       | `u8`  |

### `InitPresetParametersIx`

Struct `types::InitPresetParametersIx`.

| Field                        | Type  | Description                                                                                                                                 |
| ---------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `index`                      | `u16` |                                                                                                                                             |
| `bin_step`                   | `u16` | Bin step. Represent the price increment / decrement.                                                                                        |
| `base_factor`                | `u16` | Used for base fee calculation. base_fee_rate = base_factor \* bin_step \* 10 \* 10^base_fee_power_factor                                    |
| `filter_period`              | `u16` | Filter period determine high frequency trading time window.                                                                                 |
| `decay_period`               | `u16` | Decay period determine when the volatile fee start decay / decrease.                                                                        |
| `reduction_factor`           | `u16` | Reduction factor controls the volatile fee rate decrement rate.                                                                             |
| `variable_fee_control`       | `u32` | Used to scale the variable fee component depending on the dynamic of the market                                                             |
| `max_volatility_accumulator` | `u32` | Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.                                                            |
| `protocol_share`             | `u16` | Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share \* total_swap_fee |
| `base_fee_power_factor`      | `u8`  | Base fee power factor                                                                                                                       |
| `concrete_function_type`     | `u8`  | function type                                                                                                                               |
| `collect_fee_mode`           | `u8`  | collect fee mode                                                                                                                            |

### `LbPairCreate`

Struct `types::LbPairCreate`. Same fields as the [`LbPairCreate`](#lbpaircreate) event.

### `LiquidityOneSideParameter`

Struct `types::LiquidityOneSideParameter`.

| Field                     | Type                                                                         | Description                                  |
| ------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------- |
| `amount`                  | `u64`                                                                        | Amount of X token or Y token to deposit      |
| `active_id`               | `i32`                                                                        | Active bin that integrator observe off-chain |
| `max_active_bin_slippage` | `i32`                                                                        | max active bin slippage allowed              |
| `bin_liquidity_dist`      | [`Vec<BinLiquidityDistributionByWeight>`](#binliquiditydistributionbyweight) | Liquidity distribution to each bins          |

### `LiquidityParameter`

Struct `types::LiquidityParameter`.

| Field                | Type                                                         | Description                         |
| -------------------- | ------------------------------------------------------------ | ----------------------------------- |
| `amount_x`           | `u64`                                                        | Amount of X token to deposit        |
| `amount_y`           | `u64`                                                        | Amount of Y token to deposit        |
| `bin_liquidity_dist` | [`Vec<BinLiquidityDistribution>`](#binliquiditydistribution) | Liquidity distribution to each bins |

### `LiquidityParameterByStrategy`

Struct `types::LiquidityParameterByStrategy`.

| Field                     | Type                                        | Description                                  |
| ------------------------- | ------------------------------------------- | -------------------------------------------- |
| `amount_x`                | `u64`                                       | Amount of X token to deposit                 |
| `amount_y`                | `u64`                                       | Amount of Y token to deposit                 |
| `active_id`               | `i32`                                       | Active bin that integrator observe off-chain |
| `max_active_bin_slippage` | `i32`                                       | max active bin slippage allowed              |
| `strategy_parameters`     | [`StrategyParameters`](#strategyparameters) | strategy parameters                          |

### `LiquidityParameterByStrategyOneSide`

Struct `types::LiquidityParameterByStrategyOneSide`.

| Field                     | Type                                        | Description                                  |
| ------------------------- | ------------------------------------------- | -------------------------------------------- |
| `amount`                  | `u64`                                       | Amount of X token or Y token to deposit      |
| `active_id`               | `i32`                                       | Active bin that integrator observe off-chain |
| `max_active_bin_slippage` | `i32`                                       | max active bin slippage allowed              |
| `strategy_parameters`     | [`StrategyParameters`](#strategyparameters) | strategy parameters                          |

### `LiquidityParameterByWeight`

Struct `types::LiquidityParameterByWeight`.

| Field                     | Type                                                                         | Description                                  |
| ------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------- |
| `amount_x`                | `u64`                                                                        | Amount of X token to deposit                 |
| `amount_y`                | `u64`                                                                        | Amount of Y token to deposit                 |
| `active_id`               | `i32`                                                                        | Active bin that integrator observe off-chain |
| `max_active_bin_slippage` | `i32`                                                                        | max active bin slippage allowed              |
| `bin_liquidity_dist`      | [`Vec<BinLiquidityDistributionByWeight>`](#binliquiditydistributionbyweight) | Liquidity distribution to each bins          |

### `PairStatus`

> _From the program's IDL:_
>
> Pair status. 0 = Enabled, 1 = Disabled. Putting 0 as enabled for backward compatibility.

Enum `types::PairStatus`.

| Variant    |
| ---------- |
| `Enabled`  |
| `Disabled` |

### `PairType`

> _From the program's IDL:_
>
> Type of the Pair. 0 = Permissionless, 1 = Permission, 2 =\
> CustomizablePermissionless. Putting 0 as permissionless for backward compatibility.

Enum `types::PairType`.

| Variant                      |
| ---------------------------- |
| `Permissionless`             |
| `Permission`                 |
| `CustomizablePermissionless` |
| `PermissionlessV2`           |

### `PlaceLimitOrderEvt`

Struct `types::PlaceLimitOrderEvt`. Same fields as the [`PlaceLimitOrderEvt`](#placelimitorderevt) event.

### `PlaceLimitOrderParams`

Struct `types::PlaceLimitOrderParams`.

| Field          | Type                                               |
| -------------- | -------------------------------------------------- |
| `is_ask_side`  | `bool`                                             |
| `padding`      | `[u8; 16]`                                         |
| `relative_bin` | [`Option<RelativeBin>`](#relativebin)              |
| `bins`         | [`Vec<BinLimitOrderAmount>`](#binlimitorderamount) |

### `PositionBinData`

Struct `types::PositionBinData`.

| Field             | Type                                |
| ----------------- | ----------------------------------- |
| `liquidity_share` | `u128`                              |
| `reward_info`     | [`UserRewardInfo`](#userrewardinfo) |
| `fee_info`        | [`FeeInfo`](#feeinfo)               |

### `PositionClose`

Struct `types::PositionClose`. Same fields as the [`PositionClose`](#positionclose) event.

### `PositionCreate`

Struct `types::PositionCreate`. Same fields as the [`PositionCreate`](#positioncreate) event.

### `ProtocolFee`

Struct `types::ProtocolFee`.

| Field      | Type  |
| ---------- | ----- |
| `amount_x` | `u64` |
| `amount_y` | `u64` |

### `RebalanceLiquidityParams`

Struct `types::RebalanceLiquidityParams`.

| Field                     | Type                                                   | Description                                                 |
| ------------------------- | ------------------------------------------------------ | ----------------------------------------------------------- |
| `active_id`               | `i32`                                                  | active id                                                   |
| `max_active_bin_slippage` | `u16`                                                  | max active bin slippage allowed                             |
| `should_claim_fee`        | `bool`                                                 | a flag to indicate that whether fee should be harvested     |
| `should_claim_reward`     | `bool`                                                 | a flag to indicate that whether rewards should be harvested |
| `min_withdraw_x_amount`   | `u64`                                                  | threshold for withdraw token x                              |
| `max_deposit_x_amount`    | `u64`                                                  | threshold for deposit token x                               |
| `min_withdraw_y_amount`   | `u64`                                                  | threshold for withdraw token y                              |
| `max_deposit_y_amount`    | `u64`                                                  | threshold for deposit token y                               |
| `shrink_mode`             | `u8`                                                   | shrink mode                                                 |
| `padding`                 | `[u8; 31]`                                             | padding 32 bytes for future usage                           |
| `removes`                 | [`Vec<RemoveLiquidityParams>`](#removeliquidityparams) | removes                                                     |
| `adds`                    | [`Vec<AddLiquidityParams>`](#addliquidityparams)       | adds                                                        |

### `Rebalancing`

Struct `types::Rebalancing`. Same fields as the [`Rebalancing`](#rebalancing) event.

### `RelativeBin`

Struct `types::RelativeBin`.

| Field                     | Type  | Description                                  |
| ------------------------- | ----- | -------------------------------------------- |
| `active_id`               | `i32` | Active bin that integrator observe off-chain |
| `max_active_bin_slippage` | `i32` | max active bin slippage allowed              |

### `RemainingAccountsInfo`

Struct `types::RemainingAccountsInfo`.

| Field    | Type                                                     |
| -------- | -------------------------------------------------------- |
| `slices` | [`Vec<RemainingAccountsSlice>`](#remainingaccountsslice) |

### `RemainingAccountsSlice`

Struct `types::RemainingAccountsSlice`.

| Field           | Type                            |
| --------------- | ------------------------------- |
| `accounts_type` | [`AccountsType`](#accountstype) |
| `length`        | `u8`                            |

### `RemoveLiquidity`

Struct `types::RemoveLiquidity`. Same fields as the [`RemoveLiquidity`](#removeliquidity-1) event.

### `RemoveLiquidityParams`

Struct `types::RemoveLiquidityParams`.

| Field        | Type          |
| ------------ | ------------- |
| `min_bin_id` | `Option<i32>` |
| `max_bin_id` | `Option<i32>` |
| `bps`        | `u16`         |
| `padding`    | `[u8; 16]`    |

### `ResizeSide`

> _From the program's IDL:_
>
> Side of resize, 0 for lower and 1 for upper

Enum `types::ResizeSide`.

| Variant |
| ------- |
| `Lower` |
| `Upper` |

### `RewardInfo`

> _From the program's IDL:_
>
> Stores the state relevant for tracking liquidity mining rewards

Struct `types::RewardInfo`.

| Field                                            | Type     | Description                                                                                                                               |
| ------------------------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `mint`                                           | `Pubkey` | Reward token mint.                                                                                                                        |
| `vault`                                          | `Pubkey` | Reward vault token account.                                                                                                               |
| `funder`                                         | `Pubkey` | Authority account that allows to fund rewards                                                                                             |
| `reward_duration`                                | `u64`    | LM reward duration in seconds.                                                                                                            |
| `reward_duration_end`                            | `u64`    | LM reward duration end time.                                                                                                              |
| `reward_rate`                                    | `u128`   | LM reward rate                                                                                                                            |
| `last_update_time`                               | `u64`    | The last time reward states were updated.                                                                                                 |
| `cumulative_seconds_with_empty_liquidity_reward` | `u64`    | Accumulated seconds where when farm distribute rewards, but the bin is empty. The reward will be accumulated for next reward time window. |

### `Rounding`

Enum `types::Rounding`.

| Variant |
| ------- |
| `Up`    |
| `Down`  |

### `SetPositionPermissionlessOperationBitsEvt`

Struct `types::SetPositionPermissionlessOperationBitsEvt`. Same fields as the [`SetPositionPermissionlessOperationBitsEvt`](#setpositionpermissionlessoperationbitsevt) event.

### `StaticParameters`

> _From the program's IDL:_
>
> Parameter that set by the protocol

Struct `types::StaticParameters`.

| Field                        | Type      | Description                                                                                                                                 |
| ---------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `base_factor`                | `u16`     | Used for base fee calculation. base_fee_rate = base_factor \* bin_step \* 10 \* 10^base_fee_power_factor                                    |
| `filter_period`              | `u16`     | Filter period determine high frequency trading time window.                                                                                 |
| `decay_period`               | `u16`     | Decay period determine when the volatile fee start decay / decrease.                                                                        |
| `reduction_factor`           | `u16`     | Reduction factor controls the volatile fee rate decrement rate.                                                                             |
| `variable_fee_control`       | `u32`     | Used to scale the variable fee component depending on the dynamic of the market                                                             |
| `max_volatility_accumulator` | `u32`     | Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.                                                            |
| `min_bin_id`                 | `i32`     | Min bin id supported by the pool based on the configured bin step.                                                                          |
| `max_bin_id`                 | `i32`     | Max bin id supported by the pool based on the configured bin step.                                                                          |
| `protocol_share`             | `u16`     | Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share \* total_swap_fee |
| `base_fee_power_factor`      | `u8`      | Base fee power factor                                                                                                                       |
| `function_type`              | `u8`      | function type                                                                                                                               |
| `collect_fee_mode`           | `u8`      | Collect fee mode                                                                                                                            |
| `padding`                    | `[u8; 3]` | Padding for bytemuck safe alignment                                                                                                         |

### `StrategyParameters`

Struct `types::StrategyParameters`.

| Field           | Type                            | Description   |
| --------------- | ------------------------------- | ------------- |
| `min_bin_id`    | `i32`                           | min bin id    |
| `max_bin_id`    | `i32`                           | max bin id    |
| `strategy_type` | [`StrategyType`](#strategytype) | strategy type |
| `parameteres`   | `[u8; 64]`                      | parameters    |

### `StrategyType`

Enum `types::StrategyType`.

| Variant            |
| ------------------ |
| `SpotOneSide`      |
| `CurveOneSide`     |
| `BidAskOneSide`    |
| `SpotBalanced`     |
| `CurveBalanced`    |
| `BidAskBalanced`   |
| `SpotImBalanced`   |
| `CurveImBalanced`  |
| `BidAskImBalanced` |

### `Swap`

Struct `types::Swap`. Same fields as the [`Swap`](#swap-1) event.

### `Swap2Evt`

Struct `types::Swap2Evt`. Same fields as the [`Swap2Evt`](#swap2evt) event.

### `TokenProgramFlags`

Enum `types::TokenProgramFlags`.

| Variant            |
| ------------------ |
| `TokenProgram`     |
| `TokenProgram2022` |

### `UpdatePositionLockReleasePoint`

Struct `types::UpdatePositionLockReleasePoint`. Same fields as the [`UpdatePositionLockReleasePoint`](#updatepositionlockreleasepoint) event.

### `UpdatePositionOperator`

Struct `types::UpdatePositionOperator`. Same fields as the [`UpdatePositionOperator`](#updatepositionoperator-1) event.

### `UpdateRewardDuration`

Struct `types::UpdateRewardDuration`. Same fields as the [`UpdateRewardDuration`](#updaterewardduration-1) event.

### `UpdateRewardFunder`

Struct `types::UpdateRewardFunder`. Same fields as the [`UpdateRewardFunder`](#updaterewardfunder-1) event.

### `UserRewardInfo`

Struct `types::UserRewardInfo`.

| Field                        | Type        |
| ---------------------------- | ----------- |
| `reward_per_token_completes` | `[u128; 2]` |
| `reward_pendings`            | `[u64; 2]`  |

### `VariableParameters`

> _From the program's IDL:_
>
> Parameters that changes based on dynamic of the market

Struct `types::VariableParameters`.

| Field                    | Type      | Description                                                                                                                                                                                                                   |
| ------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `volatility_accumulator` | `u32`     | Volatility accumulator measure the number of bin crossed since reference bin ID. Normally (without filter period taken into consideration), reference bin ID is the active bin of last swap. It affects the variable fee rate |
| `volatility_reference`   | `u32`     | Volatility reference is decayed volatility accumulator. It is always <= volatility_accumulator                                                                                                                                |
| `index_reference`        | `i32`     | Active bin id of last swap.                                                                                                                                                                                                   |
| `padding`                | `[u8; 4]` | Padding for bytemuck safe alignment                                                                                                                                                                                           |
| `last_update_timestamp`  | `i64`     | Last timestamp the variable parameters was updated                                                                                                                                                                            |
| `padding1`               | `[u8; 8]` | Padding for bytemuck safe alignment                                                                                                                                                                                           |

### `WithdrawIneligibleReward`

Struct `types::WithdrawIneligibleReward`. Same fields as the [`WithdrawIneligibleReward`](#withdrawineligiblereward-1) event.

---

Carbon 2.0.0 documentation · Web: https://carbon.sevenlabs.org/decoders/meteora-dlmm · Last updated 2026-11-09 · Index of all pages: https://carbon.sevenlabs.org/llms.txt
