On-chain programs

chevron-rightOrbit Finance DLMM [idl.json]hashtag
{
  "address": "Fn3fA3fjsmpULNL7E9U79jKTe1KHxPtQeWdURCbJXCnM",
  "metadata": {
    "name": "orbit_finance",
    "version": "0.1.0",
    "spec": "0.1.0"
  },
  "docs": [
    "Program entrypoint for OrbitFinance."
  ],
  "instructions": [
    {
      "name": "claim_protocol_fees",
      "docs": [
        "Claims protocol fees from fee vaults."
      ],
      "discriminator": [
        34,
        142,
        219,
        112,
        109,
        54,
        133,
        23
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "fee_withdraw_authority",
          "signer": true
        },
        {
          "name": "creator_fee_vault",
          "writable": true
        },
        {
          "name": "creator_destination",
          "docs": [
            "Where creator fees are finally sent (pool creator, DAO treasury, etc.)"
          ],
          "writable": true
        },
        {
          "name": "holders_fee_vault",
          "writable": true
        },
        {
          "name": "holders_destination",
          "docs": [
            "Aggregator / distributor for token holders rewards"
          ],
          "writable": true
        },
        {
          "name": "nft_fee_vault",
          "writable": true
        },
        {
          "name": "nft_destination",
          "docs": [
            "Aggregator / distributor for NFT holders rewards"
          ],
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "take_creator",
          "type": "u64"
        },
        {
          "name": "take_holders",
          "type": "u64"
        },
        {
          "name": "take_nft",
          "type": "u64"
        }
      ]
    },
    {
      "name": "create_liquidity_bin",
      "docs": [
        "Creates a new liquidity bin."
      ],
      "discriminator": [
        143,
        97,
        237,
        207,
        213,
        220,
        250,
        67
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "liquidity_bin",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  98,
                  105,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "pool"
              },
              {
                "kind": "arg",
                "path": "bin_index"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "bin_index",
          "type": "u64"
        },
        {
          "name": "lower_bound_q64_64",
          "type": "u128"
        },
        {
          "name": "upper_bound_q64_64",
          "type": "u128"
        },
        {
          "name": "liquidity",
          "type": "u128"
        }
      ]
    },
    {
      "name": "deposit_into_bins",
      "docs": [
        "Deposits liquidity into specific bins; mints LP shares to the depositor."
      ],
      "discriminator": [
        54,
        211,
        101,
        119,
        71,
        98,
        126,
        228
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "depositor",
          "docs": [
            "Depositor & LP receiver"
          ],
          "signer": true
        },
        {
          "name": "depositor_base",
          "writable": true
        },
        {
          "name": "depositor_quote",
          "writable": true
        },
        {
          "name": "base_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true
        },
        {
          "name": "lp_mint",
          "writable": true
        },
        {
          "name": "depositor_lp",
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "entries",
          "type": {
            "vec": {
              "defined": {
                "name": "BinDeposit"
              }
            }
          }
        },
        {
          "name": "min_shares_out",
          "type": "u64"
        }
      ]
    },
    {
      "name": "init_pool",
      "docs": [
        "Initializes a new liquidity pool (state + lp_mint + registry)."
      ],
      "discriminator": [
        116,
        233,
        199,
        204,
        115,
        159,
        171,
        36
      ],
      "accounts": [
        {
          "name": "admin",
          "docs": [
            "Pays for initialization; becomes pool admin (can be rotated later)."
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "creator"
        },
        {
          "name": "base_mint_account"
        },
        {
          "name": "quote_mint_account"
        },
        {
          "name": "pool",
          "docs": [
            "Pool state account (PDA) - zero_copy for stack efficiency."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  111,
                  111,
                  108
                ]
              },
              {
                "kind": "arg",
                "path": "base_mint"
              },
              {
                "kind": "arg",
                "path": "quote_mint"
              }
            ]
          }
        },
        {
          "name": "lp_mint",
          "writable": true,
          "signer": true
        },
        {
          "name": "registry",
          "docs": [
            "Pair registry PDA to prevent duplicate pools."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114,
                  101,
                  103,
                  105,
                  115,
                  116,
                  114,
                  121
                ]
              },
              {
                "kind": "arg",
                "path": "base_mint"
              },
              {
                "kind": "arg",
                "path": "quote_mint"
              }
            ]
          }
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "base_mint",
          "type": "pubkey"
        },
        {
          "name": "quote_mint",
          "type": "pubkey"
        },
        {
          "name": "bin_step_bps",
          "type": "u16"
        },
        {
          "name": "initial_price_q64_64",
          "type": "u128"
        },
        {
          "name": "fee_config",
          "type": {
            "defined": {
              "name": "FeeConfig"
            }
          }
        }
      ]
    },
    {
      "name": "init_pool_vaults",
      "docs": [
        "Initializes the pool’s vault token accounts and writes them into Pool."
      ],
      "discriminator": [
        209,
        118,
        61,
        154,
        158,
        189,
        162,
        244
      ],
      "accounts": [
        {
          "name": "admin",
          "docs": [
            "Payer for account creations"
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "pool",
          "docs": [
            "Pool PDA (already initialized by `init_pool`)"
          ],
          "writable": true
        },
        {
          "name": "base_mint_account",
          "docs": [
            "Mints (validated against pool to prevent mismatches)"
          ]
        },
        {
          "name": "quote_mint_account"
        },
        {
          "name": "base_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "pool"
              },
              {
                "kind": "const",
                "value": [
                  98,
                  97,
                  115,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "quote_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "pool"
              },
              {
                "kind": "const",
                "value": [
                  113,
                  117,
                  111,
                  116,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "creator_fee_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "pool"
              },
              {
                "kind": "const",
                "value": [
                  99,
                  114,
                  101,
                  97,
                  116,
                  111,
                  114,
                  95,
                  102,
                  101,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "holders_fee_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "pool"
              },
              {
                "kind": "const",
                "value": [
                  104,
                  111,
                  108,
                  100,
                  101,
                  114,
                  115,
                  95,
                  102,
                  101,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "nft_fee_vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "pool"
              },
              {
                "kind": "const",
                "value": [
                  110,
                  102,
                  116,
                  95,
                  102,
                  101,
                  101
                ]
              }
            ]
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "lock_liquidity",
      "docs": [
        "Locks liquidity metadata."
      ],
      "discriminator": [
        179,
        201,
        236,
        158,
        212,
        98,
        70,
        182
      ],
      "accounts": [
        {
          "name": "pool",
          "docs": [
            "Pool state (PDA) - validated in function body"
          ],
          "writable": true
        },
        {
          "name": "liquidity_lock",
          "docs": [
            "Per-user lock record (PDA) - manually initialized"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  108,
                  111,
                  99,
                  107
                ]
              },
              {
                "kind": "account",
                "path": "user"
              },
              {
                "kind": "account",
                "path": "pool"
              }
            ]
          }
        },
        {
          "name": "user",
          "docs": [
            "User who owns the lock record"
          ],
          "writable": true,
          "signer": true
        },
        {
          "name": "user_lp",
          "docs": [
            "User LP account to validate they have enough tokens and transfer from"
          ],
          "writable": true
        },
        {
          "name": "lp_mint"
        },
        {
          "name": "escrow_lp",
          "docs": [
            "Escrow account owned by pool PDA to hold locked LP tokens"
          ],
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "lock_duration",
          "type": "i64"
        }
      ]
    },
    {
      "name": "set_pause",
      "docs": [
        "Pauses or unpauses the pool."
      ],
      "discriminator": [
        63,
        32,
        154,
        2,
        56,
        103,
        79,
        45
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "pause",
          "type": "bool"
        }
      ]
    },
    {
      "name": "set_pause_bits",
      "docs": [
        "Sets pause bits for the pool (pause_guardian only)."
      ],
      "discriminator": [
        122,
        45,
        85,
        156,
        176,
        64,
        45,
        83
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "pause_guardian",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "new_bits",
          "type": "u8"
        }
      ]
    },
    {
      "name": "swap",
      "docs": [
        "Executes a swap against the pool.",
        "matching the internal signature and avoiding the `'1` vs `'2` lifetime clash."
      ],
      "discriminator": [
        248,
        198,
        158,
        145,
        225,
        117,
        135,
        200
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "user",
          "signer": true
        },
        {
          "name": "user_source",
          "writable": true
        },
        {
          "name": "user_destination",
          "writable": true
        },
        {
          "name": "base_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true
        },
        {
          "name": "creator_fee_vault",
          "writable": true
        },
        {
          "name": "holders_fee_vault",
          "writable": true
        },
        {
          "name": "nft_fee_vault",
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount_in",
          "type": "u64"
        },
        {
          "name": "min_amount_out",
          "type": "u64"
        },
        {
          "name": "route",
          "type": {
            "defined": {
              "name": "SwapRoute"
            }
          }
        }
      ]
    },
    {
      "name": "update_admin",
      "docs": [
        "Updates the pool admin (admin only)."
      ],
      "discriminator": [
        161,
        176,
        40,
        213,
        60,
        184,
        179,
        228
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "new_admin",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "update_authorities",
      "docs": [
        "Updates pool authorities (admin only)."
      ],
      "discriminator": [
        175,
        228,
        137,
        18,
        175,
        70,
        220,
        165
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "config_authority",
          "type": "pubkey"
        },
        {
          "name": "pause_guardian",
          "type": "pubkey"
        },
        {
          "name": "fee_withdraw_authority",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "update_fee_config",
      "docs": [
        "Updates the pool fee configuration."
      ],
      "discriminator": [
        104,
        184,
        103,
        242,
        88,
        151,
        107,
        20
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "new_fee_config",
          "type": {
            "defined": {
              "name": "FeeConfig"
            }
          }
        }
      ]
    },
    {
      "name": "withdraw_liquidity",
      "docs": [
        "Admin-only withdrawal"
      ],
      "discriminator": [
        149,
        158,
        33,
        185,
        47,
        243,
        253,
        31
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "admin",
          "signer": true
        },
        {
          "name": "base_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true
        },
        {
          "name": "lp_mint",
          "writable": true
        },
        {
          "name": "admin_lp",
          "writable": true
        },
        {
          "name": "admin_base",
          "writable": true
        },
        {
          "name": "admin_quote",
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "shares_to_burn",
          "type": "u64"
        }
      ]
    },
    {
      "name": "withdraw_user",
      "docs": [
        "User withdrawal: burns LP shares and returns pro-rata assets."
      ],
      "discriminator": [
        86,
        169,
        152,
        107,
        33,
        180,
        134,
        115
      ],
      "accounts": [
        {
          "name": "pool",
          "writable": true
        },
        {
          "name": "user",
          "writable": true,
          "signer": true
        },
        {
          "name": "user_lp",
          "writable": true
        },
        {
          "name": "liquidity_lock",
          "docs": [
            "If account doesn't exist, user has no active locks",
            "We use UncheckedAccount and validate manually to handle cases where account doesn't exist"
          ]
        },
        {
          "name": "lp_mint",
          "writable": true
        },
        {
          "name": "base_vault",
          "writable": true
        },
        {
          "name": "quote_vault",
          "writable": true
        },
        {
          "name": "user_base",
          "writable": true
        },
        {
          "name": "user_quote",
          "writable": true
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "shares_to_burn",
          "type": "u64"
        },
        {
          "name": "min_base_out",
          "type": "u64"
        },
        {
          "name": "min_quote_out",
          "type": "u64"
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "LiquidityBin",
      "discriminator": [
        4,
        80,
        150,
        39,
        152,
        88,
        42,
        158
      ]
    },
    {
      "name": "PairRegistry",
      "discriminator": [
        180,
        142,
        99,
        6,
        243,
        194,
        134,
        152
      ]
    },
    {
      "name": "Pool",
      "discriminator": [
        241,
        154,
        109,
        4,
        17,
        177,
        109,
        188
      ]
    }
  ],
  "events": [
    {
      "name": "AdminUpdated",
      "discriminator": [
        69,
        82,
        49,
        171,
        43,
        3,
        80,
        161
      ]
    },
    {
      "name": "AuthoritiesUpdated",
      "discriminator": [
        67,
        41,
        36,
        180,
        223,
        84,
        221,
        76
      ]
    },
    {
      "name": "BinLiquidityUpdated",
      "discriminator": [
        75,
        48,
        154,
        36,
        109,
        209,
        141,
        126
      ]
    },
    {
      "name": "FeeConfigUpdated",
      "discriminator": [
        45,
        50,
        42,
        173,
        193,
        67,
        52,
        244
      ]
    },
    {
      "name": "FeesDistributed",
      "discriminator": [
        209,
        24,
        174,
        200,
        236,
        90,
        154,
        55
      ]
    },
    {
      "name": "LiquidityBinCreated",
      "discriminator": [
        193,
        62,
        251,
        203,
        209,
        242,
        92,
        48
      ]
    },
    {
      "name": "LiquidityDeposited",
      "discriminator": [
        218,
        155,
        74,
        193,
        59,
        66,
        94,
        122
      ]
    },
    {
      "name": "LiquidityLocked",
      "discriminator": [
        150,
        201,
        204,
        183,
        217,
        13,
        119,
        185
      ]
    },
    {
      "name": "LiquidityWithdrawnAdmin",
      "discriminator": [
        236,
        107,
        253,
        125,
        227,
        157,
        155,
        123
      ]
    },
    {
      "name": "LiquidityWithdrawnUser",
      "discriminator": [
        142,
        245,
        211,
        16,
        66,
        171,
        36,
        40
      ]
    },
    {
      "name": "PairRegistered",
      "discriminator": [
        125,
        143,
        112,
        66,
        5,
        53,
        110,
        4
      ]
    },
    {
      "name": "PauseUpdated",
      "discriminator": [
        203,
        203,
        33,
        225,
        130,
        103,
        90,
        105
      ]
    },
    {
      "name": "PoolInitialized",
      "discriminator": [
        100,
        118,
        173,
        87,
        12,
        198,
        254,
        229
      ]
    },
    {
      "name": "SwapExecuted",
      "discriminator": [
        150,
        166,
        26,
        225,
        28,
        89,
        38,
        79
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "InvalidLiquidity",
      "msg": "The provided liquidity value is invalid."
    },
    {
      "code": 6001,
      "name": "CalculationError",
      "msg": "Calculation error occurred during arithmetic operations."
    },
    {
      "code": 6002,
      "name": "InvalidInput",
      "msg": "The provided input data is invalid."
    },
    {
      "code": 6003,
      "name": "InternalInconsistency",
      "msg": "Operation aborted due to an internal inconsistency."
    },
    {
      "code": 6004,
      "name": "UnknownError",
      "msg": "An unknown error has occurred."
    },
    {
      "code": 6005,
      "name": "SlippageExceeded",
      "msg": "The swap operation did not meet the minimum output requirements due to slippage protection."
    },
    {
      "code": 6006,
      "name": "InsufficientLiquidity",
      "msg": "The pool does not have sufficient liquidity to perform this operation."
    },
    {
      "code": 6007,
      "name": "UnauthorizedOperation",
      "msg": "Unauthorized operation attempted."
    },
    {
      "code": 6008,
      "name": "InvalidAuthority",
      "msg": "Invalid or missing protocol authority for this operation."
    },
    {
      "code": 6009,
      "name": "InvalidAccountState",
      "msg": "The account state is invalid."
    },
    {
      "code": 6010,
      "name": "MintMismatch",
      "msg": "Token account mint does not match expected mint for this pool."
    },
    {
      "code": 6011,
      "name": "OwnerMismatch",
      "msg": "Token account owner does not match expected authority."
    },
    {
      "code": 6012,
      "name": "TokenTransferFailed",
      "msg": "Token transfer failed to execute correctly."
    },
    {
      "code": 6013,
      "name": "PoolPaused",
      "msg": "Pool is currently paused."
    },
    {
      "code": 6014,
      "name": "OperationDisabled",
      "msg": "The requested operation is currently disabled."
    },
    {
      "code": 6015,
      "name": "MigrationFailed",
      "msg": "Migration failed for this pool account."
    },
    {
      "code": 6016,
      "name": "VersionMismatch",
      "msg": "On-chain version mismatch detected."
    },
    {
      "code": 6017,
      "name": "PoolAlreadyExists",
      "msg": "Pool already exists for this token pair and configuration."
    },
    {
      "code": 6018,
      "name": "PoolNotFound",
      "msg": "Pool not found for the requested token pair and configuration."
    },
    {
      "code": 6019,
      "name": "PairOrderingViolation",
      "msg": "Invalid pair ordering; token pair must be canonicalized."
    },
    {
      "code": 6020,
      "name": "RegistryViolation",
      "msg": "Pair registry constraint violated."
    },
    {
      "code": 6021,
      "name": "BinAlreadyExists",
      "msg": "Liquidity bin already exists for this index."
    },
    {
      "code": 6022,
      "name": "BinNotFound",
      "msg": "Liquidity bin not found for the requested index."
    },
    {
      "code": 6023,
      "name": "InvalidBinBounds",
      "msg": "Invalid liquidity bin bounds."
    },
    {
      "code": 6024,
      "name": "LPTokenMismatch",
      "msg": "LP token mint or account does not match this pool."
    },
    {
      "code": 6025,
      "name": "NotEnoughShares",
      "msg": "Not enough LP shares to complete this operation."
    },
    {
      "code": 6026,
      "name": "LPVaultMismatch",
      "msg": "LP vault or escrow does not match expected authority."
    },
    {
      "code": 6027,
      "name": "ReentrancyDetected",
      "msg": "Reentrancy detected: operation aborted for security reasons."
    },
    {
      "code": 6028,
      "name": "PriceOutOfRange",
      "msg": "Initial deposit price deviates from target"
    },
    {
      "code": 6029,
      "name": "PoolNotEmpty",
      "msg": "Pool reserves must be empty on bootstrap"
    },
    {
      "code": 6030,
      "name": "InvalidVaultOwner",
      "msg": "Vault is not owned by the SPL Token program"
    },
    {
      "code": 6031,
      "name": "InvalidVaultAuthority",
      "msg": "Vault has an unexpected authority"
    },
    {
      "code": 6032,
      "name": "InvalidVaultMint",
      "msg": "Vault has an unexpected mint"
    },
    {
      "code": 6033,
      "name": "InvalidVaultData",
      "msg": "Account data is too short to be a valid SPL Token account"
    },
    {
      "code": 6034,
      "name": "ActiveLock",
      "msg": "Liquidity is currently locked and cannot be withdrawn until the lock period expires."
    },
    {
      "code": 6035,
      "name": "InsufficientLP",
      "msg": "Insufficient LP tokens for this operation."
    }
  ],
  "types": [
    {
      "name": "AdminUpdated",
      "docs": [
        "Emitted when the admin rotates to a new key."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "old_admin",
            "type": "pubkey"
          },
          {
            "name": "new_admin",
            "type": "pubkey"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "AuthoritiesUpdated",
      "docs": [
        "Emitted when auxiliary authorities are updated."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "config_authority",
            "type": "pubkey"
          },
          {
            "name": "pause_guardian",
            "type": "pubkey"
          },
          {
            "name": "fee_withdraw_authority",
            "type": "pubkey"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "BinDeposit",
      "docs": [
        "Per-bin deposit instruction argument"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bin_index",
            "type": "u64"
          },
          {
            "name": "base_in",
            "type": "u64"
          },
          {
            "name": "quote_in",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "BinLiquidityUpdated",
      "docs": [
        "Emitted whenever a bin’s reserves change (e.g., deposit or swap traversal)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "bin_index",
            "type": "i64"
          },
          {
            "name": "delta_base",
            "docs": [
              "Change in base/quote reserve (unsigned magnitudes)."
            ],
            "type": "u128"
          },
          {
            "name": "delta_quote",
            "type": "u128"
          },
          {
            "name": "reserve_base",
            "docs": [
              "Resulting reserves after the change."
            ],
            "type": "u128"
          },
          {
            "name": "reserve_quote",
            "type": "u128"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FeeConfig",
      "docs": [
        "Fee distribution configuration for the pool."
      ],
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "base_fee_bps",
            "type": "u16"
          },
          {
            "name": "creator_cut_bps",
            "type": "u16"
          },
          {
            "name": "split_holders_microbps",
            "type": "u32"
          },
          {
            "name": "split_nft_microbps",
            "type": "u32"
          },
          {
            "name": "split_creator_extra_microbps",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "FeeConfigUpdated",
      "docs": [
        "Emitted whenever the fee configuration is changed."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "base_fee_bps",
            "type": "u16"
          },
          {
            "name": "creator_cut_bps",
            "type": "u16"
          },
          {
            "name": "split_holders_microbps",
            "type": "u32"
          },
          {
            "name": "split_nft_microbps",
            "type": "u32"
          },
          {
            "name": "split_creator_extra_microbps",
            "type": "u32"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "FeesDistributed",
      "docs": [
        "Emitted when fees are split to fee vaults during swap."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "total_fee",
            "type": "u64"
          },
          {
            "name": "creator_fee",
            "type": "u64"
          },
          {
            "name": "holders_fee",
            "type": "u64"
          },
          {
            "name": "nft_fee",
            "type": "u64"
          },
          {
            "name": "creator_extra_fee",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LiquidityBin",
      "docs": [
        "Discrete liquidity bin (price bucket)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "docs": [
              "Owning pool."
            ],
            "type": "pubkey"
          },
          {
            "name": "bin_index",
            "docs": [
              "Bin index (PDA uses u64 LE for seeds). Math uses signed i32."
            ],
            "type": "u64"
          },
          {
            "name": "lower_bound_q64_64",
            "docs": [
              "Optional bounds for analytics / sanity (Q64.64)."
            ],
            "type": "u128"
          },
          {
            "name": "upper_bound_q64_64",
            "type": "u128"
          },
          {
            "name": "liquidity",
            "docs": [
              "Optional notion of \"liquidity units\" (for analytics)."
            ],
            "type": "u128"
          },
          {
            "name": "reserve_base",
            "docs": [
              "Actual reserves at this bin's fixed price."
            ],
            "type": "u128"
          },
          {
            "name": "reserve_quote",
            "type": "u128"
          },
          {
            "name": "fee_growth_base_q128",
            "docs": [
              "Cumulative fee growth (per 1 unit of base/quote) in Q128 domain."
            ],
            "type": "u128"
          },
          {
            "name": "fee_growth_quote_q128",
            "type": "u128"
          },
          {
            "name": "bump",
            "docs": [
              "PDA bump."
            ],
            "type": "u8"
          },
          {
            "name": "_reserved",
            "docs": [
              "Padding / future use."
            ],
            "type": {
              "array": [
                "u8",
                7
              ]
            }
          }
        ]
      }
    },
    {
      "name": "LiquidityBinCreated",
      "docs": [
        "Emitted when a new liquidity bin is created."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "bin_index",
            "type": "u64"
          },
          {
            "name": "lower_bound_q64_64",
            "type": "u128"
          },
          {
            "name": "upper_bound_q64_64",
            "type": "u128"
          },
          {
            "name": "initial_liquidity",
            "docs": [
              "Initial bin liquidity recorded at creation."
            ],
            "type": "u128"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LiquidityDeposited",
      "docs": [
        "Emitted when a user deposits liquidity and receives LP shares."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "base_amount",
            "type": "u64"
          },
          {
            "name": "quote_amount",
            "type": "u64"
          },
          {
            "name": "shares_minted",
            "docs": [
              "LP shares minted to the user (LP mint decimals, typically 9)."
            ],
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LiquidityLocked",
      "docs": [
        "Emitted when a user locks liquidity (book-entry in current code)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          },
          {
            "name": "lock_end",
            "type": "i64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LiquidityWithdrawnAdmin",
      "docs": [
        "Emitted when an admin performs a legacy/admin-only withdrawal."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "base_amount_out",
            "type": "u64"
          },
          {
            "name": "quote_amount_out",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "LiquidityWithdrawnUser",
      "docs": [
        "Emitted when a user withdraws by burning LP shares."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "shares_burned",
            "type": "u64"
          },
          {
            "name": "base_amount_out",
            "type": "u64"
          },
          {
            "name": "quote_amount_out",
            "type": "u64"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "PairRegistered",
      "docs": [
        "Emitted if you keep a separate register_pair instruction (factory/registry path)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "base_mint",
            "type": "pubkey"
          },
          {
            "name": "quote_mint",
            "type": "pubkey"
          },
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "bin_step_bps",
            "type": "u16"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "PairRegistry",
      "docs": [
        "Pair registry to prevent duplicate pools beyond canonical ordering.",
        "PDA seeds: [b\"registry\", base_mint, quote_mint] (where base_mint < quote_mint)"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "base_mint",
            "docs": [
              "Canonical pair (base < quote)"
            ],
            "type": "pubkey"
          },
          {
            "name": "quote_mint",
            "type": "pubkey"
          },
          {
            "name": "pool",
            "docs": [
              "Pool address created for this pair."
            ],
            "type": "pubkey"
          },
          {
            "name": "bin_step_bps",
            "docs": [
              "Bin step used by this pool (bps)."
            ],
            "type": "u16"
          },
          {
            "name": "created_at",
            "docs": [
              "Creation timestamp."
            ],
            "type": "i64"
          },
          {
            "name": "bump",
            "docs": [
              "Bump seed."
            ],
            "type": "u8"
          },
          {
            "name": "_reserved",
            "docs": [
              "Reserved for future config (e.g., flags)."
            ],
            "type": {
              "array": [
                "u8",
                13
              ]
            }
          }
        ]
      }
    },
    {
      "name": "PauseUpdated",
      "docs": [
        "Emitted when pause bitmask changes."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "paused",
            "docs": [
              "Bitmask of paused features (see state/flags.rs):",
              "PAUSE_SWAP | PAUSE_DEPOSIT | PAUSE_WITHDRAW"
            ],
            "type": "u8"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Pool",
      "docs": [
        "Main pool account holding configuration, authorities, price cache and vaults.",
        "Fields are ordered to minimize padding for zero-copy compatibility.",
        "Using unsafe Pod/Zeroable impl because #[repr(C)] may add minimal padding",
        "between fields of different alignments, but all fields are Pod-compatible."
      ],
      "serialization": "bytemuck",
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "config_authority",
            "type": "pubkey"
          },
          {
            "name": "pause_guardian",
            "type": "pubkey"
          },
          {
            "name": "fee_withdraw_authority",
            "type": "pubkey"
          },
          {
            "name": "creator",
            "type": "pubkey"
          },
          {
            "name": "base_mint",
            "type": "pubkey"
          },
          {
            "name": "quote_mint",
            "type": "pubkey"
          },
          {
            "name": "base_vault",
            "type": "pubkey"
          },
          {
            "name": "quote_vault",
            "type": "pubkey"
          },
          {
            "name": "creator_fee_vault",
            "type": "pubkey"
          },
          {
            "name": "holders_fee_vault",
            "type": "pubkey"
          },
          {
            "name": "nft_fee_vault",
            "type": "pubkey"
          },
          {
            "name": "lp_mint",
            "type": "pubkey"
          },
          {
            "name": "price_q64_64",
            "type": "u128"
          },
          {
            "name": "total_shares",
            "type": "u128"
          },
          {
            "name": "total_holder_units",
            "type": "u128"
          },
          {
            "name": "total_nft_units",
            "type": "u128"
          },
          {
            "name": "reward_indexes",
            "type": {
              "defined": {
                "name": "RewardIndexes"
              }
            }
          },
          {
            "name": "last_updated",
            "type": "i64"
          },
          {
            "name": "initial_bin_id",
            "type": "i32"
          },
          {
            "name": "active_bin",
            "type": "i32"
          },
          {
            "name": "split_holders_microbps",
            "type": "u32"
          },
          {
            "name": "split_nft_microbps",
            "type": "u32"
          },
          {
            "name": "split_creator_extra_microbps",
            "type": "u32"
          },
          {
            "name": "bin_step_bps",
            "type": "u16"
          },
          {
            "name": "base_fee_bps",
            "type": "u16"
          },
          {
            "name": "creator_cut_bps",
            "type": "u16"
          },
          {
            "name": "version",
            "type": "u8"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "pause_bits",
            "type": "u8"
          },
          {
            "name": "_pad",
            "type": {
              "array": [
                "u8",
                27
              ]
            }
          }
        ]
      }
    },
    {
      "name": "PoolInitialized",
      "docs": [
        "Emitted once when a pool is initialized."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "admin",
            "type": "pubkey"
          },
          {
            "name": "creator",
            "type": "pubkey"
          },
          {
            "name": "base_mint",
            "type": "pubkey"
          },
          {
            "name": "quote_mint",
            "type": "pubkey"
          },
          {
            "name": "bin_step_bps",
            "type": "u16"
          },
          {
            "name": "initial_price_q64_64",
            "type": "u128"
          },
          {
            "name": "base_fee_bps",
            "type": "u16"
          },
          {
            "name": "creator_cut_bps",
            "type": "u16"
          },
          {
            "name": "split_holders_microbps",
            "type": "u32"
          },
          {
            "name": "split_nft_microbps",
            "type": "u32"
          },
          {
            "name": "split_creator_extra_microbps",
            "type": "u32"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RewardIndexes",
      "docs": [
        "Tracks accumulated reward indexes for holders and NFT stakers."
      ],
      "repr": {
        "kind": "c"
      },
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "holders_q128",
            "type": "u128"
          },
          {
            "name": "nft_q128",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "SwapExecuted",
      "docs": [
        "Emitted on each swap execution."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pool",
            "type": "pubkey"
          },
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "in_mint",
            "type": "pubkey"
          },
          {
            "name": "out_mint",
            "type": "pubkey"
          },
          {
            "name": "amount_in",
            "type": "u64"
          },
          {
            "name": "amount_out",
            "type": "u64"
          },
          {
            "name": "total_fee",
            "docs": [
              "Total fee charged (token domain depends on direction; commonly quote)."
            ],
            "type": "u64"
          },
          {
            "name": "price_after_q64_64",
            "docs": [
              "Post-swap price marker in Q64.64."
            ],
            "type": "u128"
          },
          {
            "name": "ts",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "SwapRoute",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "bin_indices",
            "type": {
              "vec": "i32"
            }
          }
        ]
      }
    }
  ]
}
chevron-rightCipherlabs Squads Multisig [DLMM authority]hashtag

For admin actions such as "pause" which can be used in critical situations, we are using a Squads Multisig 2 out of 2.

7nEfnDyd7ZuzK2UK4mqqP45js89YdeWBqyUmd9KCxNrn

Last updated