# LaunchLab

### Common Properties

All decoded events include the following base properties from `BaseTransactionRecord`:

| Property          | Type             | JSON Type        | Description                                    |
| ----------------- | ---------------- | ---------------- | ---------------------------------------------- |
| `uuid`            | `bigint`         | `string`         | Unique identifier for the transaction record   |
| `instructionPath` | `string`         | `string`         | Path to the instruction within the transaction |
| `parentProgramId` | `string \| null` | `string \| null` | ID of the parent program if applicable         |
| `txSignature`     | `string`         | `string`         | Transaction signature                          |
| `blockTime`       | `number`         | `number`         | Block timestamp                                |
| `programId`       | `string`         | `string`         | LaunchLab program ID                           |
| `eventType`       | `string`         | `string`         | Type of event (SWAP, CREATE, MIGRATE\_CPMM)    |
| `decoderType`     | `DecoderType`    | `string`         | Decoder type identifier                        |
| `blockHeight`     | `number`         | `number`         | Block height                                   |
| `slot`            | `number`         | `number`         | Blockchain slot number                         |
| `txFee`           | `number`         | `number`         | Transaction fee in lamports                    |
| `txFeeUiAmount`   | `PreciseDecimal` | `string`         | UI-formatted transaction fee                   |

### SWAP Event&#x20;

Token swap event on LaunchLab bonding curve.

| Property                  | Type             | JSON Type | Description                                |
| ------------------------- | ---------------- | --------- | ------------------------------------------ |
| `mint`                    | `string`         | `string`  | Token mint address                         |
| `isBuy`                   | `boolean`        | `boolean` | True for buy orders, false for sell orders |
| `user`                    | `string`         | `string`  | User account address                       |
| `poolState`               | `string`         | `string`  | Pool state account address                 |
| `totalBaseSell`           | `bigint`         | `string`  | Total base tokens available for sale       |
| `totalBaseSellUiAmount`   | `PreciseDecimal` | `string`  | UI-formatted total base sell amount        |
| `virtualBase`             | `bigint`         | `string`  | Virtual base reserves                      |
| `virtualBaseUiAmount`     | `PreciseDecimal` | `string`  | UI-formatted virtual base reserves         |
| `virtualQuote`            | `bigint`         | `string`  | Virtual quote reserves                     |
| `virtualQuoteUiAmount`    | `PreciseDecimal` | `string`  | UI-formatted virtual quote reserves        |
| `realBaseBefore`          | `bigint`         | `string`  | Real base reserves before swap             |
| `realBaseBeforeUiAmount`  | `PreciseDecimal` | `string`  | UI-formatted real base before swap         |
| `realQuoteBefore`         | `bigint`         | `string`  | Real quote reserves before swap            |
| `realQuoteBeforeUiAmount` | `PreciseDecimal` | `string`  | UI-formatted real quote before swap        |
| `realBaseAfter`           | `bigint`         | `string`  | Real base reserves after swap              |
| `realBaseAfterUiAmount`   | `PreciseDecimal` | `string`  | UI-formatted real base after swap          |
| `realQuoteAfter`          | `bigint`         | `string`  | Real quote reserves after swap             |
| `realQuoteAfterUiAmount`  | `PreciseDecimal` | `string`  | UI-formatted real quote after swap         |
| `amountIn`                | `bigint`         | `string`  | Input token amount                         |
| `amountInUiAmount`        | `PreciseDecimal` | `string`  | UI-formatted input amount                  |
| `amountOut`               | `bigint`         | `string`  | Output token amount                        |
| `amountOutUiAmount`       | `PreciseDecimal` | `string`  | UI-formatted output amount                 |
| `protocolFee`             | `bigint`         | `string`  | Protocol fee amount                        |
| `protocolFeeUiAmount`     | `PreciseDecimal` | `string`  | UI-formatted protocol fee                  |
| `platformFee`             | `bigint`         | `string`  | Platform fee amount                        |
| `platformFeeUiAmount`     | `PreciseDecimal` | `string`  | UI-formatted platform fee                  |
| `shareFee`                | `bigint`         | `string`  | Share fee amount                           |
| `shareFeeUiAmount`        | `PreciseDecimal` | `string`  | UI-formatted share fee                     |
| `poolStatus`              | `string`         | `string`  | Current pool status                        |

### CREATE Event

Token creation event on LaunchLab.

| Property  | Type     | JSON Type | Description           |
| --------- | -------- | --------- | --------------------- |
| `name`    | `string` | `string`  | Token name            |
| `symbol`  | `string` | `string`  | Token symbol          |
| `uri`     | `string` | `string`  | Token metadata URI    |
| `creator` | `string` | `string`  | Token creator address |
| `mint`    | `string` | `string`  | Token mint address    |

### MIGRATE\_CPMM Event

Token migration event to CPMM pool.

| Property          | Type     | JSON Type | Description                     |
| ----------------- | -------- | --------- | ------------------------------- |
| `mint`            | `string` | `string`  | Token mint address              |
| `quoteMint`       | `string` | `string`  | Quote token mint address        |
| `programId`       | `string` | `string`  | Target program ID for migration |
| `cpSwapProgramId` | `string` | `string`  | CP swap program ID              |
| `payer`           | `string` | `string`  | Transaction payer address       |

### Data Types

* `bigint`: Large integer values for token amounts and fees
* `string`: Text values for addresses, names, and identifiers
* `boolean`: True/false values for buy/sell indicators
* `PreciseDecimal`: High-precision decimal representation for UI display
* `DecoderType`: Enum indicating the decoder type (LAUNCHLAB)

### Usage

The decoder automatically determines the event type and returns the appropriate structure. All monetary values are provided in both raw (`bigint`) and UI-formatted (`PreciseDecimal`) versions for flexibility in different use cases. The LaunchLab decoder handles bonding curve mechanics with comprehensive fee tracking and migration capabilities.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lyslabs.ai/decoders/launchlab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
