Skip to content

Solana market identification

Trading terminals and indexers can identify a current Candle launch from its creation transaction. Use the Candle attribution signer for fast discovery, then verify the Candle launch instruction before classifying the mint.

PurposeAddress
Candle attribution signerCNDLVYCkAw5agDbwpSDKiagdyqBdbSgxP4kmysbt24Y2
Candle bonding-curve program6wXTwJwdtA5RhNu6VyYnBzrV51TbsMpTbo5kZv2zdssG

The attribution address is a signer, not the token creator, fee payer, or mint authority. It is deliberately included as a read-only signer in launch transactions so indexers such as Axiom, GMGN, and Fomo.family can attribute the launch to Candle.

For each successful Solana transaction:

  1. Resolve the complete v0 message account list, including address lookup-table accounts.
  2. Confirm CNDLVYCkAw5agDbwpSDKiagdyqBdbSgxP4kmysbt24Y2 is a required transaction signer.
  3. Find the top-level instruction whose program ID is 6wXTwJwdtA5RhNu6VyYnBzrV51TbsMpTbo5kZv2zdssG and whose first eight data bytes are the initialize_pool discriminator [95, 180, 10, 172, 84, 174, 232, 40].
  4. Read base_mint and quote_mint from that instruction’s account list (positions 1 and 4), and the pool from position 2.
  5. Index base_mint as the launched token and the pool as its pre-graduation market.

This rule covers current Open and Exclusive launches and all supported Solana quote assets. Launch tier and quote asset change the curve configuration; they do not change the attribution signer or launch program.

Discovery does not have to start from a transaction. Every curve is a Pool account owned by the bonding-curve program, and Anchor prefixes each account with an eight-byte type discriminator, so a single call returns the complete set:

const pools = await connection.getProgramAccounts(
new PublicKey("6wXTwJwdtA5RhNu6VyYnBzrV51TbsMpTbo5kZv2zdssG"),
{ filters: [{ memcmp: { offset: 0, bytes: bs58.encode(Buffer.from([241, 154, 109, 4, 17, 177, 109, 188])) } }] },
)

This is the recommended way to backfill history or reconcile an index, because it does not depend on transaction retention. Pair it with the detection rule above when you need to confirm provenance for one specific mint.

For a candidate mint, locate its successful creation transaction and apply the signer and initialize_pool checks above. A CNDL vanity suffix, token name, symbol, metadata URI, creator address, or Candle API label is not proof of provenance.

For a candidate pre-graduation pool, require all of the following:

  • The account is owned by the canonical Candle bonding-curve program.
  • Its first eight bytes are the Pool discriminator [241, 154, 109, 4, 17, 177, 109, 188].
  • Its decoded base_mint, quote_mint, and pool address agree with the verified initialize_pool transaction.

After migration, identify the Meteora market from Candle’s migration state and transaction rather than selecting an arbitrary external pool for the same mint.

Creation is only the first step. A terminal should continue to read the Candle pool state and route by lifecycle. The pool’s is_migrated boolean, together with quote_reserve against migration_threshold, is the authoritative source:

StatePool stateTerminal behavior
Trading on the curveis_migrated = falseQuote and execute against the Candle bonding-curve program
Graduated, migration pendingis_migrated = true, no MigrationWithdrawn yet for the poolStop routing to the curve; show the token as graduating
Migratedis_migrated = true and MigrationWithdrawn emittedDiscover and route to the resulting Meteora DAMM v2 market

Despite its name, is_migrated is the graduated flag. The program sets it inside the buy that brings quote_reserve to migration_threshold, and that same buy emits PoolMigrated (pool, final_quote_reserve) right before its SwapExecuted. Candle’s launch service then calls withdraw_for_migration, which moves the curve’s liquidity out and emits MigrationWithdrawn, and creates the DAMM v2 pool. There is no graduate instruction to watch for.

Treat is_migrated = true as closed. Do not quote or route a buy or sell to a curve in that state, even if a simulation happens to succeed.

Do not infer the active venue only from token age, liquidity, or the existence of an external pair. See Solana lifecycle and migration for state transitions and Terminals and indexers for the complete integration checklist.

Curve trades are the two swap instructions, and each emits one SwapExecuted event carrying the full fill:

FieldMeaning
poolThe curve the trade executed against
userThe trader
amount_in, amount_outFilled amounts, in base units of the respective mints
feeFee taken, in the input mint’s base units
is_buytrue for quote to base, false for base to quote
quote_reserve, base_reservePost-trade reserves, for price and progress
migration_thresholdGraduation target, so progress is computable from the event alone

Anchor emits events as a CPI to the program’s event_authority, so they appear in inner instructions rather than only in log strings. Match the eight-byte event discriminator from the table below at the start of the event data.

Metadata follows the Metaplex Token Metadata standard. The uri set at launch points to a JSON document with name, description, image, symbol, and an extensions object holding social links.

Images are referenced from inside that JSON and are never part of the transaction. Metadata content is not proof of provenance; only the program and instruction checks above are.

The current interface is published as an Anchor IDL at /idl/gated_bonding_curve.json. The program also publishes its IDL on chain, so explorers decode its instructions automatically and an Anchor client can build itself with no vendored interface file:

const provider = new AnchorProvider(connection, wallet, {})
const idl = await Program.fetchIdl(new PublicKey("6wXTwJwdtA5RhNu6VyYnBzrV51TbsMpTbo5kZv2zdssG"), provider)
const program = new Program(idl, provider)
const pools = await program.account.pool.all() // every Candle curve, decoded

The IDL account is at J3jFy9rBfH7YTQJabNrUAFb6Nj9pgf1godrUWkF2GkGY, derived as createWithSeed(findProgramAddress([], programId)[0], "anchor:idl", programId). anchor idl fetch 6wXTwJwdtA5RhNu6VyYnBzrV51TbsMpTbo5kZv2zdssG prints the same document. Its update authority is the same multisig that holds the program’s upgrade authority.

The on-chain IDL was republished for the upgrade on 2026-11-05 and is byte-for-byte the document served at /idl/gated_bonding_curve.json. A client that cached the IDL before that date builds 11-account buys, which now fail: fetch it again.

Everything below is the same interface expressed as raw bytes, for clients that do not use Anchor. Discriminators are the first eight bytes of sha256("global:<instruction>") for instructions, sha256("account:<Account>") for accounts, and sha256("event:<Event>") for events.

KindNameDiscriminator
Instructioninitialize_pool[95, 180, 10, 172, 84, 174, 232, 40]
Instructionswap_quote_to_base (buy)[58, 30, 190, 32, 188, 101, 164, 184]
Instructionswap_base_to_quote (sell)[19, 60, 200, 100, 34, 177, 72, 204]
Instructionwithdraw_for_migration[229, 30, 82, 104, 62, 251, 75, 69]
Instructioncollect_fees[164, 152, 207, 99, 30, 186, 19, 182]
Instructionupdate_nft_gating[195, 235, 21, 213, 78, 122, 248, 77]
AccountPool[241, 154, 109, 4, 17, 177, 109, 188]
EventPoolInitialized[100, 118, 173, 87, 12, 198, 254, 229]
EventSwapExecuted[150, 166, 26, 225, 28, 89, 38, 79]
EventMigrationWithdrawn[113, 119, 224, 21, 172, 69, 136, 249]
EventPoolMigrated[250, 204, 24, 195, 37, 253, 152, 6]
EventFeesCollected[233, 23, 117, 225, 107, 178, 254, 8]
EventNftGatingUpdated[112, 176, 134, 6, 63, 230, 66, 215]
Instructionregister_buyer[144, 92, 137, 46, 209, 220, 27, 164]
Instructionclose_buyer_tally[120, 56, 215, 177, 5, 67, 253, 97]
AccountCurveConfig[96, 75, 211, 144, 193, 36, 243, 41]
AccountLaunchRules[238, 73, 71, 29, 231, 48, 39, 141]
AccountBuyerTally[179, 13, 98, 1, 24, 107, 206, 149]
EventLaunchRuleApplied[195, 14, 189, 102, 22, 171, 210, 63]
EventPaused[172, 248, 5, 253, 49, 255, 255, 232]
EventUnpaused[156, 150, 47, 174, 120, 216, 93, 117]

