Skip to content
bibo.DocsOpen app
Protocol documentation
DocsDevelopers

Launchpad integration

Create a Meme token, connect its first market and follow it into a liquidity pool.

6 min read
On this page

Discover a launch

Index LaunchFactory.TokenCreated to discover projects, then call getLaunch(token). The returned Launch struct is the entry point for the token's curve, quote asset, fee vault and settlement state. An unknown token returns an empty record: check exists before treating it as a launch. The first release's tokens come from LaunchFactory v1, whose Launch has no feeSplitter; the contract directory says where to read them.

function getLaunch(address token)
    external view returns (Launch memory);

event TokenCreated(
    address indexed token,
    address indexed curve,
    address indexed creator,
    address quote,
    uint256 templateId,
    address creatorFeeVault,
    bytes32 creatorFeePolicyHash,
    bytes32 economics
);
Discover a launch
Launch fieldUse
existsWhether this factory recognizes the token.
token, curve, quoteThe Meme token, its curve and the ERC-20 used to trade it.
creatorFeeVaultThe project's creator and Holder Fee ledger.
feeSplitterThe LaunchFeeSplitter the launch's pool pays its additional fee to. It sends the platform fee to ProtocolFeeEscrow and the Creator Fee to creatorFeeVault.
graduationManager, clFactory, tickSpacing, marketFeePipsThe project's recorded graduation destination and pool configuration, including the pool's market fee in pips.
stateFactory settlement state: 0 UNSWEPT, 1 SWEPT, 2 POOL_LIVE, 3 RESCUED.
pool, positionIdThe canonical pool and graduation liquidity NFT, populated when the pool is live.

Read the available launch terms

Use canLaunch(creator) to check creation access. Read templateCount(), then getTemplate(templateId) for each available template, and getQuoteProfile(quote) for the paired asset. Both the template and quote profile must be enabled. The quote assets are BIBOCAT, WETH and BGB, as each is enabled; the contract directory lists this deployment's. A WETH launch is still an ERC-20 launch: the curve takes and pays WETH, and wrapping ETH is up to your application.

Read launchFeeAmount(), launchFeeAsset() and maxCreatorFeeBps() before presenting the final creation preview. After graduation the launch's pool charges the template's marketFeePips, the Creator Fee and the factory's GRADUATION_PLATFORM_FEE_PIPS(); read all three rather than assuming them. If a launch fee is configured, approve that ERC-20 to LaunchFactory. createToken is nonpayable; the creation fee is not sent as native transaction value.

Read the available launch terms
ReadRelevant fields
getTemplate(templateId)supply, baseFeeBps, protocolFeeShareBps, snipeTaxStartBps, snipeTaxSeconds, marketFeePips, tickSpacing, enabled.
getQuoteProfile(quote)decimals, phantomQuote, graduationTarget, enabled. Amounts use this quote asset's units.

Prepare the creation parameters

TokenParams defines the project's identity. CreatorFeePolicy fixes its additional fee and how project income is divided between the creator and Meme token stakers. The following struct fields are shown in ABI tuple order.

struct Socials {
    string twitter;
    string telegram;
    string discord;
    string website;
    string farcaster;
}

struct TokenParams {
    string name;
    string symbol;
    string logo;
    string description;
    Socials socials;
    bytes32 salt;
    bytes32 expectedEconomics;
}

struct CreatorFeePolicy {
    uint16 feeBps;
    uint16 toCreatorBps;
    uint16 toHoldersBps;
    address initialRecipient;
}
Fee rate and allocation
feeBps is the additional trading fee, bounded by maxCreatorFeeBps(). toCreatorBps + toHoldersBps must equal 10,000. These two allocation fields divide project revenue; they are not additional fees charged to traders.
Creator recipient
initialRecipient must be nonzero when toCreatorBps is nonzero, and the zero address when the creator allocation is zero.
Salt and reviewed terms
salt is a bytes32 deployment salt scoped to the creator. Fill expectedEconomics with previewLaunchEconomics(templateId, quote, policy) using the exact terms the creator reviewed.

Create the token

function previewLaunchEconomics(
    uint256 templateId,
    address quote,
    CreatorFeePolicy calldata policy
) external view returns (bytes32);

