Meteora DBC decoder
Decode Meteora DBC instructions, accounts and events in Rust with carbon-meteora-dbc-decoder 2.0.0. Program ID dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.
On this page
carbon-meteora-dbc-decoder decodes the instructions, accounts and events of the Meteora DBC program (dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN): 28 instructions, 9 account types, 23 events. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.
| Crate | carbon-meteora-dbc-decoder 2.0.0 |
| Install | cargo add carbon-meteora-dbc-decoder@2. |
| Program ID | dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN (carbon_) |
| Category | Launchpads |
| Decoder | carbon_ |
| Instruction enum | instructions:: |
| Account enum | accounts:: |
| Event enum | instructions:: |
| Features | serde, postgres, graphql (none enabled by default) |
| API docs | docs.rs/carbon-meteora-dbc-decoder/2.0.0 |
| Source | decoders/meteora-dbc-decoder |
Other launchpad decoders: Boop, Moonshot, Pump.fun, Raydium Launchpad, Vertigo, Virtuals, Wavebreak. To decode several in one pipeline, see launchpad decoders.
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 DBC transactions from the public RPC and prints every decoded Swap instruction. Add the dependencies:
cargo add carbon-core@2.0.0 carbon-meteora-dbc-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/fulluse {
carbon_core::{
error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
processor::Processor,
},
carbon_log_metrics::LogMetrics,
carbon_meteora_dbc_decoder::{
instructions::MeteoraDbcInstruction, MeteoraDbcDecoder, 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(MeteoraDbcDecoder, InstructionLogger)
.build()?
.run()
.await
}
struct InstructionLogger;
impl Processor<InstructionProcessorInputType<'_, MeteoraDbcInstruction>> for InstructionLogger {
async fn process(
&mut self,
input: &InstructionProcessorInputType<'_, MeteoraDbcInstruction>,
) -> CarbonResult<()> {
let signature = input.metadata.transaction_metadata.signature;
if let MeteoraDbcInstruction::Swap { data, accounts, .. } = input.decoded_instruction {
println!("swap {signature}: {data:?} pool_authority={}", accounts.pool_authority);
}
Ok(())
}
}RUST_LOG=info cargo runEach 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 MeteoraDbcInstruction:: (import instructions::); see Events. If CpiEvent never arrives, the program logs its events with emit! instead: decode them with decode_.
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 Config account as it changes. Add the datasource and the Solana RPC types it takes:
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2use {
carbon_core::{
account::AccountProcessorInputType, error::CarbonResult, pipeline::Pipeline,
processor::Processor,
},
carbon_log_metrics::LogMetrics,
carbon_meteora_dbc_decoder::{accounts::MeteoraDbcAccount, MeteoraDbcDecoder, 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(MeteoraDbcDecoder, AccountLogger)
.build()?
.run()
.await
}
struct AccountLogger;
impl Processor<AccountProcessorInputType<'_, MeteoraDbcAccount>> for AccountLogger {
async fn process(
&mut self,
input: &AccountProcessorInputType<'_, MeteoraDbcAccount>,
) -> CarbonResult<()> {
if let MeteoraDbcAccount::Config(config) = &input.decoded_account.data {
println!("config {}: {config:?}", input.metadata.pubkey);
}
Ok(())
}
}RUST_LOG=info cargo runEach update to a Config 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 MeteoraDbcInstruction. Each is MeteoraDbcInstruction::, where data and accounts are the types listed under the variant, exported from carbon_. 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:
- The instruction's program ID is
dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN. - The data starts with the variant's discriminator, and the rest deserializes into its data type.
- 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_ too. Accounts after the listed ones are in accounts. as AccountMetas. The decoder doesn't record whether an account signed or was writable: read that from input. and ., 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.
ClaimCreatorTradingFee#
Discriminator 52dcfabd03556b2d · data ClaimCreatorTradingFee · accounts ClaimCreatorTradingFeeInstructionAccounts.
| Field | Type |
|---|---|
max_ | u64 |
max_ | u64 |
Required accounts: 13; extras go to remaining.
Fields of ClaimCreatorTradingFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | pool | Pubkey |
| 2 | token_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | base_vault | Pubkey |
| 5 | quote_vault | Pubkey |
| 6 | base_mint | Pubkey |
| 7 | quote_mint | Pubkey |
| 8 | creator | Pubkey |
| 9 | token_ | Pubkey |
| 10 | token_ | Pubkey |
| 11 | event_ | Pubkey |
| 12 | program | Pubkey |
| 13… | remaining | Vec< |
ClaimPartnerPoolCreationFee#
Discriminator faee1a048b0a65f8 · data ClaimPartnerPoolCreationFee · accounts ClaimPartnerPoolCreationFeeInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of ClaimPartnerPoolCreationFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | pool | Pubkey |
| 2 | fee_claimer | Pubkey |
| 3 | fee_ | Pubkey |
| 4 | event_ | Pubkey |
| 5 | program | Pubkey |
| 6… | remaining | Vec< |
ClaimProtocolFee#
Discriminator a5e4853063f9ff21 · data ClaimProtocolFee · accounts ClaimProtocolFeeInstructionAccounts.
| Field | Type |
|---|---|
max_ | u64 |
max_ | u64 |
Required accounts: 15; extras go to remaining.
Fields of ClaimProtocolFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | pool | Pubkey |
| 3 | base_vault | Pubkey |
| 4 | quote_vault | Pubkey |
| 5 | base_mint | Pubkey |
| 6 | quote_mint | Pubkey |
| 7 | token_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | operator | Pubkey |
| 10 | signer | Pubkey |
| 11 | token_ | Pubkey |
| 12 | token_ | Pubkey |
| 13 | event_ | Pubkey |
| 14 | program | Pubkey |
| 15… | remaining | Vec< |
ClaimProtocolPoolCreationFee#
Discriminator 72cd53bcf0991936 · data ClaimProtocolPoolCreationFee · accounts ClaimProtocolPoolCreationFeeInstructionAccounts.
No data fields.
Required accounts: 7; extras go to remaining.
Fields of ClaimProtocolPoolCreationFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | pool | Pubkey |
| 2 | operator | Pubkey |
| 3 | signer | Pubkey |
| 4 | treasury | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
ClaimTradingFee#
Discriminator 08ec5931987db151 · data ClaimTradingFee · accounts ClaimTradingFeeInstructionAccounts.
| Field | Type |
|---|---|
max_ | u64 |
max_ | u64 |
Required accounts: 14; extras go to remaining.
Fields of ClaimTradingFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | pool | Pubkey |
| 3 | token_ | Pubkey |
| 4 | token_ | Pubkey |
| 5 | base_vault | Pubkey |
| 6 | quote_vault | Pubkey |
| 7 | base_mint | Pubkey |
| 8 | quote_mint | Pubkey |
| 9 | fee_claimer | Pubkey |
| 10 | token_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | event_ | Pubkey |
| 13 | program | Pubkey |
| 14… | remaining | Vec< |
CloseClaimProtocolFeeOperator#
Discriminator 082957235030791a · data CloseClaimProtocolFeeOperator · accounts CloseClaimProtocolFeeOperatorInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of CloseClaimProtocolFeeOperatorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | claim_ | Pubkey |
| 1 | rent_ | Pubkey |
| 2 | signer | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
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_ | Pubkey |
| 3… | remaining | Vec< |
CreateConfig#
Discriminator c9cff3724b6f2fbd · data CreateConfig · accounts CreateConfigInstructionAccounts.
| Field | Type |
|---|---|
config_ | ConfigParameters |
Required accounts: 8; extras go to remaining.
Fields of CreateConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | fee_claimer | Pubkey |
| 2 | leftover_ | Pubkey |
| 3 | quote_mint | Pubkey |
| 4 | payer | Pubkey |
| 5 | system_ | Pubkey |
| 6 | event_ | Pubkey |
| 7 | program | Pubkey |
| 8… | remaining | Vec< |
CreateLocker#
From the program's IDL:
PERMISSIONLESS FUNCTIONS /// create locker
Discriminator a75a899a4b2f1154 · data CreateLocker · accounts CreateLockerInstructionAccounts.
No data fields.
Required accounts: 14; extras go to remaining.
Fields of CreateLockerInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | config | Pubkey |
| 2 | pool_ | Pubkey |
| 3 | base_vault | Pubkey |
| 4 | base_mint | Pubkey |
| 5 | base | Pubkey |
| 6 | creator | Pubkey |
| 7 | escrow | Pubkey |
| 8 | escrow_ | Pubkey |
| 9 | payer | Pubkey |
| 10 | token_ | Pubkey |
| 11 | locker_ | Pubkey |
| 12 | locker_ | Pubkey |
| 13 | system_ | Pubkey |
| 14… | remaining | Vec< |
CreateOperatorAccount#
Discriminator dd40f695f099e5a3 · data CreateOperatorAccount · accounts CreateOperatorAccountInstructionAccounts.
| Field | Type |
|---|---|
permission | u128 |
Required accounts: 7; extras go to remaining.
Fields of CreateOperatorAccountInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | operator | Pubkey |
| 1 | whitelisted_ | Pubkey |
| 2 | signer | Pubkey |
| 3 | payer | Pubkey |
| 4 | system_ | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
CreatePartnerMetadata#
From the program's IDL:
PARTNER FUNCTIONS ///
Discriminator c0a8eabfbce2e3ff · data CreatePartnerMetadata · accounts CreatePartnerMetadataInstructionAccounts.
| Field | Type |
|---|---|
metadata | CreatePartnerMetadataParameters |
Required accounts: 6; extras go to remaining.
Fields of CreatePartnerMetadataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | partner_ | Pubkey |
| 1 | payer | Pubkey |
| 2 | fee_claimer | Pubkey |
| 3 | system_ | Pubkey |
| 4 | event_ | Pubkey |
| 5 | program | Pubkey |
| 6… | remaining | Vec< |
CreateVirtualPoolMetadata#
Discriminator 2d61bb67fe6d7c86 · data CreateVirtualPoolMetadata · accounts CreateVirtualPoolMetadataInstructionAccounts.
| Field | Type |
|---|---|
metadata | CreateVirtualPoolMetadataParameters |
Required accounts: 7; extras go to remaining.
Fields of CreateVirtualPoolMetadataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | virtual_ | Pubkey |
| 2 | creator | Pubkey |
| 3 | payer | Pubkey |
| 4 | system_ | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
CreatorWithdrawSurplus#
Discriminator a50389071c864c50 · data CreatorWithdrawSurplus · accounts CreatorWithdrawSurplusInstructionAccounts.
No data fields.
Required accounts: 10; extras go to remaining.
Fields of CreatorWithdrawSurplusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | virtual_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | quote_vault | Pubkey |
| 5 | quote_mint | Pubkey |
| 6 | creator | Pubkey |
| 7 | token_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
InitializeVirtualPoolWithSplToken#
From the program's IDL:
POOL CREATOR FUNCTIONS ////
Discriminator 8c55d7b06636684f · data InitializeVirtualPoolWithSplToken · accounts InitializeVirtualPoolWithSplTokenInstructionAccounts.
| Field | Type |
|---|---|
params | InitializePoolParameters |
Required accounts: 16; extras go to remaining.
Fields of InitializeVirtualPoolWithSplTokenInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | pool_ | Pubkey |
| 2 | creator | Pubkey |
| 3 | base_mint | Pubkey |
| 4 | quote_mint | Pubkey |
| 5 | pool | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | mint_ | Pubkey |
| 9 | metadata_ | Pubkey |
| 10 | payer | Pubkey |
| 11 | token_ | Pubkey |
| 12 | token_ | Pubkey |
| 13 | system_ | Pubkey |
| 14 | event_ | Pubkey |
| 15 | program | Pubkey |
| 16… | remaining | Vec< |
InitializeVirtualPoolWithToken2022#
Discriminator a976334e916edc9b · data InitializeVirtualPoolWithToken2022 · accounts InitializeVirtualPoolWithToken2022InstructionAccounts.
| Field | Type |
|---|---|
params | InitializePoolParameters |
Required accounts: 14; extras go to remaining.
Fields of InitializeVirtualPoolWithToken2022InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | pool_ | Pubkey |
| 2 | creator | Pubkey |
| 3 | base_mint | Pubkey |
| 4 | quote_mint | Pubkey |
| 5 | pool | Pubkey |
| 6 | base_vault | Pubkey |
| 7 | quote_vault | Pubkey |
| 8 | payer | Pubkey |
| 9 | token_ | Pubkey |
| 10 | token_ | Pubkey |
| 11 | system_ | Pubkey |
| 12 | event_ | Pubkey |
| 13 | program | Pubkey |
| 14… | remaining | Vec< |
MigrateMeteoraDamm#
Discriminator 1b013016b43f76d9 · data MigrateMeteoraDamm · accounts MigrateMeteoraDammInstructionAccounts.
No data fields.
Required accounts: 31; extras go to remaining.
Fields of MigrateMeteoraDammInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | migration_ | Pubkey |
| 2 | config | Pubkey |
| 3 | pool_ | Pubkey |
| 4 | pool | Pubkey |
| 5 | damm_config | Pubkey |
| 6 | lp_mint | Pubkey |
| 7 | token_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | a_vault | Pubkey |
| 10 | b_vault | Pubkey |
| 11 | a_ | Pubkey |
| 12 | b_ | Pubkey |
| 13 | a_ | Pubkey |
| 14 | b_ | Pubkey |
| 15 | a_vault_lp | Pubkey |
| 16 | b_vault_lp | Pubkey |
| 17 | base_vault | Pubkey |
| 18 | quote_vault | Pubkey |
| 19 | virtual_ | Pubkey |
| 20 | protocol_ | Pubkey |
| 21 | protocol_ | Pubkey |
| 22 | payer | Pubkey |
| 23 | rent | Pubkey |
| 24 | mint_ | Pubkey |
| 25 | metadata_ | Pubkey |
| 26 | amm_program | Pubkey |
| 27 | vault_ | Pubkey |
| 28 | token_ | Pubkey |
| 29 | associated_ | Pubkey |
| 30 | system_ | Pubkey |
| 31… | remaining | Vec< |
MigrateMeteoraDammClaimLpToken#
Discriminator 8b85021e5b917f9a · data MigrateMeteoraDammClaimLpToken · accounts MigrateMeteoraDammClaimLpTokenInstructionAccounts.
No data fields.
Required accounts: 9; extras go to remaining.
Fields of MigrateMeteoraDammClaimLpTokenInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | migration_ | Pubkey |
| 2 | pool_ | Pubkey |
| 3 | lp_mint | Pubkey |
| 4 | source_ | Pubkey |
| 5 | destination_ | Pubkey |
| 6 | owner | Pubkey |
| 7 | sender | Pubkey |
| 8 | token_ | Pubkey |
| 9… | remaining | Vec< |
MigrateMeteoraDammLockLpToken#
Discriminator b137ee9dfb58a52a · data MigrateMeteoraDammLockLpToken · accounts MigrateMeteoraDammLockLpTokenInstructionAccounts.
No data fields.
Required accounts: 17; extras go to remaining.
Fields of MigrateMeteoraDammLockLpTokenInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | migration_ | Pubkey |
| 2 | pool_ | Pubkey |
| 3 | pool | Pubkey |
| 4 | lp_mint | Pubkey |
| 5 | lock_escrow | Pubkey |
| 6 | owner | Pubkey |
| 7 | source_ | Pubkey |
| 8 | escrow_ | Pubkey |
| 9 | amm_program | Pubkey |
| 10 | a_vault | Pubkey |
| 11 | b_vault | Pubkey |
| 12 | a_vault_lp | Pubkey |
| 13 | b_vault_lp | Pubkey |
| 14 | a_ | Pubkey |
| 15 | b_ | Pubkey |
| 16 | token_ | Pubkey |
| 17… | remaining | Vec< |
MigrationDammV2#
Discriminator 9ca9e66735e45040 · data MigrationDammV2 · accounts MigrationDammV2InstructionAccounts.
No data fields.
Required accounts: 25; extras go to remaining.
Fields of MigrationDammV2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | migration_ | Pubkey |
| 2 | config | Pubkey |
| 3 | pool_ | Pubkey |
| 4 | pool | Pubkey |
| 5 | first_ | Pubkey |
| 6 | first_ | Pubkey |
| 7 | first_ | Pubkey |
| 8 | second_ | Option< |
| 9 | second_ | Option< |
| 10 | second_ | Option< |
| 11 | damm_ | Pubkey |
| 12 | amm_program | Pubkey |
| 13 | base_mint | Pubkey |
| 14 | quote_mint | Pubkey |
| 15 | token_ | Pubkey |
| 16 | token_ | Pubkey |
| 17 | base_vault | Pubkey |
| 18 | quote_vault | Pubkey |
| 19 | payer | Pubkey |
| 20 | token_ | Pubkey |
| 21 | token_ | Pubkey |
| 22 | token2022_ | Pubkey |
| 23 | damm_ | Pubkey |
| 24 | system_ | Pubkey |
| 25… | remaining | Vec< |
MigrationDammV2CreateMetadata#
Discriminator 6dbd1324c3b7de52 · data MigrationDammV2CreateMetadata · accounts MigrationDammV2CreateMetadataInstructionAccounts.
No data fields.
Required accounts: 7; extras go to remaining.
Fields of MigrationDammV2CreateMetadataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | config | Pubkey |
| 2 | migration_ | Pubkey |
| 3 | payer | Pubkey |
| 4 | system_ | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
MigrationMeteoraDammCreateMetadata#
From the program's IDL:
migrate damm v1
Discriminator 2f5e7e73dde2c285 · data MigrationMeteoraDammCreateMetadata · accounts MigrationMeteoraDammCreateMetadataInstructionAccounts.
No data fields.
Required accounts: 7; extras go to remaining.
Fields of MigrationMeteoraDammCreateMetadataInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | config | Pubkey |
| 2 | migration_ | Pubkey |
| 3 | payer | Pubkey |
| 4 | system_ | Pubkey |
| 5 | event_ | Pubkey |
| 6 | program | Pubkey |
| 7… | remaining | Vec< |
PartnerWithdrawSurplus#
Discriminator a8ad4864c962265c · data PartnerWithdrawSurplus · accounts PartnerWithdrawSurplusInstructionAccounts.
No data fields.
Required accounts: 10; extras go to remaining.
Fields of PartnerWithdrawSurplusInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | virtual_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | quote_vault | Pubkey |
| 5 | quote_mint | Pubkey |
| 6 | fee_claimer | Pubkey |
| 7 | token_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
Swap#
From the program's IDL:
TRADING BOTS FUNCTIONS ////
Discriminator f8c69e91e17587c8 · data Swap · accounts SwapInstructionAccounts.
| Field | Type |
|---|---|
params | SwapParameters |
Required accounts: 15; extras go to remaining.
Fields of SwapInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | pool | Pubkey |
| 3 | input_ | Pubkey |
| 4 | output_ | Pubkey |
| 5 | base_vault | Pubkey |
| 6 | quote_vault | Pubkey |
| 7 | base_mint | Pubkey |
| 8 | quote_mint | Pubkey |
| 9 | payer | Pubkey |
| 10 | token_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | referral_ | Option< |
| 13 | event_ | Pubkey |
| 14 | program | Pubkey |
| 15… | remaining | Vec< |
Swap2#
Discriminator 414b3f4ceb5b5b88 · data Swap2 · accounts Swap2InstructionAccounts.
| Field | Type |
|---|---|
params | SwapParameters2 |
Required accounts: 15; extras go to remaining.
Fields of Swap2InstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | pool | Pubkey |
| 3 | input_ | Pubkey |
| 4 | output_ | Pubkey |
| 5 | base_vault | Pubkey |
| 6 | quote_vault | Pubkey |
| 7 | base_mint | Pubkey |
| 8 | quote_mint | Pubkey |
| 9 | payer | Pubkey |
| 10 | token_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | referral_ | Option< |
| 13 | event_ | Pubkey |
| 14 | program | Pubkey |
| 15… | remaining | Vec< |
TransferPoolCreator#
Discriminator 1407a9213a93a621 · data TransferPoolCreator · accounts TransferPoolCreatorInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of TransferPoolCreatorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | virtual_ | Pubkey |
| 1 | config | Pubkey |
| 2 | creator | Pubkey |
| 3 | new_creator | Pubkey |
| 4 | event_ | Pubkey |
| 5 | program | Pubkey |
| 6… | remaining | Vec< |
WithdrawLeftover#
Discriminator 14c6caedebf3b742 · data WithdrawLeftover · accounts WithdrawLeftoverInstructionAccounts.
No data fields.
Required accounts: 10; extras go to remaining.
Fields of WithdrawLeftoverInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | virtual_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | base_vault | Pubkey |
| 5 | base_mint | Pubkey |
| 6 | leftover_ | Pubkey |
| 7 | token_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
WithdrawMigrationFee#
From the program's IDL:
BOTH partner and creator FUNCTIONS ///
Discriminator ed8e2d178106dea2 · data WithdrawMigrationFee · accounts WithdrawMigrationFeeInstructionAccounts.
| Field | Type |
|---|---|
flag | u8 |
Required accounts: 10; extras go to remaining.
Fields of WithdrawMigrationFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | virtual_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | quote_vault | Pubkey |
| 5 | quote_mint | Pubkey |
| 6 | sender | Pubkey |
| 7 | token_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
ZapProtocolFee#
Discriminator d59bbb2238b65bf0 · data ZapProtocolFee · accounts ZapProtocolFeeInstructionAccounts.
| Field | Type |
|---|---|
max_amount | u64 |
Required accounts: 10; extras go to remaining.
Fields of ZapProtocolFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool_ | Pubkey |
| 1 | config | Pubkey |
| 2 | pool | Pubkey |
| 3 | token_vault | Pubkey |
| 4 | token_mint | Pubkey |
| 5 | receiver_ | Pubkey |
| 6 | operator | Pubkey |
| 7 | signer | Pubkey |
| 8 | token_ | Pubkey |
| 9 | sysvar_ | Pubkey |
| 10… | remaining | Vec< |
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:
| # | Field | Type |
|---|---|---|
| 0 | program | Pubkey |
| 1 | event_ | Pubkey |
| 2… | remaining | Vec< |
Accounts#
Variants of MeteoraDbcAccount. Each wraps a boxed struct from carbon_. decode_ only considers accounts owned by PROGRAM_ID and returns the first variant that matches.
ClaimFeeOperator#
Discriminator a630865622c8bc96 · accounts::.
| Field | Type | Description |
|---|---|---|
operator | Pubkey | operator |
padding | [u8; 128] | Reserve |
Config#
Discriminator 9b0caae01efacc82 · accounts::.
| Field | Type |
|---|---|
pool_fees | PoolFees |
activation_ | u64 |
vault_ | Pubkey |
pool_ | Pubkey |
activation_ | u8 |
partner_ | u64 |
padding | [u8; 219] |
LockEscrow#
Discriminator be6a7906c8b6154b · accounts::.
| Field | Type |
|---|---|
pool | Pubkey |
owner | Pubkey |
escrow_ | Pubkey |
bump | u8 |
total_ | u64 |
lp_ | u128 |
unclaimed_ | u64 |
a_fee | u64 |
b_fee | u64 |
MeteoraDammMigrationMetadata#
Discriminator 119b8dd7cf04859c · accounts::.
| Field | Type | Description |
|---|---|---|
virtual_ | Pubkey | pool |
_padding0 | [u8; 32] | !!! BE CAREFUL to use tombstone field, previous is pool creator |
partner | Pubkey | partner |
lp_mint | Pubkey | lp mint |
partner_ | u64 | partner locked liquidity |
partner_ | u64 | partner liquidity |
creator_ | u64 | creator locked liquidity |
creator_ | u64 | creator liquidity |
padding0 | u8 | padding |
creator_ | u8 | flag to check whether liquidity token is locked for creator |
partner_ | u8 | flag to check whether liquidity token is locked for partner |
creator_ | u8 | flag to check whether creator has claimed liquidity token |
partner_ | u8 | flag to check whether partner has claimed liquidity token |
padding | [u8; 107] | Reserve |
Operator#
Discriminator db1fbc91458bcc75 · accounts::.
| Field | Type |
|---|---|
whitelisted_ | Pubkey |
permission | u128 |
padding | [u64; 2] |
PartnerMetadata#
Discriminator 4444821310d1629c · accounts::.
| Field | Type | Description |
|---|---|---|
fee_claimer | Pubkey | fee claimer |
padding | [u128; 6] | padding for future use |
name | String | Name of partner. |
website | String | Website of partner. |
logo | String | Logo of partner |
PoolConfig#
Discriminator 1a6c0e7b74e6812b · accounts::.
| Field | Type | Description |
|---|---|---|
quote_mint | Pubkey | quote mint |
fee_claimer | Pubkey | Address to get the fee |
leftover_ | Pubkey | Address to receive extra base token after migration, in case token is fixed supply |
pool_fees | PoolFeesConfig | Pool fee |
partner_ | LiquidityVestingInfo | |
creator_ | LiquidityVestingInfo | |
padding0 | [u8; 14] | Padding for future use |
padding1 | u16 | Previously was protocol and referral fee percent. Beware of tombstone. |
collect_ | u8 | Collect fee mode |
migration_ | u8 | migration option |
activation_ | u8 | whether mode slot or timestamp |
token_ | u8 | token decimals |
version | u8 | version |
token_type | u8 | token type of base token |
quote_ | u8 | quote token flag |
partner_ | u8 | partner locked liquidity percentage |
partner_ | u8 | partner liquidity percentage |
creator_ | u8 | creator post migration fee percentage |
creator_ | u8 | creator liquidity percentage |
migration_ | u8 | migration fee option |
fixed_ | u8 | flag to indicate whether token is dynamic supply (0) or fixed supply (1) |
creator_ | u8 | creator trading fee percentage |
token_ | u8 | token update authority |
migration_ | u8 | migration fee percentage |
creator_ | u8 | creator migration fee percentage |
padding2 | [u8; 7] | |
swap_ | u64 | swap base amount |
migration_ | u64 | migration quote threshold (in quote token) |
migration_ | u64 | migration base threshold (in base token) |
migration_ | u128 | migration sqrt price |
locked_ | LockedVestingConfig | locked vesting config |
pre_ | u64 | pre migration token supply |
post_ | u64 | post migration token supply |
migrated_ | u8 | migrated pool collect fee mode |
migrated_ | u8 | migrated dynamic fee option. |
migrated_ | u16 | migrated pool fee in bps |
migrated_ | u8 | |
enable_ | u8 | |
migrated_ | u16 | compounding fee bps for migrated DAMM v2 pool, should only be non-zero if migrated_collect_fee_mode is 2 (Compounding) |
pool_ | u64 | pool creation fee in lamports value |
migrated_ | [u8; 16] | serialized MigratedPoolMarketCapFeeSchedulerParams, only used when migrated_pool_base_fee_mode is market cap scheduler |
sqrt_ | u128 | minimum price |
curve | [LiquidityDistributionConfig; 20] | curve, only use 20 point firstly, we can extend that latter |
VirtualPool#
Discriminator d5e005d16245775c · accounts::.
| Field | Type | Description |
|---|---|---|
volatility_ | VolatilityTracker | volatility tracker |
config | Pubkey | config key |
creator | Pubkey | creator |
base_mint | Pubkey | base mint |
base_vault | Pubkey | base vault |
quote_vault | Pubkey | quote vault |
base_ | u64 | base reserve |
quote_ | u64 | quote reserve |
protocol_ | u64 | protocol base fee |
protocol_ | u64 | protocol quote fee |
partner_ | u64 | partner base fee |
partner_ | u64 | trading quote fee |
sqrt_price | u128 | current price |
activation_ | u64 | Activation point |
pool_type | u8 | pool type, spl token or token2022 |
is_migrated | u8 | is migrated |
is_ | u8 | is partner withdraw surplus |
is_ | u8 | is protocol withdraw surplus |
migration_ | u8 | migration progress |
is_ | u8 | is withdraw leftover |
is_ | u8 | is creator withdraw surplus |
migration_ | u8 | migration fee withdraw status bit 1 (0b010) creator bit 2 (0b100) partner |
metrics | PoolMetrics | pool metrics |
finish_ | u64 | The time curve is finished |
creator_ | u64 | creator base fee |
creator_ | u64 | creator quote fee |
legacy_ | u8 | legacy creation fee bits, we dont use this now |
creation_ | u8 | pool creation fee claim status |
has_swap | u8 | Cached flag |
padding0 | [u8; 5] | Padding for further use |
protocol_ | u16 | |
padding1 | [u8; 6] | |
protocol_ | u64 | |
protocol_ | u64 | |
padding2 | [u64; 3] | Padding for further use |
VirtualPoolMetadata#
Discriminator d92552fa2b2fe4fe · accounts::.
| Field | Type | Description |
|---|---|---|
virtual_ | Pubkey | virtual pool |
padding | [u128; 6] | padding for future use |
name | String | Name of project. |
website | String | Website of project. |
logo | String | Logo of project |
Events#
Variants of instructions::, decoded from the CpiEvent instruction. Each wraps a struct from carbon_. The discriminator is the 8-byte event discriminator that follows the e445a52e51cb9a1d CPI-event tag.
EvtClaimCreatorTradingFee#
Discriminator 9ae4d7ca859bd68a · events::.
| Field | Type |
|---|---|
pool | Pubkey |
token_ | u64 |
token_ | u64 |
EvtClaimPoolCreationFee#
Discriminator 956f952c8840af3e · events::.
| Field | Type |
|---|---|
pool | Pubkey |
receiver | Pubkey |
creation_ | u64 |
EvtClaimProtocolFee#
Discriminator baf44bfbbc0d1921 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
token_ | u64 |
token_ | u64 |
EvtClaimProtocolLiquidityMigrationFee#
Discriminator 51a8741fa1561b23 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
token_ | u64 |
token_ | u64 |
EvtClaimTradingFee#
Discriminator 1a5375f05cca70fe · events::.
| Field | Type |
|---|---|
pool | Pubkey |
token_ | u64 |
token_ | u64 |
EvtCloseClaimFeeOperator#
Discriminator 6f2725376ed8c217 · events::.
| Field | Type |
|---|---|
claim_ | Pubkey |
operator | Pubkey |
EvtCreateClaimFeeOperator#
Discriminator 1506997844741cb1 · events::.
| Field | Type |
|---|---|
operator | Pubkey |
EvtCreateConfig#
Discriminator 83cfb4aeb449a536 · events::.
| Field | Type |
|---|---|
config | Pubkey |
quote_mint | Pubkey |
fee_claimer | Pubkey |
owner | Pubkey |
pool_fees | PoolFeeParameters |
collect_ | u8 |
migration_ | u8 |
activation_ | u8 |
token_ | u8 |
token_type | u8 |
partner_ | u8 |
partner_ | u8 |
creator_ | u8 |
creator_ | u8 |
swap_ | u64 |
migration_ | u64 |
migration_ | u64 |
sqrt_ | u128 |
locked_ | LockedVestingParams |
migration_ | u8 |
fixed_ | u8 |
pre_ | u64 |
post_ | u64 |
curve | Vec< |
EvtCreateConfigV2#
Discriminator a34a42bb77c31a90 · events::.
| Field | Type |
|---|---|
config | Pubkey |
quote_mint | Pubkey |
fee_claimer | Pubkey |
leftover_ | Pubkey |
config_ | ConfigParameters |
EvtCreateMeteoraMigrationMetadata#
Discriminator 63a7853fd68faf8b · events::.
| Field | Type |
|---|---|
virtual_ | Pubkey |
EvtCreatorWithdrawSurplus#
Discriminator 9849150f4257359d · events::.
| Field | Type |
|---|---|
pool | Pubkey |
surplus_ | u64 |
EvtCurveComplete#
Discriminator e5e756549c864b18 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
config | Pubkey |
base_ | u64 |
quote_ | u64 |
EvtInitializePool#
Discriminator e432f655cb428625 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
config | Pubkey |
creator | Pubkey |
base_mint | Pubkey |
pool_type | u8 |
activation_ | u64 |
EvtPartnerClaimPoolCreationFee#
Discriminator aedf2c96916259c3 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
partner | Pubkey |
creation_ | u64 |
fee_ | Pubkey |
EvtPartnerMetadata#
Discriminator c87f06370d200896 · events::.
| Field | Type |
|---|---|
partner_ | Pubkey |
fee_claimer | Pubkey |
EvtPartnerWithdrawMigrationFee#
Discriminator b5697f4308bb7839 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
fee | u64 |
EvtPartnerWithdrawSurplus#
Discriminator c3389809e8482316 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
surplus_ | u64 |
EvtSwap#
Discriminator 1b3c15d58aaabb93 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
config | Pubkey |
trade_ | u8 |
has_ | bool |
params | SwapParameters |
swap_result | SwapResult |
amount_in | u64 |
current_ | u64 |
EvtSwap2#
Discriminator bd4233a826507599 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
config | Pubkey |
trade_ | u8 |
has_ | bool |
swap_ | SwapParameters2 |
swap_result | SwapResult2 |
quote_ | u64 |
migration_ | u64 |
current_ | u64 |
EvtUpdatePoolCreator#
Discriminator 6be1a5ed5b9ed5dc · events::.
| Field | Type |
|---|---|
pool | Pubkey |
creator | Pubkey |
new_creator | Pubkey |
EvtVirtualPoolMetadata#
Discriminator bc12484cc35b264a · events::.
| Field | Type |
|---|---|
virtual_ | Pubkey |
virtual_ | Pubkey |
EvtWithdrawLeftover#
Discriminator bfbd688f6f9c5ee5 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
leftover_ | Pubkey |
leftover_ | u64 |
EvtWithdrawMigrationFee#
Discriminator 1acb5455a11764d6 · events::.
| Field | Type |
|---|---|
pool | Pubkey |
fee | u64 |
flag | u8 |
Types#
Types used by the instructions, accounts and events above, exported from carbon_.
BaseFeeConfig#
Struct types::.
| Field | Type |
|---|---|
cliff_ | u64 |
second_ | u64 |
third_ | u64 |
first_ | u16 |
base_ | u8 |
padding0 | [u8; 5] |
BaseFeeParameters#
Struct types::.
| Field | Type |
|---|---|
cliff_ | u64 |
first_ | u16 |
second_ | u64 |
third_ | u64 |
base_ | u8 |
ConfigParameters#
Struct types::.
| Field | Type | Description |
|---|---|---|
pool_fees | PoolFeeParameters | |
collect_ | u8 | |
migration_ | u8 | |
activation_ | u8 | |
token_type | u8 | |
token_ | u8 | |
partner_ | u8 | |
partner_ | u8 | |
creator_ | u8 | |
creator_ | u8 | |
migration_ | u64 | |
sqrt_ | u128 | |
locked_ | LockedVestingParams | |
migration_ | u8 | |
token_ | Option< | |
creator_ | u8 | |
token_ | u8 | |
migration_ | MigrationFee | |
migrated_ | MigratedPoolFee | |
pool_ | u64 | pool creation fee in SOL lamports value |
partner_ | LiquidityVestingInfoParams | |
creator_ | LiquidityVestingInfoParams | |
migrated_ | u8 | |
migrated_ | MigratedPoolMarketCapFeeSchedulerParams | |
enable_ | bool | |
compounding_ | u16 | |
padding | [u8; 2] | padding for future use |
curve | Vec< |
CreatePartnerMetadataParameters#
Struct types::.
| Field | Type |
|---|---|
padding | [u8; 96] |
name | String |
website | String |
logo | String |
CreateVirtualPoolMetadataParameters#
Struct types::.
| Field | Type |
|---|---|
padding | [u8; 96] |
name | String |
website | String |
logo | String |
DynamicFeeConfig#
Struct types::.
| Field | Type |
|---|---|
initialized | u8 |
padding | [u8; 7] |
max_ | u32 |
variable_ | u32 |
bin_step | u16 |
filter_ | u16 |
decay_ | u16 |
reduction_ | u16 |
padding2 | [u8; 8] |
bin_ | u128 |
DynamicFeeParameters#
Struct types::.
| Field | Type |
|---|---|
bin_step | u16 |
bin_ | u128 |
filter_ | u16 |
decay_ | u16 |
reduction_ | u16 |
max_ | u32 |
variable_ | u32 |
EvtClaimCreatorTradingFee#
Struct types::. Same fields as the EvtClaimCreatorTradingFee event.
EvtClaimPoolCreationFee#
Struct types::. Same fields as the EvtClaimPoolCreationFee event.
EvtClaimProtocolFee#
Struct types::. Same fields as the EvtClaimProtocolFee event.
EvtClaimProtocolLiquidityMigrationFee#
Struct types::. Same fields as the EvtClaimProtocolLiquidityMigrationFee event.
EvtClaimTradingFee#
Struct types::. Same fields as the EvtClaimTradingFee event.
EvtCloseClaimFeeOperator#
From the program's IDL:
Close claim fee operator
Struct types::. Same fields as the EvtCloseClaimFeeOperator event.
EvtCreateClaimFeeOperator#
From the program's IDL:
Create claim fee operator
Struct types::. Same fields as the EvtCreateClaimFeeOperator event.
EvtCreateConfig#
From the program's IDL:
Create config
Struct types::. Same fields as the EvtCreateConfig event.
EvtCreateConfigV2#
Struct types::. Same fields as the EvtCreateConfigV2 event.
EvtCreateMeteoraMigrationMetadata#
Struct types::. Same fields as the EvtCreateMeteoraMigrationMetadata event.
EvtCreatorWithdrawSurplus#
Struct types::. Same fields as the EvtCreatorWithdrawSurplus event.
EvtCurveComplete#
Struct types::. Same fields as the EvtCurveComplete event.
EvtInitializePool#
Struct types::. Same fields as the EvtInitializePool event.
EvtPartnerClaimPoolCreationFee#
Struct types::. Same fields as the EvtPartnerClaimPoolCreationFee event.
EvtPartnerMetadata#
From the program's IDL:
Create partner metadata
Struct types::. Same fields as the EvtPartnerMetadata event.
EvtPartnerWithdrawMigrationFee#
Struct types::. Same fields as the EvtPartnerWithdrawMigrationFee event.
EvtPartnerWithdrawSurplus#
Struct types::. Same fields as the EvtPartnerWithdrawSurplus event.
EvtSwap#
Struct types::. Same fields as the EvtSwap event.
EvtSwap2#
Struct types::. Same fields as the EvtSwap2 event.
EvtUpdatePoolCreator#
Struct types::. Same fields as the EvtUpdatePoolCreator event.
EvtVirtualPoolMetadata#
From the program's IDL:
Create virtual pool metadata
Struct types::. Same fields as the EvtVirtualPoolMetadata event.
EvtWithdrawLeftover#
Struct types::. Same fields as the EvtWithdrawLeftover event.
EvtWithdrawMigrationFee#
Struct types::. Same fields as the EvtWithdrawMigrationFee event.
InitializePoolParameters#
Struct types::.
| Field | Type |
|---|---|
name | String |
symbol | String |
uri | String |
LiquidityDistributionConfig#
Struct types::.
| Field | Type |
|---|---|
sqrt_price | u128 |
liquidity | u128 |
LiquidityDistributionParameters#
Struct types::.
| Field | Type |
|---|---|
sqrt_price | u128 |
liquidity | u128 |
LiquidityVestingInfo#
Struct types::.
| Field | Type |
|---|---|
is_ | u8 |
vesting_ | u8 |
padding | [u8; 2] |
bps_ | u16 |
number_ | u16 |
frequency | u32 |
cliff_ | u32 |
LiquidityVestingInfoParams#
Struct types::.
| Field | Type |
|---|---|
vesting_ | u8 |
bps_ | u16 |
number_ | u16 |
cliff_ | u32 |
frequency | u32 |
LockedVestingConfig#
Struct types::.
| Field | Type |
|---|---|
amount_ | u64 |
cliff_ | u64 |
frequency | u64 |
number_ | u64 |
cliff_ | u64 |
padding | u64 |
LockedVestingParams#
Struct types::.
| Field | Type |
|---|---|
amount_ | u64 |
cliff_ | u64 |
frequency | u64 |
number_ | u64 |
cliff_ | u64 |
MigratedPoolFee#
Struct types::.
| Field | Type |
|---|---|
collect_ | u8 |
dynamic_fee | u8 |
pool_ | u16 |
MigratedPoolMarketCapFeeSchedulerParams#
Struct types::.
| Field | Type |
|---|---|
number_ | u16 |
sqrt_ | u16 |
scheduler_ | u32 |
reduction_ | u64 |
MigrationFee#
Struct types::.
| Field | Type |
|---|---|
fee_ | u8 |
creator_ | u8 |
PoolFeeParameters#
From the program's IDL:
Information regarding fee charges
Struct types::.
| Field | Type | Description |
|---|---|---|
base_fee | BaseFeeParameters | Base fee |
dynamic_fee | Option< | dynamic fee |
PoolFees#
From the program's IDL:
Information regarding fee charges
Struct types::.
| Field | Type |
|---|---|
trade_ | u64 |
trade_ | u64 |
protocol_ | u64 |
protocol_ | u64 |
PoolFeesConfig#
Struct types::.
| Field | Type |
|---|---|
base_fee | BaseFeeConfig |
dynamic_fee | DynamicFeeConfig |
PoolMetrics#
Struct types::.
| Field | Type |
|---|---|
total_ | u64 |
total_ | u64 |
total_ | u64 |
total_ | u64 |
SwapParameters#
Struct types::.
| Field | Type |
|---|---|
amount_in | u64 |
minimum_ | u64 |
SwapParameters2#
Struct types::.
| Field | Type | Description |
|---|---|---|
amount0 | u64 | When it's exact in, partial fill, this will be amount_in. When it's exact out, this will be amount_out |
amount1 | u64 | When it's exact in, partial fill, this will be minimum_amount_out. When it's exact out, this will be maximum_amount_in |
swap_mode | u8 | Swap mode, refer [SwapMode] |
SwapResult#
From the program's IDL:
Encodes all results of swapping
Struct types::.
| Field | Type |
|---|---|
actual_ | u64 |
output_ | u64 |
next_ | u128 |
trading_fee | u64 |
protocol_ | u64 |
referral_ | u64 |
SwapResult2#
Struct types::.
| Field | Type |
|---|---|
included_ | u64 |
excluded_ | u64 |
amount_left | u64 |
output_ | u64 |
next_ | u128 |
trading_fee | u64 |
protocol_ | u64 |
referral_ | u64 |
TokenSupplyParams#
Struct types::.
| Field | Type | Description |
|---|---|---|
pre_ | u64 | pre migration token supply |
post_ | u64 | post migration token supply because DBC allow user to swap over the migration quote threshold, so in extreme case user may swap more than allowed buffer on curve that result the total supply in post migration may be increased a bit (between pre_migration_token_supply and post_migration_token_supply) |
VolatilityTracker#
Struct types::.
| Field | Type |
|---|---|
last_ | u64 |
padding | [u8; 8] |
sqrt_ | u128 |
volatility_ | u128 |
volatility_ | u128 |