Meteora DLMM decoder

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

On this page

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 for how decoders plug into a pipeline.

Cratecarbon-meteora-dlmm-decoder 2.0.0
Installcargo add carbon-meteora-dlmm-decoder@2.0.0
Program IDLBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo (carbon_meteora_dlmm_decoder::PROGRAM_ID)
CategoryDEX & AMM
Decodercarbon_meteora_dlmm_decoder::MeteoraDlmmDecoder
Instruction enuminstructions::MeteoraDlmmInstruction
Account enumaccounts::MeteoraDlmmAccount
Event enuminstructions::CpiEvent
Featuresserde, postgres, graphql (none enabled by default)
API docsdocs.rs/carbon-meteora-dlmm-decoder/2.0.0
Sourcedecoders/meteora-dlmm-decoder

Other DEX and AMM decoders: BonkSwap, FluxBeam, Gavel, Heaven, Jupiter Limit Order, Jupiter Limit Order v2, Kamino Limit Order, Lifinity AMM v2, Meteora DAMM v2, Meteora Pools, OpenBook v2, Orca Whirlpools, PancakeSwap, Phoenix v1, PumpSwap, Raydium AMM v4, Raydium CLMM, Raydium CPMM, Raydium Stable Swap, Stabble Stable Swap, Stabble Weighted Swap. To decode several in one pipeline, see dEX and AMM decoders.

Guide: Index swaps across DEXs.

The serde feature derives Serialize/Deserialize on every type, postgres adds tables and processors for Postgres, and graphql adds a schema for the GraphQL server.

Usage#

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

Terminal
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
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(())
    }
}
Terminal
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 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. If CpiEvent never arrives, the program logs its events with emit! instead: decode them with decode_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:

Terminal
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2
src/main.rs
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(())
    }
}
Terminal
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.

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 AccountMetas. 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.

FieldType
liquidity_parameterLiquidityParameter

Required accounts: 16; extras go to remaining.

Fields of AddLiquidityInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9bin_array_lowerPubkey
10bin_array_upperPubkey
11senderPubkey
12token_x_programPubkey
13token_y_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

AddLiquidity2#

Discriminator e4a24e1c46db7473 · data AddLiquidity2 · accounts AddLiquidity2InstructionAccounts.

FieldType
liquidity_parameterLiquidityParameter
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 14; extras go to remaining.

Fields of AddLiquidity2InstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9senderPubkey
10token_x_programPubkey
11token_y_programPubkey
12event_authorityPubkey
13programPubkey
14…remainingVec<AccountMeta>

AddLiquidityByStrategy#

Discriminator 0703967f94283dc8 · data AddLiquidityByStrategy · accounts AddLiquidityByStrategyInstructionAccounts.

FieldType
liquidity_parameterLiquidityParameterByStrategy

Required accounts: 16; extras go to remaining.

Fields of AddLiquidityByStrategyInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9bin_array_lowerPubkey
10bin_array_upperPubkey
11senderPubkey
12token_x_programPubkey
13token_y_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

AddLiquidityByStrategy2#

Discriminator 03dd95da6f8d76d5 · data AddLiquidityByStrategy2 · accounts AddLiquidityByStrategy2InstructionAccounts.

FieldType
liquidity_parameterLiquidityParameterByStrategy
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 14; extras go to remaining.

Fields of AddLiquidityByStrategy2InstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9senderPubkey
10token_x_programPubkey
11token_y_programPubkey
12event_authorityPubkey
13programPubkey
14…remainingVec<AccountMeta>

AddLiquidityByStrategyOneSide#

Discriminator 2905eeaf64e106cd · data AddLiquidityByStrategyOneSide · accounts AddLiquidityByStrategyOneSideInstructionAccounts.

FieldType
liquidity_parameterLiquidityParameterByStrategyOneSide

Required accounts: 12; extras go to remaining.

Fields of AddLiquidityByStrategyOneSideInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_tokenPubkey
4reservePubkey
5token_mintPubkey
6bin_array_lowerPubkey
7bin_array_upperPubkey
8senderPubkey
9token_programPubkey
10event_authorityPubkey
11programPubkey
12…remainingVec<AccountMeta>

AddLiquidityByWeight#

Discriminator 1c8cee63e7a21595 · data AddLiquidityByWeight · accounts AddLiquidityByWeightInstructionAccounts.

FieldType
liquidity_parameterLiquidityParameterByWeight

Required accounts: 16; extras go to remaining.

Fields of AddLiquidityByWeightInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9bin_array_lowerPubkey
10bin_array_upperPubkey
11senderPubkey
12token_x_programPubkey
13token_y_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

AddLiquidityByWeight2#

Discriminator d13b3f5b6fc899e4 · data AddLiquidityByWeight2 · accounts AddLiquidityByWeight2InstructionAccounts.

FieldType
liquidity_parameterLiquidityParameterByWeight
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 14; extras go to remaining.

Fields of AddLiquidityByWeight2InstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9senderPubkey
10token_x_programPubkey
11token_y_programPubkey
12event_authorityPubkey
13programPubkey
14…remainingVec<AccountMeta>

AddLiquidityOneSide#

Discriminator 5e9b6797465fdca5 · data AddLiquidityOneSide · accounts AddLiquidityOneSideInstructionAccounts.

FieldType
liquidity_parameterLiquidityOneSideParameter

Required accounts: 12; extras go to remaining.

Fields of AddLiquidityOneSideInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_tokenPubkey
4reservePubkey
5token_mintPubkey
6bin_array_lowerPubkey
7bin_array_upperPubkey
8senderPubkey
9token_programPubkey
10event_authorityPubkey
11programPubkey
12…remainingVec<AccountMeta>

AddLiquidityOneSidePrecise#

Discriminator a1c26754ab47fa9a · data AddLiquidityOneSidePrecise · accounts AddLiquidityOneSidePreciseInstructionAccounts.

Required accounts: 12; extras go to remaining.

Fields of AddLiquidityOneSidePreciseInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_tokenPubkey
4reservePubkey
5token_mintPubkey
6bin_array_lowerPubkey
7bin_array_upperPubkey
8senderPubkey
9token_programPubkey
10event_authorityPubkey
11programPubkey
12…remainingVec<AccountMeta>

AddLiquidityOneSidePrecise2#

Discriminator 2133a3c975627de7 · data AddLiquidityOneSidePrecise2 · accounts AddLiquidityOneSidePrecise2InstructionAccounts.

FieldType
liquidity_parameterAddLiquiditySingleSidePreciseParameter2
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 10; extras go to remaining.

Fields of AddLiquidityOneSidePrecise2InstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_tokenPubkey
4reservePubkey
5token_mintPubkey
6senderPubkey
7token_programPubkey
8event_authorityPubkey
9programPubkey
10…remainingVec<AccountMeta>

CancelLimitOrder#

Discriminator 849c841f4328e861 · data CancelLimitOrder · accounts CancelLimitOrderInstructionAccounts.

FieldType
binsVec<i32>
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 15; extras go to remaining.

Fields of CancelLimitOrderInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2reserve_xPubkey
3reserve_yPubkey
4token_x_mintPubkey
5token_y_mintPubkey
6limit_orderPubkey
7owner_token_xPubkey
8owner_token_yPubkey
9ownerPubkey
10token_x_programPubkey
11token_y_programPubkey
12memo_programPubkey
13event_authorityPubkey
14programPubkey
15…remainingVec<AccountMeta>

ClaimFee#

Discriminator a9204f8988e84689 · data ClaimFee · accounts ClaimFeeInstructionAccounts.

No data fields.

Required accounts: 14; extras go to remaining.

Fields of ClaimFeeInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1positionPubkey
2bin_array_lowerPubkey
3bin_array_upperPubkey
4senderPubkey
5reserve_xPubkey
6reserve_yPubkey
7user_token_xPubkey
8user_token_yPubkey
9token_x_mintPubkey
10token_y_mintPubkey
11token_programPubkey
12event_authorityPubkey
13programPubkey
14…remainingVec<AccountMeta>

ClaimFee2#

Discriminator 70bf65ab1c907fbb · data ClaimFee2 · accounts ClaimFee2InstructionAccounts.