The IDL also carries administrative instructions and events (pause authority, authority migration, migration co-signer, fee split). A terminal does not call them.

Both swap instructions take amount_in: u64 and minimum_amount_out: u64 as data, after the eight-byte discriminator.

swap_quote_to_base (buy), 14 accounts in this order:

#AccountWritableSignerValue
0payeryesyesThe trader
1poolyesPDA ["pool", base_mint, quote_mint]
2pool_authorityPDA ["pool_authority", pool]
3base_vaultyespool.base_vault
4quote_vaultyespool.quote_vault
5user_base_accountyesThe payer’s associated token account for base_mint (create it idempotently first)
6user_quote_accountyesThe payer’s associated token account for quote_mint; for SOL, a wrapped-SOL account funded with amount_in
7mint_recordThe payer’s Believer MintRecord on a gated curve; otherwise the program ID 6wXTwJ…dssG (Anchor’s encoding of an omitted optional account)
8token_programTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
9launch_rulesyesPDA ["launch_rules", pool]. Always pass it; it is usually an empty address
10buyer_tallyyesPDA ["buyer", pool, payer]. Always pass it; it is usually an empty address
11curve_configPDA ["curve_config"] = DpA3bP76TFBWfhmjZtJb4EWMGXegrQrF36Diw6JML8WM
12event_authorityPDA ["__event_authority"]
13program6wXTwJwdtA5RhNu6VyYnBzrV51TbsMpTbo5kZv2zdssG

swap_base_to_quote (sell) is unchanged, 10 accounts: entries 0 to 6 as above, then token_program, event_authority, program. A sell takes no mint_record, rules, tally or config account.

All PDAs are derived from the bonding-curve program ID. A terminal can therefore compute every account of a trade from the mint pair and the trader, without an index.

  • Buy: the fee comes off the input. fee = floor(amount_in * fee_bps / 10000), plus a sniper fee floor(amount_in * extra_bps / 10000) only while a launch-rules window applies (below). The remaining quote moves the curve.
  • Sell: the fee comes off the output. fee = floor(gross_out * fee_bps / 10000) and the trader receives gross_out - fee.
  • fee_bps is stored on the pool (offset 227) and is 100, 200 or 300. Read it per pool; do not assume 1%.
  • The price function did not change in the upgrade. It is a two-segment concentrated-liquidity curve in Q64 sqrt price (Q = 2^64), read entirely from the Pool account: segment 0 runs from sqrt_start_price to seg0_target_sqrt_price with seg0_liquidity, segment 1 from there to seg1_target_sqrt_price with seg1_liquidity, and sqrt_price is the current position. Within one segment of liquidity L, moving from P1 to P2 costs quote = floor(floor(L * (P2 - P1) / Q) / Q) and yields base = floor(L * (P2 - P1) / (P1 * P2)). A buy of net quote dy moves to P2 = P1 + floor(dy * Q * Q / L); a sell of dx base moves to P2 = floor(L * P1 / (L + dx * P1)). A trade that reaches a segment boundary fills that segment and continues in the next with its remaining amount. Use 256-bit intermediates and floor at each step, as the program does, to match on-chain output exactly.
  • A buy that crosses the threshold is filled in full; it is not capped or refunded on Solana. See Solana lifecycle.

curve_config holds a program-wide pause. While now < paused_until, every buy fails with Paused (6034). Sells never pause. The pause authority can hold it for at most 72 hours at a time. CurveConfig is borsh with Option fields, so decode it with the IDL rather than at fixed offsets: migration_cosigner: Option<Pubkey>, bump: u8, pause_authority: Option<Pubkey>, paused_until: i64 (0 = running). A terminal can read it once per block or subscribe to the account, and turn off the buy path while it is paused.

A curve can be created with a LaunchRules account (PDA ["launch_rules", pool], created only inside initialize_pool, never changed afterwards). When the account is absent, as it is for every curve today, buys behave exactly as before. When it exists, it can:

  • hold the curve closed until open_at, except for one registered dev_buyer up to dev_buy_max (NotOpen 6028, DevBuyExceeded 6030);
  • restrict buys to an allowlist until allowlist_until (NotAllowlisted 6031);
  • cap each wallet’s total quote spent until cap_until (WalletCapExceeded 6032);
  • add a sniper fee that starts at snipe_fee_start_bps (at most 2,500) and decays linearly to zero over snipe_fee_decay_secs (at most 600) from max(open_at, created_at).

