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

# LaunchLab GlobalConfig

> Protocol-level configuration accounts that bound every LaunchLab launch — fee rates, supply minimums, lock-rate ceilings, the migration wallets that gate graduation, and the per-curve indexing scheme.

> [!NOTE]
>
> `GlobalConfig` is the **protocol-level** configuration account. There can be many of them — keyed by `(curve_type, index)` — and every launch picks exactly one at `Initialize` time. The values on the chosen `GlobalConfig` then become hard limits for that launch's parameters. For platform-level customization (per-platform fee rate, allowed curve shapes, NFT splits at graduation), see [`products/launchlab/platform-config`](https://docs.raydium.io/products/launchlab/platform-config).

## What it is

A `GlobalConfig` is a singleton-per-`(curve_type, index)` PDA that fixes the protocol-side rules every launch must obey:

* The kind of bonding curve allowed (`curve_type`).
* The trade fee rate the curve charges on every buy and sell.
* The migration fee charged at graduation.
* Floors on supply, lock rate, sell rate, and migrate rate.
* The quote mint (typically wrapped SOL or USDC) — the asset users buy with.
* Four protocol-side wallets: the protocol-fee owner, the migrate-fee owner, and the two migration-control wallets retained for CPMM and legacy AMM v4 graduation.

`GlobalConfig` accounts can be created **and updated** by either the LaunchLab program admin or the delegated create-config authority; any other signer gets `InvalidOwner` (`6001`). See [`reference/program-addresses`](https://docs.raydium.io/reference/program-addresses) for the canonical authorities.

## Layout

```rust theme={null}
// states/config.rs
pub const GLOBAL_CONFIG_SEED: &str = "global_config";

#[account]
pub struct GlobalConfig {
    pub epoch:                   u64,         // recent_epoch tracker
    pub curve_type:              u8,          // 0 = ConstantProduct, 1 = FixedPrice, 2 = LinearPrice
    pub index:                   u16,         // discriminator within a curve_type
    pub migrate_fee:             u64,         // SOL paid on graduation
    pub trade_fee_rate:          u64,         // 1/1_000_000 of volume
    pub max_share_fee_rate:      u64,         // 100 bps cap on the per-trade referral share fee
    pub min_base_supply:         u64,         // floor on Initialize supply (no decimals)
    pub max_lock_rate:           u64,         // ceiling on vesting locked / supply
    pub min_base_sell_rate:      u64,         // floor on base_supply_graduation / supply
    pub min_base_migrate_rate:   u64,         // floor on tokens that seed the post-graduation pool
    pub min_quote_fund_raising:  u64,         // floor on quote_reserve_target (with decimals)
    pub quote_mint:              Pubkey,
    pub protocol_fee_owner:      Pubkey,      // claims protocol fees via CollectFee
    pub migrate_fee_owner:       Pubkey,      // claims migration fees via CollectMigrateFee
    pub migrate_to_amm_wallet:   Pubkey,      // can sign MigrateToAmm
    pub migrate_to_cpswap_wallet:Pubkey,      // can sign MigrateToCpswap
    pub padding_alignment:       [u8; 8],
    pub padding:                 [u64; 15],
}
```

PDA derivation:

```ts theme={null}
const [globalConfig] = PublicKey.findProgramAddressSync(
  [
    Buffer.from("global_config"),
    Buffer.from(quoteMint.toBytes()),
    Buffer.from([curveType]),
    u16ToBytes(index),
  ],
  LAUNCHLAB_PROGRAM_ID,
);
```

(Verify the exact seed order from the on-chain account before signing — the program's `create_config` instruction is the source of truth.)

## Field semantics

### `curve_type` and `index`

Together these key a `GlobalConfig` uniquely. There is one `GlobalConfig` per `(curve_type, index)` pair:

* `curve_type = 0` — Constant-product virtual-reserve curve. Default and most-used.
* `curve_type = 1` — Fixed-price curve.
* `curve_type = 2` — Linear-price curve.

`index` is a `u16` that lets the admin publish multiple configurations per curve type (e.g., one with a tighter fee, one with a higher minimum quote raise). At `Initialize` the launch supplies a `(curve_type, index)` pair and the program loads the matching `GlobalConfig`.

### Fees

* `trade_fee_rate` — denominated in `1/1_000_000` of trade volume. Applied to every buy and sell on the curve. The `protocol_fee_owner` claims its share via `CollectFee`.
* `migrate_fee` — a flat fee in lamports (or quote units, depending on configuration) charged once at graduation. Claimed by `migrate_fee_owner` via `CollectMigrateFee`.
* `max_share_fee_rate` — initialized to `10_000` (100 bps). Caps the `share_fee_rate` **argument** that `BuyExactIn`, `BuyExactOut`, `SellExactIn`, and `SellExactOut` accept — the referral fee paid straight to the share receiver during the trade. It does **not** bound `PlatformConfig.fee_rate`; that rate has its own caps, described in [`platform-config`](https://docs.raydium.io/products/launchlab/platform-config#rate-caps). `CreateConfig` enforces `trade_fee_rate + max_share_fee_rate < RATE_DENOMINATOR_VALUE` at init. On the update path only `param = 6` (`max_share_fee_rate`) re-checks the sum; `param = 0` (`trade_fee_rate`) asserts only `trade_fee_rate < RATE_DENOMINATOR_VALUE`, so raising the trade fee alone can push the pair over the combined bound. Set them in the order that keeps the invariant.

### Supply and rate floors

These floors bound what curve-shape parameters a launch can pick at `Initialize`. If the creator's `CurveParams` violate any of them, `Initialize` reverts with `InvalidInput`.

* `min_base_supply` — the minimum `supply` (no decimals) the curve can declare. Defaults to `10_000_000`.
* `max_lock_rate` — denominated in `1/1_000_000`; default `300_000` (30%). Bounds vesting via `total_locked_amount <= supply * max_lock_rate / 1_000_000`.
* `min_base_sell_rate` — denominated in `1/1_000_000`; default `200_000` (20%). Bounds `base_supply_graduation / supply` from below.
* `min_base_migrate_rate` — denominated in `1/1_000_000`; default `200_000` (20%). Bounds the number of tokens left over to seed the post-graduation pool.
* `min_quote_fund_raising` — minimum `quote_reserve_target` a launch may declare (with decimals). Defaults to `30_000_000_000` units of the quote mint.

### Quote mint and protocol wallets

* `quote_mint` — the asset users buy with. Most launches use wrapped SOL (`So111…112`) or USDC (`EPjF…Dt1v`). One `GlobalConfig` is bound to one quote mint; launches that need a different quote target a different `(curve_type, index)`. The mint may be owned by either the SPL Token program or Token-2022 — see below.
* `protocol_fee_owner` — pubkey that signs `CollectFee` and claims the accrued protocol fees on every launch bound to this config. Stored on-chain; admin can rotate it via `UpdateConfig`.
* `migrate_fee_owner` — pubkey that signs `CollectMigrateFee`.

#### Token-2022 quote mints

`CreateConfig` accepts a Token-2022 `quote_mint`, and pools bound to such a config carry it end to end: the quote vault, both fee vaults, and the share-fee receiver's token account are all created on Token-2022, and the swap instructions account for a `TransferFeeConfig` on the quote side. `PoolState.token_program_flag` bit1 records the choice per launch.

Two constraints are worth knowing before you rely on one:

* **The deprecated `Initialize` cannot launch against it.** Only `InitializeV2` and `InitializeWithToken2022` accept a Token-2022 quote program. See [`instructions`](https://docs.raydium.io/products/launchlab/instructions#instruction-inventory).
* **No extension allow-list is applied.** Unlike CPMM and CLMM, LaunchLab does not screen a quote mint's extensions — `CreateConfig` takes the mint as given, so the only gate is admin discretion over which mints get bound to a config. The program's `NoSupportExtension` check covers only Token-2022 base mints that LaunchLab creates itself. Treat binding one as a high-trust action; see [`reference/token-2022-support`](https://docs.raydium.io/reference/token-2022-support#launchlab-quote-mints).

### Migration wallets

The two stored graduation wallets require different signers:

* `migrate_to_amm_wallet` — signs `MigrateToAmm` for an existing legacy launch whose stored `migrate_type = 0`.
* `migrate_to_cpswap_wallet` — signs `MigrateToCpswap`. Every newly initialized launch uses this path.

These are typically held by the Raydium-operated graduation crank, so graduation lands shortly after the curve hits the threshold rather than waiting for the creator to call it.

### Platform-side allowlists

`GlobalConfig` no longer has `requires_platform_auth`. Its former byte is padding, so the account size does not change. Access is now controlled by `PlatformConfig.restrict_global_config` and `PlatformAllowConfig` accounts created by that platform's admin. See [`platform-config`](https://docs.raydium.io/products/launchlab/platform-config).

## Defaults at initialization

When `CreateConfig` is called, the program seeds many fields with hardcoded defaults:

```rust theme={null}
self.max_share_fee_rate     = 10_000;                  // 100 bps (referral share fee)
self.min_base_supply        = 10_000_000;              // no decimals
self.max_lock_rate          = 300_000;                 // 30%
self.min_base_migrate_rate  = 200_000;                 // 20%
self.min_base_sell_rate     = 200_000;                 // 20%
self.min_quote_fund_raising = 30_000_000_000;
```

The admin sets `curve_type`, `index`, `migrate_fee`, `trade_fee_rate`, `quote_mint`, and the four wallet pubkeys explicitly at create time; subsequent values can be tuned via `UpdateConfig`.

## How a launch picks a `GlobalConfig`

At `Initialize`, the creator passes:

* `(curve_type, index)` to select which `GlobalConfig` PDA to load.
* `CurveParams` describing the curve shape (`supply`, `total_base_sell`, `total_quote_fund_raising`, `migrate_type`).
* `VestingParams` describing locked supply.
* `MintParams` for the base mint.

The program enforces:

* `curve_type` matches `global_config.curve_type`.
* `supply >= global_config.min_base_supply`.
* `total_locked_amount <= supply * max_lock_rate / 1_000_000`.
* `total_base_sell >= supply * min_base_sell_rate / 1_000_000`.
* `(supply − total_base_sell − total_locked_amount) >= supply * min_base_migrate_rate / 1_000_000` — i.e., enough tokens left over to seed the post-graduation pool.
* `total_quote_fund_raising >= min_quote_fund_raising`.
* `migrate_type == 1` (`CPSWAP`).
* If the selected platform has `restrict_global_config == 1`, the matching `PlatformAllowConfig` is included.

After `Initialize`, the launch's `PoolState` stores the `global_config` pubkey directly, so the binding is permanent.

## Update path

`UpdateConfig` takes a `(param: u8, value: u64)` pair and accepts either the LaunchLab program admin **or** the delegated create-config authority as signer — any other signer gets `InvalidOwner` (`6001`). Each `param` value selects which field to mutate:

| `param` | Field changed | New value comes from | Validation |
| - | - | - | - |
| 0 | `trade_fee_rate` | `value` | `< 1_000_000` (asserted — a violation panics rather than returning an error) |
| 1 | `protocol_fee_owner` | `remaining_accounts[0].key` | must not be the default pubkey |
| 2 | `migrate_fee_owner` | `remaining_accounts[0].key` | must not be the default pubkey |
| 3 | `migrate_to_amm_wallet` | `remaining_accounts[0].key` | must not be the default pubkey |
| 4 | `migrate_to_cpswap_wallet` | `remaining_accounts[0].key` | must not be the default pubkey |
| 5 | `migrate_fee` | `value` | none |
| 6 | `max_share_fee_rate` | `value` | `< 1_000_000 − trade_fee_rate` |
| 7 | `min_base_supply` | `value` | `> 0` |
| 8 | `max_lock_rate` | `value` | `< 1_000_000` |
| 9 | `min_base_sell_rate` | `value` | `0 < v < 1_000_000` |
| 10 | `min_base_migrate_rate` | `value` | `0 < v < 1_000_000` |
| 11 | `min_quote_fund_raising` | `value` | `> 0` |

> [!WARNING]
>
> The four wallet rotations are ordinary `param` values in the same dispatch — they are **not** a
> separate argument shape. They ignore `value` entirely and read the new key from the *first*
> `remaining_account`; omitting that account panics on an `unwrap()`. Any `param` above `11` returns
> `InvalidInput` (`6002`).

The former `UpdateConfig` selector `12` for platform authorization is removed. Platform admins now manage their own allowlists.

## Reading a `GlobalConfig` from a client

```ts theme={null}
import { Raydium } from "@raydium-io/raydium-sdk-v2";

// Fetch by PDA derivation:
const [configPda] = PublicKey.findProgramAddressSync(
  [
    Buffer.from("global_config"),
    quoteMint.toBytes(),
    Buffer.from([curveType]),
    u16ToBytes(index),
  ],
  LAUNCHLAB_PROGRAM_ID,
);

// The SDK exposes the layout, not a getter — decode the account yourself:
import { LaunchpadConfig } from "@raydium-io/raydium-sdk-v2";
const info = await connection.getAccountInfo(configPda);
const config = LaunchpadConfig.decode(info!.data);
console.log(config.tradeFeeRate.toString(), config.minFundRaisingB.toString());
```

Note the layout's field names differ from the on-chain Rust names: the fund-raising floor decodes as `minFundRaisingB`, the supply floor as `minSupplyA`, and the sell/migrate rate floors as `minSellRateA` / `minMigrateRateA`.

For a UI listing all available configs, query the LaunchLab API endpoint that mirrors them (`raydium.api.fetchLaunchConfigs()`); the on-chain account count is small (single digits in practice).

## Pointers

* [`products/launchlab/platform-config`](https://docs.raydium.io/products/launchlab/platform-config) — per-platform overlay that constrains curve shape further.
* [`products/launchlab/accounts`](https://docs.raydium.io/products/launchlab/accounts) — full account graph for a launch.
* [`products/launchlab/instructions`](https://docs.raydium.io/products/launchlab/instructions) — `Initialize` and update instructions.
* [`reference/program-addresses`](https://docs.raydium.io/reference/program-addresses) — admin pubkey, program ID, shared authorities.

Sources:

* `raydium-launch/programs/launchpad/src/states/config.rs` — `GlobalConfig` struct and `initialize`.
* `raydium-launch/programs/launchpad/src/lib.rs` — `create_config`, `update_config`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.