FieldType
min_bin_idi32
max_bin_idi32
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 14; extras go to remaining.

Fields of ClaimFee2InstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1positionPubkey
2senderPubkey
3reserve_xPubkey
4reserve_yPubkey
5user_token_xPubkey
6user_token_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9token_program_xPubkey
10token_program_yPubkey
11memo_programPubkey
12event_authorityPubkey
13programPubkey
14…remainingVec<AccountMeta>

ClaimReward#

Discriminator 955fb5f25e5a9ea2 · data ClaimReward · accounts ClaimRewardInstructionAccounts.

FieldType
reward_indexu64

Required accounts: 11; extras go to remaining.

Fields of ClaimRewardInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1positionPubkey
2bin_array_lowerPubkey
3bin_array_upperPubkey
4senderPubkey
5reward_vaultPubkey
6reward_mintPubkey
7user_token_accountPubkey
8token_programPubkey
9event_authorityPubkey
10programPubkey
11…remainingVec<AccountMeta>

ClaimReward2#

Discriminator be037f77b2579db7 · data ClaimReward2 · accounts ClaimReward2InstructionAccounts.

FieldType
reward_indexu64
min_bin_idi32
max_bin_idi32
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 10; extras go to remaining.

Fields of ClaimReward2InstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1positionPubkey
2senderPubkey
3reward_vaultPubkey
4reward_mintPubkey
5user_token_accountPubkey
6token_programPubkey
7memo_programPubkey
8event_authorityPubkey
9programPubkey
10…remainingVec<AccountMeta>

CloseBinArray#

Discriminator 44ae5850b5cc13e0 · data CloseBinArray · accounts CloseBinArrayInstructionAccounts.

No data fields.

Required accounts: 4; extras go to remaining.

Fields of CloseBinArrayInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_arrayPubkey
2rent_receiverPubkey
3signerPubkey
4…remainingVec<AccountMeta>

CloseClaimFeeOperatorAccount#

Discriminator b8d5581fb3658224 · data CloseClaimFeeOperatorAccount · accounts CloseClaimFeeOperatorAccountInstructionAccounts.

No data fields.

Required accounts: 3; extras go to remaining.

Fields of CloseClaimFeeOperatorAccountInstructionAccounts, in account order:

#FieldType
0claim_fee_operatorPubkey
1rent_receiverPubkey
2signerPubkey
3…remainingVec<AccountMeta>

CloseLimitOrderIfEmpty#

Discriminator 397c249b7ef95dab · data CloseLimitOrderIfEmpty · accounts CloseLimitOrderIfEmptyInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of CloseLimitOrderIfEmptyInstructionAccounts, in account order:

#FieldType
0limit_orderPubkey
1ownerPubkey
2rent_receiverPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

CloseOperatorAccount#

Discriminator ab09d54a7817031d · data CloseOperatorAccount · accounts CloseOperatorAccountInstructionAccounts.

No data fields.

Required accounts: 3; extras go to remaining.

Fields of CloseOperatorAccountInstructionAccounts, in account order:

#FieldType
0operatorPubkey
1signerPubkey
2rent_receiverPubkey
3…remainingVec<AccountMeta>

ClosePosition#

Discriminator 7b86510031446262 · data ClosePosition · accounts ClosePositionInstructionAccounts.

No data fields.

Required accounts: 8; extras go to remaining.

Fields of ClosePositionInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_lowerPubkey
3bin_array_upperPubkey
4senderPubkey
5rent_receiverPubkey
6event_authorityPubkey
7programPubkey
8…remainingVec<AccountMeta>

ClosePosition2#

Discriminator ae5a2373ba2893e2 · data ClosePosition2 · accounts ClosePosition2InstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of ClosePosition2InstructionAccounts, in account order:

#FieldType
0positionPubkey
1senderPubkey
2rent_receiverPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

ClosePositionIfEmpty#

Discriminator 3b7cd4765b986e9d · data ClosePositionIfEmpty · accounts ClosePositionIfEmptyInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of ClosePositionIfEmptyInstructionAccounts, in account order:

#FieldType
0positionPubkey
1senderPubkey
2rent_receiverPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

ClosePresetParameter#

Discriminator 04949164861ab53d · data ClosePresetParameter · accounts ClosePresetParameterInstructionAccounts.

No data fields.

Required accounts: 4; extras go to remaining.

Fields of ClosePresetParameterInstructionAccounts, in account order:

#FieldType
0preset_parameterPubkey
1operatorPubkey
2signerPubkey
3rent_receiverPubkey
4…remainingVec<AccountMeta>

ClosePresetParameter2#

Discriminator 27195f6b7411731c · data ClosePresetParameter2 · accounts ClosePresetParameter2InstructionAccounts.

No data fields.

Required accounts: 4; extras go to remaining.

Fields of ClosePresetParameter2InstructionAccounts, in account order:

#FieldType
0preset_parameterPubkey
1operatorPubkey
2signerPubkey
3rent_receiverPubkey
4…remainingVec<AccountMeta>

CloseTokenBadge#

Discriminator 6c92566eb3fe0a68 · data CloseTokenBadge · accounts CloseTokenBadgeInstructionAccounts.

No data fields.

Required accounts: 4; extras go to remaining.

Fields of CloseTokenBadgeInstructionAccounts, in account order:

#FieldType
0token_badgePubkey
1rent_receiverPubkey
2operatorPubkey
3signerPubkey
4…remainingVec<AccountMeta>

CreateOperatorAccount#

Discriminator dd40f695f099e5a3 · data CreateOperatorAccount · accounts CreateOperatorAccountInstructionAccounts.

FieldType
permissionu128

Required accounts: 5; extras go to remaining.

Fields of CreateOperatorAccountInstructionAccounts, in account order:

#FieldType
0operatorPubkey
1whitelisted_signerPubkey
2signerPubkey
3payerPubkey
4system_programPubkey
5…remainingVec<AccountMeta>

DecreasePositionLength#

Discriminator c2db882019606925 · data DecreasePositionLength · accounts DecreasePositionLengthInstructionAccounts.

FieldType
length_to_removeu16
sideu8

Required accounts: 6; extras go to remaining.

Fields of DecreasePositionLengthInstructionAccounts, in account order:

#FieldType
0rent_receiverPubkey
1positionPubkey
2ownerPubkey
3system_programPubkey
4event_authorityPubkey
5programPubkey
6…remainingVec<AccountMeta>

ForIdlTypeGenerationDoNotCall#

Discriminator b46945505f32496c · data ForIdlTypeGenerationDoNotCall · accounts ForIdlTypeGenerationDoNotCallInstructionAccounts.

FieldType
ixDummyIx

Required accounts: 1; extras go to remaining.

Fields of ForIdlTypeGenerationDoNotCallInstructionAccounts, in account order:

#FieldType
0dummy_zc_accountPubkey
1…remainingVec<AccountMeta>

FundReward#

Discriminator bc32f9a55d97263f · data FundReward · accounts FundRewardInstructionAccounts.

FieldType
reward_indexu64
amountu64
carry_forwardbool
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 9; extras go to remaining.

Fields of FundRewardInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1reward_vaultPubkey
2reward_mintPubkey
3funder_token_accountPubkey
4funderPubkey
5bin_arrayPubkey
6token_programPubkey
7event_authorityPubkey
8programPubkey
9…remainingVec<AccountMeta>

GoToABin#

Discriminator 9248aee028fd54ae · data GoToABin · accounts GoToABinInstructionAccounts.

FieldType
bin_idi32

Required accounts: 6; extras go to remaining.

Fields of GoToABinInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2from_bin_arrayOption<Pubkey>
3to_bin_arrayOption<Pubkey>
4event_authorityPubkey
5programPubkey
6…remainingVec<AccountMeta>

IncreaseOracleLength#

Discriminator be3d7d57674f9ead · data IncreaseOracleLength · accounts IncreaseOracleLengthInstructionAccounts.

FieldType
length_to_addu64

Required accounts: 5; extras go to remaining.

Fields of IncreaseOracleLengthInstructionAccounts, in account order:

#FieldType
0oraclePubkey
1funderPubkey
2system_programPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