function createToken(
    TokenParams calldata params,
    uint256 templateId,
    address quote,
    CreatorFeePolicy calldata policy
) external returns (address token, address curve, address vault);
Optional opening-buy exemptions
A second createToken overload appends address[] snipeTaxExemptions after policy. It accepts up to 32 additional addresses, fixed at creation. Use the matching ABI overload if your creation flow exposes this option.
Changed launch terms
LaunchEconomicsMismatch means the configuration no longer matches the reviewed preview. Refresh the terms and ask the creator to review them before preparing a new call.
  1. Confirm the terms

    Populate params.expectedEconomics from the preview and complete any creation-fee approval.

  2. Simulate and submit

    Simulate createToken from the creator's wallet using the selected template, quote and policy, then submit the same call.

  3. Resolve the result

    Read TokenCreated from the confirmed receipt and fetch getLaunch(token). Use the recorded addresses for subsequent actions.

Trade on the bonding curve

Resolve BondingCurve from the launch record. Read state(), getReserves(), realQuoteReserve(), sellableTokens() and currentSnipeTaxBps(recipient) before preparing a trade. Curve state is a separate enum: 0 ACTIVE, 1 READY, 2 CLOSED. Only ACTIVE accepts buys and sells.

getReserves() includes the virtual quote reserve used for pricing. realQuoteReserve() reports the real quote reserve used for graduation progress. The contract has no quoteBuy or quoteSell endpoint; simulate the intended buy or sell with the real sender, balance and allowance to check execution.

function buy(
    uint256 quoteIn,
    uint256 minTokensOut,
    address recipient
) external returns (uint256 tokensOut);

function sell(
    uint256 tokensIn,
    uint256 minQuoteOut,
    address recipient
) external returns (uint256 quoteOut);
Buy
Approve the quote ERC-20 to this BondingCurve. quoteIn is the spending budget; Meme tokens go to recipient. The opening snipe tax depends on recipient, so use that same address in your preview and transaction.
Buy near graduation
A buy may use only part of the budget and refund the rest to the caller. For a partial fill, minTokensOut becomes a proportional price bound: the actual token amount can be lower than that number. Display the simulated fill and refund. CurveBuy.quoteIn records actual spend; CurveBuyRefunded records the refund.
Sell
Approve the Meme token to this BondingCurve. tokensIn is pulled from the caller and the net quote output goes to recipient, subject to minQuoteOut. Both trade methods are nonpayable and have no deadline argument.

Follow graduation into the pool

The buy that reaches the curve's target automatically attempts graduate(token), which sweeps the curve into its GraduationManager. Pool creation is a separate createPool(token) call. Refresh the curve state and the factory's settlement state after each confirmed transaction; pool trading starts only at POOL_LIVE.

// LaunchFactory
function graduate(address token) external;

// The launch's GraduationManager
function preflight(address token) external view;
function createPool(address token)
    external returns (address pool, uint256 positionId);
Follow graduation into the pool
Observed stateIntegration action
UNSWEPT + curve ACTIVEContinue curve trading.
UNSWEPT + curve READYCall the launch's GraduationManager.preflight(token) to check readiness, then simulate LaunchFactory.graduate(token). Graduation can be retried permissionlessly.
SWEPTCurve trading has ended. Simulate and call createPool(token) on the launch's recorded GraduationManager to complete pool creation.
POOL_LIVERead launch.pool and switch to the pool integration.
RESCUEDShow the recorded settlement state; do not continue the normal graduation flow.

Events and execution feedback

Events and execution feedback
Event or errorUse in an integration
CurveBuy / CurveSellIndex executed trade amounts, recipients and fee fields from the curve.
GraduationReady / AutoGraduationFailedRefresh settlement state; surface a retry only when the current state permits it.
LaunchSwept / LaunchPoolLiveTrack settlement progress from LaunchFactory. LaunchPoolLive supplies token, pool and positionId.
NotWhitelisted / TemplateDisabled / QuoteNotApprovedRefresh creation eligibility and available terms.
CurveClosedRefresh the launch stage and trading venue.
SlippageExceededRefresh the preview and let the user review a new bound.
InexactTransferThe asset transfer did not deliver the exact amount expected by the contract.
BIBO ProtocolLaunchpad + ve(3,3) liquidity.