Skip to content
Mainnet

Docs · Reference

Program reference

Addresses, instructions, accounts, events and errors of the Backstock program, generated from the IDL shipped in @backstock/sdk.

Address

69H4mKjPcR3Ncsk8orfSDAx6UDWz98szmFm3L4qU8Yzq on mainnet. Anchor IDL: packages/sdk/src/idl/backstock.json.

Program addresses

AccountSeedsHolds
Platform["platform"]Admin, fee recipient, agent and dev authorities, the LaunchLab platform config, default params
Quote["quote", quote_mint]An enabled quote asset: token program, decimals, LaunchLab global config, raise bounds, vault floor
Launch["launch", create_key]One launch: quote, raise, frozen terms, venue, vault accounting, agent state, payback
Authority["authority", launch]Data-less; LaunchLab payer and creator, signer of venue trades, owner of the quote and token vaults
Backer["backer", launch, owner]A backer's deposit (raw quote) and claimed fees
Mint["mint", launch]The coin, created by LaunchLab at launch (Token-2022, 6 decimals)

Instructions

InstructionArgsSignerWritable accounts
create_launchargs: CreateLaunchArgscreator, create_keycreator, platform, fee_recipient, launch, authority, quote_vault
depositamount: u64, proof: Vec<[u8; 32]>ownerowner, launch, backer, owner_quote, quote_vault
cancel_launch—creatorlaunch
refund—ownerowner, launch, backer, owner_quote, quote_vault
launch—crankerlaunch, authority, mint, quote_vault, fee_recipient_quote, token_vault, pool_state, pool_base_vault, pool_quote_vault, platform_fee_vault, creator_fee_vault
graduate—nonelaunch
agent_buyquote_in: u64, min_tokens_out: u64agentlaunch, authority, quote_vault, token_vault
agent_selltokens_in: u64, min_quote_out: u64agentlaunch, authority, quote_vault, token_vault
payout_backers—agentlaunch
collect_fees—crankerlaunch, authority, quote_vault, token_vault, fee_recipient_quote, creator_fee_vault
claim_backer_fees—ownerlaunch, backer, owner_quote, quote_vault
admin_withdraw_vaultquote: u64, tokens: u64adminlaunch, quote_vault, token_vault, recipient_quote, recipient_tokens
dev_withdraw_vaultquote: u64, tokens: u64devlaunch, quote_vault, token_vault, recipient_quote, recipient_tokens
initialize_platformfee_recipient: pubkey, agent_authority: pubkey, params: PlatformParamsadminadmin, platform
update_platformparams: PlatformParamsadminplatform
set_fee_recipientfee_recipient: pubkeyadminplatform
set_agent_authorityagent_authority: pubkeyadminplatform
set_dev_authoritydev_authority: pubkeyadminplatform
set_launchlab_platform—adminplatform
add_quoteparams: QuoteParamsadminadmin, quote_config
update_quoteparams: QuoteParamsadminquote_config
propose_adminnew_admin: pubkeyadminplatform
accept_admin—new_adminplatform
begin_wind_down—crankerlaunch, authority, quote_vault, token_vault
finish_wind_down—crankerlaunch, authority, quote_vault, token_vault

Accounts

Backer

FieldType
launchpubkey
ownerpubkey
depositedu64
fees_claimedu64
bumpu8

Launch

FieldType
indexu64
creatorpubkey
create_keypubkey
quote_mintpubkey
quote_token_programpubkey
quote_decimalsu8
mintpubkey
statusLaunchStatus
bumpu8
authority_bumpu8
mint_bumpu8
created_ati64
launched_ati64
termsLaunchTerms
raise_minu64
raise_maxu64
max_per_walletu64
raise_deadlinei64
raisedu64
refundedu64
backer_countu32
whitelist_root[u8; 32]
bundle_supply_bpsu16
reserve_bpsu16
global_configpubkey
launchlab_platformpubkey
supplyu64
total_sellu64
fund_raisingu64
platform_fee_rateu64
creator_fee_rateu64
poolpubkey
cpmm_poolpubkey
graduatedbool
wind_down_started_ati64
vault_quoteu64
vault_tokensu64
bundle_quoteu64
bundle_tokensu64
vault_cost_quoteu64
initial_vault_quoteu64
acc_fee_per_shareu128
backer_fees_accruedu64
backer_fees_claimedu64
creator_fees_collectedu64
window_starti64
window_buy_capu64
window_quote_spentu64
window_sell_capu64
window_tokens_soldu64
ema_priceu128
last_trade_tsi64
agent_buysu32
agent_sellsu32
agent_quote_spentu64
agent_quote_receivedu64
agent_tokens_soldu64
last_agent_trade_slotu64
volume_quoteu64
trade_countu64
namestring
symbolstring
uristring
backers_repaidu64
backer_payoutsu64
last_payout_tsi64

Platform

FieldType
adminpubkey
pending_adminpubkey
fee_recipientpubkey
agent_authoritypubkey
dev_authoritypubkey
launchlab_platformpubkey
paramsPlatformParams
launch_countu64
bumpu8

QuoteConfig

Admin-curated allowlist entry of a quote asset, PDA `[QUOTE_SEED, quote_mint]`. Validated against the mint and its LaunchLab GlobalConfig by `add_quote` / `update_quote`; amounts are raw units of the quote mint.

FieldType
quote_mintpubkey
token_programpubkey
decimalsu8
global_configpubkey
enabledbool
fund_raisingu64
min_raiseu64
max_raiseu64
max_wallet_depositu64
min_vaultu64
bumpu8