IncreasePositionLength#

Discriminator 505375d3420d2195 · data IncreasePositionLength · accounts IncreasePositionLengthInstructionAccounts.

FieldType
length_to_addu16
sideu8

Required accounts: 7; extras go to remaining.

Fields of IncreasePositionLengthInstructionAccounts, in account order:

#FieldType
0funderPubkey
1lb_pairPubkey
2positionPubkey
3ownerPubkey
4system_programPubkey
5event_authorityPubkey
6programPubkey
7…remainingVec<AccountMeta>

IncreasePositionLength2#

Discriminator ffd2cc477389e171 · data IncreasePositionLength2 · accounts IncreasePositionLength2InstructionAccounts.

FieldType
minimum_upper_bin_idi32

Required accounts: 7; extras go to remaining.

Fields of IncreasePositionLength2InstructionAccounts, in account order:

#FieldType
0funderPubkey
1lb_pairPubkey
2positionPubkey
3ownerPubkey
4system_programPubkey
5event_authorityPubkey
6programPubkey
7…remainingVec<AccountMeta>

InitializeBinArray#

Discriminator 235613b94ed44bd3 · data InitializeBinArray · accounts InitializeBinArrayInstructionAccounts.

FieldType
indexi64

Required accounts: 4; extras go to remaining.

Fields of InitializeBinArrayInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_arrayPubkey
2funderPubkey
3system_programPubkey
4…remainingVec<AccountMeta>

InitializeBinArrayBitmapExtension#

Discriminator 2f9de2b40cf02147 · data InitializeBinArrayBitmapExtension · accounts InitializeBinArrayBitmapExtensionInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of InitializeBinArrayBitmapExtensionInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionPubkey
2funderPubkey
3system_programPubkey
4rentPubkey
5…remainingVec<AccountMeta>

InitializeCustomizablePermissionlessLbPair#

Discriminator 2e2729876fb7c840 · data InitializeCustomizablePermissionlessLbPair · accounts InitializeCustomizablePermissionlessLbPairInstructionAccounts.

FieldType
paramsCustomizableParams

Required accounts: 14; extras go to remaining.

Fields of InitializeCustomizablePermissionlessLbPairInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2token_mint_xPubkey
3token_mint_yPubkey
4reserve_xPubkey
5reserve_yPubkey
6oraclePubkey
7user_token_xPubkey
8funderPubkey
9token_programPubkey
10system_programPubkey
11user_token_yPubkey
12event_authorityPubkey
13programPubkey
14…remainingVec<AccountMeta>

InitializeCustomizablePermissionlessLbPair2#

Discriminator f349817e3313f16b · data InitializeCustomizablePermissionlessLbPair2 · accounts InitializeCustomizablePermissionlessLbPair2InstructionAccounts.

FieldType
paramsCustomizableParams

Required accounts: 17; extras go to remaining.

Fields of InitializeCustomizablePermissionlessLbPair2InstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2token_mint_xPubkey
3token_mint_yPubkey
4reserve_xPubkey
5reserve_yPubkey
6oraclePubkey
7user_token_xPubkey
8funderPubkey
9token_badge_xOption<Pubkey>
10token_badge_yOption<Pubkey>
11token_program_xPubkey
12token_program_yPubkey
13system_programPubkey
14user_token_yPubkey
15event_authorityPubkey
16programPubkey
17…remainingVec<AccountMeta>

InitializeLbPair#

Discriminator 2d9aedd2dd0fa65c · data InitializeLbPair · accounts InitializeLbPairInstructionAccounts.

FieldType
active_idi32
bin_stepu16

Required accounts: 14; extras go to remaining.

Fields of InitializeLbPairInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2token_mint_xPubkey
3token_mint_yPubkey
4reserve_xPubkey
5reserve_yPubkey
6oraclePubkey
7preset_parameterPubkey
8funderPubkey
9token_programPubkey
10system_programPubkey
11rentPubkey
12event_authorityPubkey
13programPubkey
14…remainingVec<AccountMeta>

InitializeLbPair2#

Discriminator 493b2478ed536cc6 · data InitializeLbPair2 · accounts InitializeLbPair2InstructionAccounts.

Required accounts: 16; extras go to remaining.

Fields of InitializeLbPair2InstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2token_mint_xPubkey
3token_mint_yPubkey
4reserve_xPubkey
5reserve_yPubkey
6oraclePubkey
7preset_parameterPubkey
8funderPubkey
9token_badge_xOption<Pubkey>
10token_badge_yOption<Pubkey>
11token_program_xPubkey
12token_program_yPubkey
13system_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

InitializePermissionLbPair#

Discriminator 6c66d555fb033515 · data InitializePermissionLbPair · accounts InitializePermissionLbPairInstructionAccounts.

FieldType
ix_dataInitPermissionPairIx

Required accounts: 18; extras go to remaining.

Fields of InitializePermissionLbPairInstructionAccounts, in account order:

#FieldType
0basePubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3token_mint_xPubkey
4token_mint_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7oraclePubkey
8payerPubkey
9operatorPubkey
10signerPubkey
11token_badge_xOption<Pubkey>
12token_badge_yOption<Pubkey>
13token_program_xPubkey
14token_program_yPubkey
15system_programPubkey
16event_authorityPubkey
17programPubkey
18…remainingVec<AccountMeta>

InitializePosition#

Discriminator dbc0ea47bebf6650 · data InitializePosition · accounts InitializePositionInstructionAccounts.

FieldType
lower_bin_idi32
widthi32

Required accounts: 8; extras go to remaining.

Fields of InitializePositionInstructionAccounts, in account order:

#FieldType
0payerPubkey
1positionPubkey
2lb_pairPubkey
3ownerPubkey
4system_programPubkey
5rentPubkey
6event_authorityPubkey
7programPubkey
8…remainingVec<AccountMeta>

InitializePosition2#

Discriminator 8f13f291d50f6873 · data InitializePosition2 · accounts InitializePosition2InstructionAccounts.

FieldType
lower_bin_idi32
widthi32

Required accounts: 7; extras go to remaining.

Fields of InitializePosition2InstructionAccounts, in account order:

#FieldType
0payerPubkey
1positionPubkey
2lb_pairPubkey
3ownerPubkey
4system_programPubkey
5event_authorityPubkey
6programPubkey
7…remainingVec<AccountMeta>

InitializePositionByOperator#

Discriminator fbbdbef475fe2394 · data InitializePositionByOperator · accounts InitializePositionByOperatorInstructionAccounts.

FieldType
lower_bin_idi32
widthi32
fee_ownerPubkey
lock_release_pointu64

Required accounts: 11; extras go to remaining.

Fields of InitializePositionByOperatorInstructionAccounts, in account order:

#FieldType
0payerPubkey
1basePubkey
2positionPubkey
3lb_pairPubkey
4ownerPubkey
5operatorPubkey
6operator_token_xPubkey
7owner_token_xPubkey
8system_programPubkey
9event_authorityPubkey
10programPubkey
11…remainingVec<AccountMeta>

InitializePositionPda#

Discriminator 2e527d92558de499 · data InitializePositionPda · accounts InitializePositionPdaInstructionAccounts.

FieldType
lower_bin_idi32
widthi32

Required accounts: 9; extras go to remaining.

Fields of InitializePositionPdaInstructionAccounts, in account order:

#FieldType
0payerPubkey
1basePubkey
2positionPubkey
3lb_pairPubkey
4ownerPubkey
5system_programPubkey
6rentPubkey
7event_authorityPubkey
8programPubkey
9…remainingVec<AccountMeta>

InitializePresetParameter#

Discriminator 42bc47d3626d0eba · data InitializePresetParameter · accounts InitializePresetParameterInstructionAccounts.

Required accounts: 5; extras go to remaining.

Fields of InitializePresetParameterInstructionAccounts, in account order:

#FieldType
0preset_parameterPubkey
1operatorPubkey
2signerPubkey
3payerPubkey
4system_programPubkey
5…remainingVec<AccountMeta>

InitializeReward#

Discriminator 5f87c0c4f281e644 · data InitializeReward · accounts InitializeRewardInstructionAccounts.

FieldType
reward_indexu64
reward_durationu64
funderPubkey

