Canonical: https://solanashreds.xyz/blog/a-pump-fun-launch-byte-by-byte

# A Pump.fun launch, byte by byte

One real token launch, taken apart: five instructions, sixteen accounts in the create call, and 164 bytes of create data decoded against the program's official IDL.

A Pump.fun launch transaction's anatomy is five instructions: two Compute Budget settings, the program's create call, an associated token account setup and a first buy. The create call carries 16 accounts and 164 bytes of data: an 8-byte discriminator, the token's name, symbol and metadata link, the creator's key, a mode flag and three fixed-width reward fields.

## The five instructions in the launch

The transaction decoded here is `3mNhCdgj…U718B` in slot 470,908,254, a version 0 transaction signed by two keys: the creator's wallet, which pays the fees, and the new mint's own keypair. It has 17 static account keys and one lookup table supplying 17 more.

| # | Program | Data | What it does |
|---|---|---|---|
| 0 | Compute Budget | `02 d2550300` | sets the compute unit limit to 218,578 |
| 1 | Compute Budget | `03 a086010000000000` | sets the unit price to 100,000 micro-lamports |
| 2 | Pump.fun | 164 bytes, starts `d6904cec5f8b31b4` | `create_v2`: makes the token and its bonding curve |
| 3 | Associated Token Account | `01` | `CreateIdempotent`: the creator's token account |
| 4 | Pump.fun | 25 bytes, starts `b817ee6167c5d33d` | `buy_v2`: the creator's first purchase |

Each program uses its own convention. Compute Budget and the token account program use a one-byte tag ([the compute budget tags](https://solanashreds.xyz/learn/compute-budget-instructions) are listed in full on their own page), while Pump.fun is an Anchor program, so each of its instructions opens with an 8-byte discriminator. Hashing the text `global:create_v2` with SHA-256 and keeping the first 8 bytes gives exactly `d6904cec5f8b31b4`, the value the official IDL lists.

## The create instruction's accounts, by role

The IDL names each of the 16 accounts. Here they are with where the key comes from, which matters for a decoder working from shreds:

| Role (IDL name) | Writable | Signer | Source of the key |
|---|---|---|---|
| mint | yes | yes | static key 1 |
| mint_authority | no | no | lookup table |
| bonding_curve | yes | no | static key 2 |
| associated_bonding_curve | yes | no | static key 3 |
| global | no | no | lookup table |
| user | yes | yes | static key 0 (fee payer) |
| system_program | no | no | lookup table |
| token_program | no | no | lookup table |
| associated_token_program | no | no | static key 15 |
| mayhem_program_id | yes | no | lookup table |
| global_params | no | no | lookup table |
| sol_vault | yes | no | lookup table |
| mayhem_state | yes | no | static key 4 |
| mayhem_token_vault | yes | no | static key 5 |
| event_authority | no | no | lookup table |
| program | no | no | static key 14 |

The accounts a listener usually wants, the new mint, its bonding curve and the creator, are static keys, so they are readable straight from the shred data. Most of the program's fixed accounts, such as its global config and event authority, sit in the lookup table; program IDs themselves are always static keys (E4 tech facts T-11). Note that this launch uses the Token-2022 program for the new mint, which matches the `create_v2` account list in the IDL.

## The create data, offset by offset

The arguments follow the discriminator in Borsh layout: strings as a 4-byte little-endian length followed by the bytes, a public key as 32 raw bytes, and fixed-width integers.

| Bytes | Field | Type | Value in this launch |
|---|---|---|---|
| 0 to 7 | discriminator | 8 bytes | `d6904cec5f8b31b4` (create_v2) |
| 8 to 11 | name length | u32 | 12 |
| 12 to 23 | name | UTF-8 | 12 bytes of text |
| 24 to 27 | symbol length | u32 | 9 |
| 28 to 36 | symbol | UTF-8 | 9 bytes of text |
| 37 to 40 | uri length | u32 | 80 |
| 41 to 120 | uri | UTF-8 | a metadata link |
| 121 to 152 | creator | public key | the signing wallet |
| 153 | is_mayhem_mode | bool | 0 |
| 154 | is_cashback_enabled | OptionBool | 0 |
| 155 to 162 | creator_fee_bps | OptionU64 | 0 |
| 163 | is_holder_reward | OptionBool | 0 |

One detail trips decoders that guess. In this IDL, `OptionBool` and `OptionU64` are defined as plain structs wrapping a bool and a u64, not as Borsh options with a tag byte. Decoding them as options shifts every later byte. Other launches set these fields differently, so decode them every time rather than assuming zero.

## The first buy in the same transaction

Instruction 4 is `buy_v2`, 25 bytes long: the discriminator, then `amount` as a u64 (1,788,384,000,000 base units of the new token), `max_sol_cost` as a u64 (51,131,250 lamports) and one byte for `partial_fill`, set to false.

Those are the creator's limits, not the result. The tokens received and the SOL actually paid are produced during execution, through inner instructions and balance changes that shreds do not carry.

## Checking the fee by hand

You can predict the fee from the raw bytes. Two signatures at 5,000 lamports each make 10,000. The priority fee is the unit price times the unit limit divided by one million: 100,000 multiplied by 218,578, then divided by 1,000,000, gives 21,857.8, rounded up to 21,858. The total, 31,858 lamports, is exactly the fee the network recorded for this transaction.

## Questions about reading a launch

### How do I recognise a Pump.fun create instruction?

Check that the instruction's program is the Pump.fun program and that its first 8 bytes match a create discriminator from the official IDL. Today's IDL lists both `create` and `create_v2`.

### Is the new mint address in the instruction data?

No. The mint is the first account in the create instruction's account list, and in this launch it is also the transaction's second signer.

### Do I need the lookup table to detect a launch?

Not for the core fields. The mint, bonding curve and creator were static keys here. You need the table to name the program's fixed accounts, such as its global config.

## What you cannot know from this transaction alone

The raw transaction shows a request. It does not show that the launch succeeded, how many tokens the first buy received or what it paid, because those come from execution. The layout is also tied to the IDL commit cited in the sources: when the program upgrades, field order or argument lists can change, so pin the IDL version your decoder uses and re-check it before trusting old offsets.

## From one launch to a listener

[The create instruction recipe](https://solanashreds.xyz/docs/programs/pump-fun) turns this anatomy into a listener, and [how the bonding curve works](https://solanashreds.xyz/learn/pump-fun-bonding-curve) explains the account the launch creates. For the 8-byte prefix, read [instruction discriminators](https://solanashreds.xyz/learn/anchor-discriminators). To weigh where launches show up first, see [launch data sources](https://solanashreds.xyz/compare/new-token-data-sources), and for what happens after migration, [PumpSwap pools](https://solanashreds.xyz/docs/programs/pumpswap). If timing matters to your listener, compare [Ultra Low Latency Shreds](https://solanashreds.xyz/ultra-low-latency-shreds).

This launch is a good example of [a composed transaction read in order](https://solanashreds.xyz/blog/one-transaction-many-instructions), and the option structs above are one of several [Borsh traps worth knowing](https://solanashreds.xyz/blog/borsh-pitfalls).