Events

Amounts are raw quote units unless the field names tokens.

EventFields
BackerFeesClaimedlaunch, backer, amount, timestamp
BackersPaidlaunch, mint, kind, amount, vault_quote_after, timestamp
CreatorFeesCollectedlaunch, mint, quote_mint, amount, to_vault, to_platform, to_backers, tokens, timestamp
Depositedlaunch, backer, amount, total_deposited, raised, timestamp
Graduatedlaunch, mint, cpmm_pool, timestamp
LaunchCancelledlaunch, timestamp
LaunchCreatedlaunch, mint, quote_mint, creator, index, name, symbol, uri, raise_min, raise_max, raise_deadline, bundle_supply_bps, reserve_bps, fund_raising, whitelisted, timestamp
Launchedlaunch, mint, quote_mint, pool, raised, launch_fee, bundle_quote, bundle_tokens, vault_quote, price_q64, timestamp
QuoteConfiguredquote_mint, token_program, decimals, global_config, enabled, fund_raising, min_raise, max_raise, max_wallet_deposit, min_vault, timestamp
Refundedlaunch, backer, amount, timestamp
Tradelaunch, mint, quote_mint, side, quote, tokens, price_q64, ema_q64, venue, vault_quote, vault_tokens, timestamp
VaultWithdrawnlaunch, mint, quote, tokens, recipient, recipient_quote, recipient_tokens, timestamp
VaultWithdrawnByDevlaunch, mint, quote, tokens, by, recipient_quote, recipient_tokens, timestamp
WindDownAbortedlaunch, mint, outside, timestamp
WindDownStartedlaunch, mint, outside, finish_after, timestamp
WoundDownlaunch, mint, quote_to_backers, timestamp

Errors

CodeNameMessage
6000UnauthorizedSigner is not authorized for this action
6001InvalidParamParameter out of allowed bounds
6002InvalidMetadataName, symbol or URI too long or empty
6003PausedPlatform is paused
6004AgentsPausedAgents are paused
6005NotRaisingLaunch is not raising
6006NotLiveLaunch is not live
6007NotRefundingLaunch is not refunding
6008RaiseClosedRaise deadline has passed
6009RaiseStillOpenRaise is still open
6010RaiseFullRaise is full
6011WalletCapReachedWallet deposit cap reached
6012MinimumNotReachedRaise minimum not reached
6013MinimumReachedRaise minimum was reached; refunds open only if it is not launched within the grace period
6014NotWhitelistedWallet is not on the whitelist
6015ZeroAmountAmount must be greater than zero
6016SlippageOutput below minimum (slippage)
6017InsufficientLiquidityInsufficient venue liquidity
6018MathOverflowArithmetic overflow
6019AgentWindowLimitAgent window limit exceeded
6020AgentPriceImpactAgent trade exceeds max price impact
6021AgentBuyNotDipAgents may only buy below the EMA band
6022AgentSellNotRallyAgents may only sell above the EMA band
6023InsufficientVaultInsufficient vault balance
6024NothingToClaimNothing to claim
6025AlreadyRefundedAlready refunded
6026NoPendingAdminNo pending admin or signer mismatch
6027AgentAboveCostBasisAgents may only buy below the vault's average cost, or buy back with sell proceeds below the average sell price
6028AgentBelowCostBasisAgents may only sell above the vault's average cost plus band
6029NotUpgradeAuthorityOnly the program upgrade authority can initialize the platform
6030SameSlotTradeOne agent trade per slot; retry in the next slot
6031TermsChangedPlatform terms changed since this launch was prepared; review them and retry
6032LaunchTooYoungLaunch must be live for 3 days before it can wind down
6033RecentTradeThe vault traded in the last 24 hours; the launch can't wind down yet
6034OutsideHoldersMore tokens are held outside the venue and vault than a dead launch allows; it can't wind down
6035InvalidVenueAccountA venue account is missing, has the wrong owner or the wrong layout
6036VenueMigratingThe LaunchLab curve is complete and waiting for migration to CPMM; retry after graduate
6037NotGraduatedThe LaunchLab pool has not migrated to CPMM (or the launch already graduated)
6038PayoutNotDueNo backer payout is due: vault quote under the payback target or the last payout is too recent
6039VaultFloorVault quote may not drop below the launch's minimum vault reserve
6040DevKeyDisabledNo dev key is set on the platform (set_dev_authority)
6041LaunchWindowClosedThe raise was not launched within the grace period after its deadline; backers can refund
6042LaunchLabPlatformUnsetThe platform has no LaunchLab platform config yet (set_launchlab_platform)
6043QuoteDisabledThis quote asset is not enabled for new launches
6044InvalidQuoteMintThe quote mint is not an SPL Token or Token-2022 mint, or its decimals don't match
6045QuoteTransferFeeThe quote mint charges a transfer fee, or its transfer-fee config can still be changed
6046QuoteHookActiveThe quote mint has an active transfer hook
6047QuoteNotTransferableThe quote mint freezes new accounts by default or is non-transferable
6048InvalidGlobalConfigThe LaunchLab global config does not match the quote or rejects the launch curve
6049NotWindingDownThe launch is not winding down
6050WindDownNotReadyThe wind-down delay has not passed since begin_wind_down
6051LaunchLabPlatformInvalidThe LaunchLab platform config overrides the CPMM pool creator or restricts launches
Indexer synced· lag 19Slot461,669,802Agent online· tick 104Mainnet