Required accounts: 11; extras go to remaining.

Fields of InitializeRewardInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1reward_vaultPubkey
2reward_mintPubkey
3token_badgeOption<Pubkey>
4operatorPubkey
5signerPubkey
6payerPubkey
7token_programPubkey
8system_programPubkey
9event_authorityPubkey
10programPubkey
11…remainingVec<AccountMeta>

InitializeTokenBadge#

Discriminator fd4dcd5f1be059df · data InitializeTokenBadge · accounts InitializeTokenBadgeInstructionAccounts.

No data fields.

Required accounts: 6; extras go to remaining.

Fields of InitializeTokenBadgeInstructionAccounts, in account order:

#FieldType
0token_mintPubkey
1token_badgePubkey
2operatorPubkey
3signerPubkey
4payerPubkey
5system_programPubkey
6…remainingVec<AccountMeta>

PlaceLimitOrder#

Discriminator 6cb021ba92e501c5 · data PlaceLimitOrder · accounts PlaceLimitOrderInstructionAccounts.

FieldType
paramsPlaceLimitOrderParams
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 13; extras go to remaining.

Fields of PlaceLimitOrderInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2reservePubkey
3token_mintPubkey
4limit_orderPubkey
5payerPubkey
6ownerPubkey
7user_tokenPubkey
8senderPubkey
9token_programPubkey
10system_programPubkey
11event_authorityPubkey
12programPubkey
13…remainingVec<AccountMeta>

RebalanceLiquidity#

Discriminator 5c04b0c177b95309 · data RebalanceLiquidity · accounts RebalanceLiquidityInstructionAccounts.

FieldType
paramsRebalanceLiquidityParams
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 17; extras go to remaining.

Fields of RebalanceLiquidityInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9ownerPubkey
10rent_payerPubkey
11token_x_programPubkey
12token_y_programPubkey
13memo_programPubkey
14system_programPubkey
15event_authorityPubkey
16programPubkey
17…remainingVec<AccountMeta>

RemoveAllLiquidity#

Discriminator 0a333d2370691855 · data RemoveAllLiquidity · accounts RemoveAllLiquidityInstructionAccounts.

No data fields.

Required accounts: 16; extras go to remaining.

Fields of RemoveAllLiquidityInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9bin_array_lowerPubkey
10bin_array_upperPubkey
11senderPubkey
12token_x_programPubkey
13token_y_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

RemoveLiquidity#

Discriminator 5055d14818ceb16c · data RemoveLiquidity · accounts RemoveLiquidityInstructionAccounts.

FieldType
bin_liquidity_removalVec<BinLiquidityReduction>

Required accounts: 16; extras go to remaining.

Fields of RemoveLiquidityInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9bin_array_lowerPubkey
10bin_array_upperPubkey
11senderPubkey
12token_x_programPubkey
13token_y_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

RemoveLiquidity2#

Discriminator e6d7527ff165e392 · data RemoveLiquidity2 · accounts RemoveLiquidity2InstructionAccounts.

FieldType
bin_liquidity_removalVec<BinLiquidityReduction>
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 15; extras go to remaining.

Fields of RemoveLiquidity2InstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9senderPubkey
10token_x_programPubkey
11token_y_programPubkey
12memo_programPubkey
13event_authorityPubkey
14programPubkey
15…remainingVec<AccountMeta>

RemoveLiquidityByRange#

Discriminator 1a526698f04a691a · data RemoveLiquidityByRange · accounts RemoveLiquidityByRangeInstructionAccounts.

FieldType
from_bin_idi32
to_bin_idi32
bps_to_removeu16

Required accounts: 16; extras go to remaining.

Fields of RemoveLiquidityByRangeInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9bin_array_lowerPubkey
10bin_array_upperPubkey
11senderPubkey
12token_x_programPubkey
13token_y_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

RemoveLiquidityByRange2#

Discriminator cc02c391359191cd · data RemoveLiquidityByRange2 · accounts RemoveLiquidityByRange2InstructionAccounts.

FieldType
from_bin_idi32
to_bin_idi32
bps_to_removeu16
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 15; extras go to remaining.

Fields of RemoveLiquidityByRange2InstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_bitmap_extensionOption<Pubkey>
3user_token_xPubkey
4user_token_yPubkey
5reserve_xPubkey
6reserve_yPubkey
7token_x_mintPubkey
8token_y_mintPubkey
9senderPubkey
10token_x_programPubkey
11token_y_programPubkey
12memo_programPubkey
13event_authorityPubkey
14programPubkey
15…remainingVec<AccountMeta>

SetActivationPoint#

Discriminator 5bf90fa51a81fe7d · data SetActivationPoint · accounts SetActivationPointInstructionAccounts.

FieldType
activation_pointu64

Required accounts: 2; extras go to remaining.

Fields of SetActivationPointInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1signerPubkey
2…remainingVec<AccountMeta>

SetPairStatus#

Discriminator 43f8e7899a95d9ae · data SetPairStatus · accounts SetPairStatusInstructionAccounts.

FieldType
statusu8

Required accounts: 3; extras go to remaining.

Fields of SetPairStatusInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1operatorPubkey
2signerPubkey
3…remainingVec<AccountMeta>

SetPairStatusPermissionless#

Discriminator 4e3b98d346b72ed0 · data SetPairStatusPermissionless · accounts SetPairStatusPermissionlessInstructionAccounts.

FieldType
statusu8

Required accounts: 2; extras go to remaining.

Fields of SetPairStatusPermissionlessInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1signerPubkey
2…remainingVec<AccountMeta>

SetPermissionlessOperationBits#

Discriminator 543acb8ba351beba · data SetPermissionlessOperationBits · accounts SetPermissionlessOperationBitsInstructionAccounts.

FieldType
bitsu8

Required accounts: 4; extras go to remaining.

Fields of SetPermissionlessOperationBitsInstructionAccounts, in account order:

#FieldType
0positionPubkey
1ownerPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

SetPreActivationDuration#

Discriminator a53dc9f4829f1664 · data SetPreActivationDuration · accounts SetPreActivationDurationInstructionAccounts.

FieldType
pre_activation_durationu64

Required accounts: 2; extras go to remaining.

Fields of SetPreActivationDurationInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1signerPubkey
2…remainingVec<AccountMeta>

SetPreActivationSwapAddress#

Discriminator 398b2f7bd850df0a · data SetPreActivationSwapAddress · accounts SetPreActivationSwapAddressInstructionAccounts.

FieldType
pre_activation_swap_addressPubkey

Required accounts: 2; extras go to remaining.

Fields of SetPreActivationSwapAddressInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1signerPubkey
2…remainingVec<AccountMeta>

Swap#

Discriminator f8c69e91e17587c8 · data Swap · accounts SwapInstructionAccounts.

FieldType
amount_inu64
min_amount_outu64

Required accounts: 15; extras go to remaining.

Fields of SwapInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2reserve_xPubkey
3reserve_yPubkey
4user_token_inPubkey
5user_token_outPubkey
6token_x_mintPubkey
7token_y_mintPubkey
8oraclePubkey
9host_fee_inOption<Pubkey>
10userPubkey
11token_x_programPubkey
12token_y_programPubkey
13event_authorityPubkey
14programPubkey
15…remainingVec<AccountMeta>

Swap2#

Discriminator 414b3f4ceb5b5b88 · data Swap2 · accounts Swap2InstructionAccounts.

FieldType
amount_inu64
min_amount_outu64
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 16; extras go to remaining.

Fields of Swap2InstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2reserve_xPubkey
3reserve_yPubkey
4user_token_inPubkey
5user_token_outPubkey
6token_x_mintPubkey
7token_y_mintPubkey
8oraclePubkey
9host_fee_inOption<Pubkey>
10userPubkey
11token_x_programPubkey
12token_y_programPubkey
13memo_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

SwapExactOut#

Discriminator fa49652126cf4bb8 · data SwapExactOut · accounts SwapExactOutInstructionAccounts.

FieldType
max_in_amountu64
out_amountu64

Required accounts: 15; extras go to remaining.