The allowlist and cap use the buyer’s BuyerTally (PDA ["buyer", pool, payer]), which the buyer creates with register_buyer(proof) before the first buy (BuyerNotRegistered 6029). A terminal that reads LaunchRules can show the open time, refuse a buy that would exceed the cap, include the sniper fee in its quote, and prompt for registration. A terminal that does not support rules should still pass both PDAs, and should treat these errors as “not buyable now” rather than retrying.

Anchor custom errors start at 6000. The ones a terminal will see on the trading path:

CodeNameMeaning
6000NftGatingRequiredGated curve, no mint_record passed
6001-6004InvalidMintRecordOwner, NftNotFound, InvalidMintRecordData, MintRecordWalletMismatchThe mint_record is not the payer’s Believer record
6005InvalidAmountamount_in is 0
6006SlippageExceededOutput below minimum_amount_out
6007InsufficientLiquidityThe curve cannot fill this size, or it is graduated
6008InvalidVaultVault accounts do not match the pool
6025InvalidCurveConfigWrong account in position 11
6026 / 6027InvalidLaunchRules / InvalidBuyerTallyWrong account in position 9 or 10
6028-6032NotOpen, BuyerNotRegistered, DevBuyExceeded, NotAllowlisted, WalletCapExceededLaunch-rules refusals (above)
6034PausedBuys are paused program-wide

A buy sent with the old 11-account list fails before any of these, with Anchor’s AccountNotEnoughKeys (3005) or a seeds mismatch on the misplaced accounts.

A curve whose nft_gating.enabled is true only accepts buys from a wallet that holds a Believer NFT. The proof is a MintRecord PDA of the Believer NFT program vwJ5JhNiReriKEysmKsvKW2TYfhNMUGmbwDLiRpVkR3, derived from the buyer’s wallet:

const [mintRecord] = PublicKey.findProgramAddressSync(
[Buffer.from("mint_record"), buyer.toBuffer()],
new PublicKey("vwJ5JhNiReriKEysmKsvKW2TYfhNMUGmbwDLiRpVkR3"),
)

Pass that as mint_record on swap_quote_to_base. Whether the account exists is also the cheapest eligibility check: no MintRecord means the wallet cannot buy into a gated curve, so a terminal can disable the buy path before building a transaction that would fail. The record itself carries wallet, nftMint, tier, scoreAtMint, and mintedAt.

That program publishes its IDL on chain too, so Program.fetchIdl gives a decoding client for it on the same terms as the curve. Sell (swap_base_to_quote) is never gated, and gating stops applying once the pool has migrated.

The Pool account is borsh-encoded with no padding, so a client that does not use Anchor can read it at fixed offsets. Total length is 365 bytes:

OffsetSizeFieldType
08discriminator[241, 154, 109, 4, 17, 177, 109, 188]
832authoritypubkey
4032base_mintpubkey
7232quote_mintpubkey
10432base_vaultpubkey
13632quote_vaultpubkey
1688quote_reserveu64
1768base_reserveu64
1848migration_thresholdu64
1921is_migratedbool
19333nft_gating{ nft_program_id: pubkey, enabled: bool }
2261bumpu8
2272fee_bpsu16
2298accumulated_feesu64
23732fee_recipientpubkey
26916sqrt_priceu128
28516sqrt_start_priceu128
30116seg0_target_sqrt_priceu128
31716seg0_liquidityu128
33316seg1_target_sqrt_priceu128
34916seg1_liquidityu128

A memcmp filter at offset 192 for a single byte therefore separates live curves from migrated ones without decoding.

PoolInitialized carries pool, authority, base_mint, quote_mint, migration_threshold, nft_gating_enabled, and fee_bps, which is enough to register a new market from the event alone.

The program ID is the protocol identity. The attribution signer is an operational discovery aid and may be rotated if its key-management requirements change. Integrators should keep both values configurable and monitor this deployment reference for changes rather than hard-coding the signer as an immutable protocol constant.

Recent transactions involving the attribution signer can be inspected on Solscan.