Fields of SwapExactOutInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2reserve_xPubkey
3reserve_yPubkey
4user_token_inPubkey
5user_token_outPubkey
6token_x_mintPubkey
7token_y_mintPubkey
8oraclePubkey
9host_fee_inOption<Pubkey>
10userPubkey
11token_x_programPubkey
12token_y_programPubkey
13event_authorityPubkey
14programPubkey
15…remainingVec<AccountMeta>

SwapExactOut2#

Discriminator 2bd7f784893cf351 · data SwapExactOut2 · accounts SwapExactOut2InstructionAccounts.

FieldType
max_in_amountu64
out_amountu64
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 16; extras go to remaining.

Fields of SwapExactOut2InstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2reserve_xPubkey
3reserve_yPubkey
4user_token_inPubkey
5user_token_outPubkey
6token_x_mintPubkey
7token_y_mintPubkey
8oraclePubkey
9host_fee_inOption<Pubkey>
10userPubkey
11token_x_programPubkey
12token_y_programPubkey
13memo_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

SwapWithPriceImpact#

Discriminator 38ade6d0ade49ccd · data SwapWithPriceImpact · accounts SwapWithPriceImpactInstructionAccounts.

FieldType
amount_inu64
active_idOption<i32>
max_price_impact_bpsu16

Required accounts: 15; extras go to remaining.

Fields of SwapWithPriceImpactInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2reserve_xPubkey
3reserve_yPubkey
4user_token_inPubkey
5user_token_outPubkey
6token_x_mintPubkey
7token_y_mintPubkey
8oraclePubkey
9host_fee_inOption<Pubkey>
10userPubkey
11token_x_programPubkey
12token_y_programPubkey
13event_authorityPubkey
14programPubkey
15…remainingVec<AccountMeta>

SwapWithPriceImpact2#

Discriminator 4a62c0d6b1334b33 · data SwapWithPriceImpact2 · accounts SwapWithPriceImpact2InstructionAccounts.

FieldType
amount_inu64
active_idOption<i32>
max_price_impact_bpsu16
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 16; extras go to remaining.

Fields of SwapWithPriceImpact2InstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1bin_array_bitmap_extensionOption<Pubkey>
2reserve_xPubkey
3reserve_yPubkey
4user_token_inPubkey
5user_token_outPubkey
6token_x_mintPubkey
7token_y_mintPubkey
8oraclePubkey
9host_fee_inOption<Pubkey>
10userPubkey
11token_x_programPubkey
12token_y_programPubkey
13memo_programPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

UpdateBaseFeeParameters#

Discriminator 4ba8dfa110c3032f · data UpdateBaseFeeParameters · accounts UpdateBaseFeeParametersInstructionAccounts.

FieldType
fee_parameterBaseFeeParameter

Required accounts: 5; extras go to remaining.

Fields of UpdateBaseFeeParametersInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1operatorPubkey
2signerPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

UpdateDynamicFeeParameters#

Discriminator 5ca12ef6ffbd1616 · data UpdateDynamicFeeParameters · accounts UpdateDynamicFeeParametersInstructionAccounts.

FieldType
fee_parameterDynamicFeeParameter

Required accounts: 5; extras go to remaining.

Fields of UpdateDynamicFeeParametersInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1operatorPubkey
2signerPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

UpdateFeesAndReward2#

Discriminator 208eb89a6741b858 · data UpdateFeesAndReward2 · accounts UpdateFeesAndReward2InstructionAccounts.

FieldType
min_bin_idi32
max_bin_idi32

Required accounts: 3; extras go to remaining.

Fields of UpdateFeesAndReward2InstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2ownerPubkey
3…remainingVec<AccountMeta>

UpdateFeesAndRewards#

Discriminator 9ae6fa0decd14bdf · data UpdateFeesAndRewards · accounts UpdateFeesAndRewardsInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of UpdateFeesAndRewardsInstructionAccounts, in account order:

#FieldType
0positionPubkey
1lb_pairPubkey
2bin_array_lowerPubkey
3bin_array_upperPubkey
4ownerPubkey
5…remainingVec<AccountMeta>

UpdatePositionOperator#

Discriminator cab8678fb4bf74d9 · data UpdatePositionOperator · accounts UpdatePositionOperatorInstructionAccounts.

FieldType
operatorPubkey

Required accounts: 4; extras go to remaining.

Fields of UpdatePositionOperatorInstructionAccounts, in account order:

#FieldType
0positionPubkey
1ownerPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

UpdateRewardDuration#

Discriminator 8aaec4a9d5ebfe6b · data UpdateRewardDuration · accounts UpdateRewardDurationInstructionAccounts.

FieldType
reward_indexu64
new_durationu64

Required accounts: 6; extras go to remaining.

Fields of UpdateRewardDurationInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1operatorPubkey
2signerPubkey
3bin_arrayPubkey
4event_authorityPubkey
5programPubkey
6…remainingVec<AccountMeta>

UpdateRewardFunder#

Discriminator d31c3020d7a02317 · data UpdateRewardFunder · accounts UpdateRewardFunderInstructionAccounts.

FieldType
reward_indexu64
new_funderPubkey

Required accounts: 5; extras go to remaining.

Fields of UpdateRewardFunderInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1operatorPubkey
2signerPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

WithdrawIneligibleReward#

Discriminator 94ce2ac3f7316708 · data WithdrawIneligibleReward · accounts WithdrawIneligibleRewardInstructionAccounts.

FieldType
reward_indexu64
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 10; extras go to remaining.

Fields of WithdrawIneligibleRewardInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1reward_vaultPubkey
2reward_mintPubkey
3funder_token_accountPubkey
4funderPubkey
5bin_arrayPubkey
6token_programPubkey
7memo_programPubkey
8event_authorityPubkey
9programPubkey
10…remainingVec<AccountMeta>

WithdrawProtocolFee#

Discriminator 9ec99ebd215da267 · data WithdrawProtocolFee · accounts WithdrawProtocolFeeInstructionAccounts.

FieldType
max_amount_xu64
max_amount_yu64
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 11; extras go to remaining.

Fields of WithdrawProtocolFeeInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1reserve_xPubkey
2reserve_yPubkey
3token_x_mintPubkey
4token_y_mintPubkey
5receiver_token_xPubkey
6receiver_token_yPubkey
7operatorPubkey
8signerPubkey
9token_x_programPubkey
10token_y_programPubkey
11…remainingVec<AccountMeta>

ZapProtocolFee#

Discriminator d59bbb2238b65bf0 · data ZapProtocolFee · accounts ZapProtocolFeeInstructionAccounts.

FieldType
max_amountu64
remaining_accounts_infoRemainingAccountsInfo

Required accounts: 8; extras go to remaining.

Fields of ZapProtocolFeeInstructionAccounts, in account order:

#FieldType
0lb_pairPubkey
1reservePubkey
2token_mintPubkey
3receiver_tokenPubkey
4operatorPubkey
5signerPubkey
6token_programPubkey
7sysvar_instructionsPubkey
8…remainingVec<AccountMeta>

CpiEvent#

Anchor self-CPI that carries one of the program's 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:

#FieldType
0programPubkey
1event_authorityPubkey
2…remainingVec<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.

FieldType
indexi64
versionu8
padding1[u8; 7]
lb_pairPubkey
bins[Bin; 70]

BinArrayBitmapExtension#

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

FieldTypeDescription
lb_pairPubkey
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.

FieldTypeDescription
operatorPubkeyoperator
padding[u8; 128]Reserve

DummyZcAccount#

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

FieldType
position_bin_dataPositionBinData

LbPair#

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

FieldTypeDescription
parametersStaticParameters
v_parametersVariableParameters
bump_seed[u8; 1]
bin_step_seed[u8; 2]Bin step signer seed
pair_typeu8Type of the pair
active_idi32Active bin id
bin_stepu16Bin step. Represent the price increment / decrement.
statusu8Status of the pair. Check PairStatus enum.
require_base_factor_seedu8Require base factor seed
base_factor_seed[u8; 2]Base factor seed
activation_typeu8Activation type
creator_pool_on_off_controlu8Allow pool creator to enable/disable pool with restricted validation. Only applicable for customizable permissionless pair type.
token_x_mintPubkeyToken X mint
token_y_mintPubkeyToken Y mint
reserve_xPubkeyLB token X vault
reserve_yPubkeyLB token Y vault
protocol_feeProtocolFeeUncollected protocol fee
padding1[u8; 32]padding 1
reward_infos[RewardInfo; 2]Farming reward information
oraclePubkeyOracle pubkey
bin_array_bitmap[u64; 16]Packed initialized bin array state
last_updated_ati64Last time the pool fee parameter was updated
padding2[u8; 32]_padding_2
pre_activation_swap_addressPubkeyAddress 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_keyPubkeyBase keypair. Only required for permission pair
activation_pointu64Time point to enable the pair. Only applicable for permission pair.
pre_activation_durationu64Duration before activation activation_point. Used to calculate pre-activation time point for pre_activation_swap_address
padding3[u8; 8]_padding 3
padding4u64_padding_4
creatorPubkeyPool creator
token_mint_x_program_flagu8token_mint_x_program_flag
token_mint_y_program_flagu8token_mint_y_program_flag
versionu8version to know whether we have reset tombstone fields
reserved[u8; 21]Reserved space for future use

LimitOrder#

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

FieldTypeDescription
lb_pairPubkeyThe LB pair of this LO
ownerPubkeyOwner of the LO. Client rely on this to to fetch their LOs.
bin_countu16Bin count
padding0[u8; 14]Padding
padding1[u64; 4]Reserved space for future use

Operator#

Discriminator db1fbc91458bcc75 · accounts::operator::Operator.

FieldType
signerPubkey
permissionu128
padding[u64; 2]

Oracle#

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

FieldTypeDescription
idxu64Index of latest observation
active_sizeu64Size of active sample. Active sample is initialized observation.
lengthu64Number of observations

PositionV2#

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

FieldTypeDescription
lb_pairPubkeyThe LB pair of this position
ownerPubkeyOwner 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]Farming reward information
fee_infos[FeeInfo; 70]Swap fee to claim information
lower_bin_idi32Lower bin ID
upper_bin_idi32Upper bin ID
last_updated_ati64Last updated timestamp
total_claimed_fee_x_amountu64Total claimed token fee X
total_claimed_fee_y_amountu64Total claimed token fee Y
total_claimed_rewards[u64; 2]Total claimed rewards
operatorPubkeyOperator of position
lock_release_pointu64Time point which the locked liquidity can be withdraw
padding0u8_padding_0, previous subjected_to_bootstrap_liquidity_locking, BE CAREFUL FOR TOMBSTONE WHEN REUSE !!
fee_ownerPubkeyAddress is able to claim fee in this position, only valid for bootstrap_liquidity_position
versionu8version to know whether we have reset tombstone fields
permissionless_operation_bitsu8
reserved[u8; 85]Reserved space for future use

PresetParameter#

Discriminator f23ef422b5703aaa · accounts::preset_parameter::PresetParameter.

FieldTypeDescription
bin_stepu16Bin step. Represent the price increment / decrement.
base_factoru16Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor
filter_periodu16Filter period determine high frequency trading time window.
decay_periodu16Decay period determine when the volatile fee start decay / decrease.
reduction_factoru16Reduction factor controls the volatile fee rate decrement rate.
variable_fee_controlu32Used to scale the variable fee component depending on the dynamic of the market
max_volatility_accumulatoru32Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.
min_bin_idi32Min bin id supported by the pool based on the configured bin step.
max_bin_idi32Max bin id supported by the pool based on the configured bin step.
protocol_shareu16Portion 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.

FieldTypeDescription
bin_stepu16Bin step. Represent the price increment / decrement.
base_factoru16Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor
filter_periodu16Filter period determine high frequency trading time window.
decay_periodu16Decay period determine when the volatile fee start decay / decrease.
variable_fee_controlu32Used to scale the variable fee component depending on the dynamic of the market
max_volatility_accumulatoru32Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.
reduction_factoru16Reduction factor controls the volatile fee rate decrement rate.
protocol_shareu16Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee
indexu16index
base_fee_power_factoru8Base fee power factor
concrete_function_typeu8function type, to check whether the pool should have LM farming or other functions in the future, refer ConcreteFunctionType
collect_fee_modeu8collect fee mode
padding0[u8; 7]
padding1[u64; 19]Padding 1 for future use

TokenBadge#

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

FieldTypeDescription
token_mintPubkeytoken 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.

FieldType
lb_pairPubkey
fromPubkey
positionPubkey
amounts[u64; 2]
active_bin_idi32

CancelLimitOrderEvt#

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

FieldType
lb_pairPubkey
fromPubkey
limit_orderPubkey
amounts[u64; 2]
active_idi32
binsVec<i32>

ClaimFee#

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

FieldType
lb_pairPubkey
positionPubkey
ownerPubkey
fee_xu64
fee_yu64

ClaimFee2#

Discriminator e8abf2613a4d232d · events::claim_fee2::ClaimFee2Event.

FieldType
lb_pairPubkey
positionPubkey
ownerPubkey
fee_xu64
fee_yu64
active_bin_idi32

ClaimReward#

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

FieldType
lb_pairPubkey
positionPubkey
ownerPubkey
reward_indexu64
total_rewardu64

ClaimReward2#

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

FieldType
lb_pairPubkey
positionPubkey
ownerPubkey
reward_indexu64
total_rewardu64
active_bin_idi32

CloseLimitOrderEvt#

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

FieldType
lb_pairPubkey
ownerPubkey
limit_orderPubkey

CompositionFee#

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

FieldType
fromPubkey
bin_idi16
token_x_fee_amountu64
token_y_fee_amountu64
protocol_token_x_fee_amountu64
protocol_token_y_fee_amountu64

DecreasePositionLength#

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

FieldType
lb_pairPubkey
positionPubkey
ownerPubkey
length_to_removeu16
sideu8

DynamicFeeParameterUpdate#

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

FieldTypeDescription
lb_pairPubkey
filter_periodu16Filter period determine high frequency trading time window.
decay_periodu16Decay period determine when the volatile fee start decay / decrease.
reduction_factoru16Reduction factor controls the volatile fee rate decrement rate.
variable_fee_controlu32Used to scale the variable fee component depending on the dynamic of the market
max_volatility_accumulatoru32Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.

FeeParameterUpdate#

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

FieldType
lb_pairPubkey
protocol_shareu16
base_factoru16
base_fee_power_factoru8

FundReward#

Discriminator f6e43a8291aa4fcc · events::fund_reward::FundRewardEvent.

FieldType
lb_pairPubkey
funderPubkey
reward_indexu64
amountu64

GoToABin#

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

FieldType
lb_pairPubkey
from_bin_idi32
to_bin_idi32

IncreaseObservation#

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

FieldType
oraclePubkey
new_observation_lengthu64

IncreasePositionLength#

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

FieldType
lb_pairPubkey
positionPubkey
ownerPubkey
length_to_addu16
sideu8

InitializeReward#

Discriminator d399583e953cb146 · events::initialize_reward::InitializeRewardEvent.

FieldType
lb_pairPubkey
reward_mintPubkey
funderPubkey
reward_indexu64
reward_durationu64

LbPairCreate#

Discriminator b94afc7d1bd7bc6f · events::lb_pair_create::LbPairCreateEvent.

FieldType
lb_pairPubkey
bin_stepu16
token_xPubkey
token_yPubkey

PlaceLimitOrderEvt#

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

FieldType
lb_pairPubkey
senderPubkey
ownerPubkey
limit_orderPubkey
active_idi32
paramsPlaceLimitOrderParams

PositionClose#

Discriminator ffc4106b1cca3580 · events::position_close::PositionCloseEvent.

FieldType
positionPubkey
ownerPubkey

PositionCreate#

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

FieldType
lb_pairPubkey
positionPubkey
ownerPubkey

Rebalancing#

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

FieldType
lb_pairPubkey
positionPubkey
ownerPubkey
active_bin_idi32
x_withdrawn_amountu64
x_added_amountu64
y_withdrawn_amountu64
y_added_amountu64
x_fee_amountu64
y_fee_amountu64
old_min_idi32
old_max_idi32
new_min_idi32
new_max_idi32
rewards[u64; 2]

RemoveLiquidity#

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

FieldType
lb_pairPubkey
fromPubkey
positionPubkey
amounts[u64; 2]
active_bin_idi32

SetPositionPermissionlessOperationBitsEvt#

Discriminator c3e593f51d7d30a8 · events::set_position_permissionless_operation_bits_evt::SetPositionPermissionlessOperationBitsEvtEvent.

FieldType
positionPubkey
ownerPubkey
old_bitsu8
new_bitsu8

Swap#

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

FieldType
lb_pairPubkey
fromPubkey
start_bin_idi32
end_bin_idi32
amount_inu64
amount_outu64
swap_for_ybool
feeu64
protocol_feeu64
fee_bpsu128
host_feeu64

Swap2Evt#

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

FieldTypeDescription
lb_pairPubkey
fromPubkey
start_bin_idi32
end_bin_idi32
swap_for_ybool
fee_bpsu128
amount_inu64Total amount, user transfer out
amount_leftu64Leftover amount
amount_outu64Total amount transfer to user, including transfer fee
mm_feeu64Market maker fee
protocol_feeu64Total protocol fee
limit_order_feeu64Total limit order fee
host_feeu64Total host fee
fees_on_inputboolcheck if fees on input
fees_on_token_xboolcheck if fees is on token x

UpdatePositionLockReleasePoint#

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

FieldType
positionPubkey
current_pointu64
new_lock_release_pointu64
old_lock_release_pointu64
senderPubkey

UpdatePositionOperator#

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

FieldType
positionPubkey
old_operatorPubkey
new_operatorPubkey

UpdateRewardDuration#

Discriminator dff5e099311da3ac · events::update_reward_duration::UpdateRewardDurationEvent.

FieldType
lb_pairPubkey
reward_indexu64
old_reward_durationu64
new_reward_durationu64

UpdateRewardFunder#

Discriminator e0b2ae4afca555b4 · events::update_reward_funder::UpdateRewardFunderEvent.

FieldType
lb_pairPubkey
reward_indexu64
old_funderPubkey
new_funderPubkey

WithdrawIneligibleReward#

Discriminator e7bd419566d79af4 · events::withdraw_ineligible_reward::WithdrawIneligibleRewardEvent.

FieldType
lb_pairPubkey
reward_mintPubkey
amountu64

Types#

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

AccountsType#

Enum types::AccountsType.

VariantFields
TransferHookX
TransferHookY
TransferHookReward
TransferHookMultiRewardu8
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 event.

AddLiquidityParams#

Struct types::AddLiquidityParams.

FieldType
min_delta_idi32
max_delta_idi32
x0u64
y0u64
delta_xu64
delta_yu64
bit_flagu8
favor_x_in_active_idbool
padding[u8; 16]

AddLiquiditySingleSidePreciseParameter#

Struct types::AddLiquiditySingleSidePreciseParameter.

FieldType
binsVec<CompressedBinDepositAmount>
decompress_multiplieru64

AddLiquiditySingleSidePreciseParameter2#

Struct types::AddLiquiditySingleSidePreciseParameter2.

FieldType
binsVec<CompressedBinDepositAmount>
decompress_multiplieru64
max_amountu64

BaseFeeParameter#

Struct types::BaseFeeParameter.

FieldTypeDescription
protocol_shareu16Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee
base_factoru16Base factor for base fee rate
base_fee_power_factoru8Base fee power factor

Bin#

Struct types::Bin.

FieldTypeDescription
amount_xu64Amount of token X in the bin for market making. This already excluded protocol fees.
amount_yu64Amount of token Y in the bin for market making. This already excluded protocol fees.
priceu128Bin price
liquidity_supplyu128Bin MM liquidity supply.
fulfilled_order_amount_xu64Total fulfilled order amount x
fulfilled_order_amount_yu64Total fulfilled order amount y
limit_order_fee_ask_sideu64Limit order fee collected by ask side orders
limit_order_fee_bid_sideu64Limit order fee collected by bid side orders
fee_amount_x_per_token_storedu128Swap fee amount of token X per liquidity deposited.
fee_amount_y_per_token_storedu128Swap fee amount of token Y per liquidity deposited.
open_order_amountu64Pending open limit orders amount in the bin.
total_processing_order_amountu64Total processing order amount
processed_order_remaining_amountu64Remaining in processing open limit orders amount in the bin.
order_ageu32Age
limit_order_ask_sideu8limit order flag
padding1[u8; 3]padding

BinLimitOrderAmount#

Struct types::BinLimitOrderAmount.

FieldType
idi32
amountu64

BinLiquidityDistribution#

Struct types::BinLiquidityDistribution.

FieldTypeDescription
bin_idi32Define the bin ID wish to deposit to.
distribution_xu16DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin.
distribution_yu16DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin.

BinLiquidityDistributionByWeight#

Struct types::BinLiquidityDistributionByWeight.

FieldTypeDescription
bin_idi32Define the bin ID wish to deposit to.
weightu16weight of liquidity distributed for this bin id

BinLiquidityReduction#

Struct types::BinLiquidityReduction.

FieldType
bin_idi32
bps_to_removeu16

CancelLimitOrderEvt#

Struct types::CancelLimitOrderEvt. Same fields as the CancelLimitOrderEvt event.

ClaimFee#

Struct types::ClaimFee. Same fields as the ClaimFee event.

ClaimFee2#

Struct types::ClaimFee2. Same fields as the ClaimFee2 event.

ClaimReward#

Struct types::ClaimReward. Same fields as the ClaimReward event.

ClaimReward2#

Struct types::ClaimReward2. Same fields as the ClaimReward2 event.

CloseLimitOrderEvt#

Struct types::CloseLimitOrderEvt. Same fields as the CloseLimitOrderEvt event.

CompositionFee#

Struct types::CompositionFee. Same fields as the CompositionFee event.

CompressedBinDepositAmount#

Struct types::CompressedBinDepositAmount.

FieldType
bin_idi32
amountu32

CustomizableParams#

Struct types::CustomizableParams.

FieldTypeDescription
active_idi32Pool price
bin_stepu16Bin step
base_factoru16Base factor
activation_typeu8Activation type. 0 = Slot, 1 = Time. Check ActivationType enum
has_alpha_vaultboolWhether the pool has an alpha vault
activation_pointOption<u64>Decide when does the pool start trade. None = Now
creator_pool_on_off_controlboolPool creator have permission to enable/disable pool with restricted program validation. Only applicable for customizable permissionless pool.
base_fee_power_factoru8Base fee power factor
concrete_function_typeu8Concrete function type
collect_fee_modeu8Collect fee mode
padding[u8; 60]Padding, for future use

DecreasePositionLength#

Struct types::DecreasePositionLength. Same fields as the DecreasePositionLength event.

DummyIx#

Struct types::DummyIx.

FieldType
pair_statusPairStatus
pair_typePairType
activation_typeActivationType
token_program_flagTokenProgramFlags
resize_sideResizeSide
roundingRounding

DynamicFeeParameter#

Struct types::DynamicFeeParameter.

FieldTypeDescription
filter_periodu16Filter period determine high frequency trading time window.
decay_periodu16Decay period determine when the volatile fee start decay / decrease.
reduction_factoru16Reduction factor controls the volatile fee rate decrement rate.
variable_fee_controlu32Used to scale the variable fee component depending on the dynamic of the market
max_volatility_accumulatoru32Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.

DynamicFeeParameterUpdate#

Struct types::DynamicFeeParameterUpdate. Same fields as the DynamicFeeParameterUpdate event.

FeeInfo#

Struct types::FeeInfo.

FieldType
fee_x_per_token_completeu128
fee_y_per_token_completeu128
fee_x_pendingu64
fee_y_pendingu64

FeeParameterUpdate#

Struct types::FeeParameterUpdate. Same fields as the FeeParameterUpdate event.

FundReward#

Struct types::FundReward. Same fields as the FundReward event.

GoToABin#

Struct types::GoToABin. Same fields as the GoToABin event.

IncreaseObservation#

Struct types::IncreaseObservation. Same fields as the IncreaseObservation event.

IncreasePositionLength#

Struct types::IncreasePositionLength. Same fields as the IncreasePositionLength event.

InitializeLbPair2Params#

Struct types::InitializeLbPair2Params.

FieldTypeDescription
active_idi32Pool price
padding[u8; 96]Padding, for future use

InitializeReward#

Struct types::InitializeReward. Same fields as the InitializeReward event.

InitPermissionPairIx#

Struct types::InitPermissionPairIx.

FieldType
active_idi32
bin_stepu16
base_factoru16
base_fee_power_factoru8
activation_typeu8
padding0u16
concrete_function_typeu8
collect_fee_modeu8

InitPresetParametersIx#

Struct types::InitPresetParametersIx.

FieldTypeDescription
indexu16
bin_stepu16Bin step. Represent the price increment / decrement.
base_factoru16Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor
filter_periodu16Filter period determine high frequency trading time window.
decay_periodu16Decay period determine when the volatile fee start decay / decrease.
reduction_factoru16Reduction factor controls the volatile fee rate decrement rate.
variable_fee_controlu32Used to scale the variable fee component depending on the dynamic of the market
max_volatility_accumulatoru32Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.
protocol_shareu16Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee
base_fee_power_factoru8Base fee power factor
concrete_function_typeu8function type
collect_fee_modeu8collect fee mode

LbPairCreate#

Struct types::LbPairCreate. Same fields as the LbPairCreate event.

LiquidityOneSideParameter#

Struct types::LiquidityOneSideParameter.

FieldTypeDescription
amountu64Amount of X token or Y token to deposit
active_idi32Active bin that integrator observe off-chain
max_active_bin_slippagei32max active bin slippage allowed
bin_liquidity_distVec<BinLiquidityDistributionByWeight>Liquidity distribution to each bins

LiquidityParameter#

Struct types::LiquidityParameter.

FieldTypeDescription
amount_xu64Amount of X token to deposit
amount_yu64Amount of Y token to deposit
bin_liquidity_distVec<BinLiquidityDistribution>Liquidity distribution to each bins

LiquidityParameterByStrategy#

Struct types::LiquidityParameterByStrategy.

FieldTypeDescription
amount_xu64Amount of X token to deposit
amount_yu64Amount of Y token to deposit
active_idi32Active bin that integrator observe off-chain
max_active_bin_slippagei32max active bin slippage allowed
strategy_parametersStrategyParametersstrategy parameters

LiquidityParameterByStrategyOneSide#

Struct types::LiquidityParameterByStrategyOneSide.

FieldTypeDescription
amountu64Amount of X token or Y token to deposit
active_idi32Active bin that integrator observe off-chain
max_active_bin_slippagei32max active bin slippage allowed
strategy_parametersStrategyParametersstrategy parameters

LiquidityParameterByWeight#

Struct types::LiquidityParameterByWeight.

FieldTypeDescription
amount_xu64Amount of X token to deposit
amount_yu64Amount of Y token to deposit
active_idi32Active bin that integrator observe off-chain
max_active_bin_slippagei32max active bin slippage allowed
bin_liquidity_distVec<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 event.

PlaceLimitOrderParams#

Struct types::PlaceLimitOrderParams.

FieldType
is_ask_sidebool
padding[u8; 16]
relative_binOption<RelativeBin>
binsVec<BinLimitOrderAmount>

PositionBinData#

Struct types::PositionBinData.

FieldType
liquidity_shareu128
reward_infoUserRewardInfo
fee_infoFeeInfo

PositionClose#

Struct types::PositionClose. Same fields as the PositionClose event.

PositionCreate#

Struct types::PositionCreate. Same fields as the PositionCreate event.

ProtocolFee#

Struct types::ProtocolFee.

FieldType
amount_xu64
amount_yu64

RebalanceLiquidityParams#

Struct types::RebalanceLiquidityParams.

FieldTypeDescription
active_idi32active id
max_active_bin_slippageu16max active bin slippage allowed
should_claim_feeboola flag to indicate that whether fee should be harvested
should_claim_rewardboola flag to indicate that whether rewards should be harvested
min_withdraw_x_amountu64threshold for withdraw token x
max_deposit_x_amountu64threshold for deposit token x
min_withdraw_y_amountu64threshold for withdraw token y
max_deposit_y_amountu64threshold for deposit token y
shrink_modeu8shrink mode
padding[u8; 31]padding 32 bytes for future usage
removesVec<RemoveLiquidityParams>removes
addsVec<AddLiquidityParams>adds

Rebalancing#

Struct types::Rebalancing. Same fields as the Rebalancing event.

RelativeBin#

Struct types::RelativeBin.

FieldTypeDescription
active_idi32Active bin that integrator observe off-chain
max_active_bin_slippagei32max active bin slippage allowed

RemainingAccountsInfo#

Struct types::RemainingAccountsInfo.

RemainingAccountsSlice#

Struct types::RemainingAccountsSlice.

FieldType
accounts_typeAccountsType
lengthu8

RemoveLiquidity#

Struct types::RemoveLiquidity. Same fields as the RemoveLiquidity event.

RemoveLiquidityParams#

Struct types::RemoveLiquidityParams.

FieldType
min_bin_idOption<i32>
max_bin_idOption<i32>
bpsu16
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.

FieldTypeDescription
mintPubkeyReward token mint.
vaultPubkeyReward vault token account.
funderPubkeyAuthority account that allows to fund rewards
reward_durationu64LM reward duration in seconds.
reward_duration_endu64LM reward duration end time.
reward_rateu128LM reward rate
last_update_timeu64The last time reward states were updated.
cumulative_seconds_with_empty_liquidity_rewardu64Accumulated 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 event.

StaticParameters#

From the program's IDL:

Parameter that set by the protocol

Struct types::StaticParameters.

FieldTypeDescription
base_factoru16Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor
filter_periodu16Filter period determine high frequency trading time window.
decay_periodu16Decay period determine when the volatile fee start decay / decrease.
reduction_factoru16Reduction factor controls the volatile fee rate decrement rate.
variable_fee_controlu32Used to scale the variable fee component depending on the dynamic of the market
max_volatility_accumulatoru32Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate.
min_bin_idi32Min bin id supported by the pool based on the configured bin step.
max_bin_idi32Max bin id supported by the pool based on the configured bin step.
protocol_shareu16Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee
base_fee_power_factoru8Base fee power factor
function_typeu8function type
collect_fee_modeu8Collect fee mode
padding[u8; 3]Padding for bytemuck safe alignment

StrategyParameters#

Struct types::StrategyParameters.

FieldTypeDescription
min_bin_idi32min bin id
max_bin_idi32max bin id
strategy_typeStrategyTypestrategy 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 event.

Swap2Evt#

Struct types::Swap2Evt. Same fields as the Swap2Evt event.

TokenProgramFlags#

Enum types::TokenProgramFlags.

Variant
TokenProgram
TokenProgram2022

UpdatePositionLockReleasePoint#

Struct types::UpdatePositionLockReleasePoint. Same fields as the UpdatePositionLockReleasePoint event.

UpdatePositionOperator#

Struct types::UpdatePositionOperator. Same fields as the UpdatePositionOperator event.

UpdateRewardDuration#

Struct types::UpdateRewardDuration. Same fields as the UpdateRewardDuration event.

UpdateRewardFunder#

Struct types::UpdateRewardFunder. Same fields as the UpdateRewardFunder event.

UserRewardInfo#

Struct types::UserRewardInfo.

FieldType
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.

FieldTypeDescription
volatility_accumulatoru32Volatility 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_referenceu32Volatility reference is decayed volatility accumulator. It is always <= volatility_accumulator
index_referencei32Active bin id of last swap.
padding[u8; 4]Padding for bytemuck safe alignment
last_update_timestampi64Last timestamp the variable parameters was updated
padding1[u8; 8]Padding for bytemuck safe alignment

WithdrawIneligibleReward#

Struct types::WithdrawIneligibleReward. Same fields as the WithdrawIneligibleReward event.

Generated from the crate’s source at Carbon v2.0.0, so it always matches the published code. Spotted a problem? Report it; edits to this page itself are overwritten on the next release.

Your endpoints

Code samples use these instead of the placeholders, so you can copy and run them as they are. They’re stored only in this browser and never sent anywhere.