Skip to main content

Launchpad Integrations

A bonding-curve launchpad can use Raphael as the secondary market for a token after its launch phase is complete. Graduation closes the launchpad curve, creates or selects the canonical Raphael pool, seeds it with the reserved assets and publishes the new market for routing.

The launchpad owns its sale rules and graduation policy. Raphael supplies the permissionless pool and swap infrastructure; pool creation does not imply Raphael endorsement of the token.

Lifecycle

The curve should stop accepting buys and sells before migration begins. It must not reopen after a successful graduation, unless the launchpad explicitly supports and clearly discloses a different model.

Define graduation before launch

Commit the graduation configuration when the token launch is created. At minimum, define:

ParameterRequired decision
Quote assetThe asset paired with the launched token on Raphael
ThresholdExact onchain condition that triggers graduation
Curve inventorySold, reserved and unsold token accounting
Quote reserveAmount retained for Raphael liquidity
Pool classNormally volatile for a newly launched token
Fee configurationSupported Raphael fee or tick-spacing choice
Price policyHow the final curve price maps to the pool's initial ratio
LP controlBurn, time-lock, vesting contract or disclosed treasury custody
Fee recipientDestination for any launchpad or migration fee
Failure policyTimeout, cancellation and idempotent retry rules

A threshold may be based on quote reserves, sold token supply, fully diluted valuation or a combination. Use integer onchain values and define whether fees count towards it. Do not rely only on a frontend-calculated market cap.

Curve accounting

Let q be the number of tokens sold and P(q) the marginal curve price in quote tokens per launched token. The quote cost of buying an additional Δq is:

ΔC=qq+ΔqP(s)ds\Delta C=\int_{q}^{q+\Delta q}P(s)\,ds

For a discrete implementation, the contract's integer arithmetic is authoritative. The interface should preview the same rounded result that the transaction will enforce.

At graduation, let T_g be launched-token liquidity and Q_g be quote-token liquidity, both normalised for token decimals. The initial Raphael spot price in quote tokens per launched token is:

Ppool=QgTgP_{pool}=\frac{Q_g}{T_g}

If continuity with the bonding curve is intended, choose the seed amounts so that:

QgTgP(qg)\frac{Q_g}{T_g}\approx P(q_g)

where q_g is the sold supply at graduation. State the permitted rounding tolerance. If fees, treasury allocations or unsold inventory make the prices differ, disclose the discontinuity before users trade.

For a volatile pool, the idealised initial invariant is:

TgQg=kT_gQ_g=k

Validate the initial price

Token order and decimal scaling can invert or distort the initial price. Validate the human-readable price in both directions before submitting the graduation transaction.

Where possible, perform these operations atomically through a dedicated graduation manager:

  1. verify that the launch ID has not already graduated;
  2. verify the threshold and freeze the curve;
  3. snapshot sold supply, remaining inventory, collected quote assets and fees;
  4. calculate the exact pool seed amounts;
  5. create the Raphael pool if it does not already exist, or validate the canonical existing pool;
  6. approve only the exact assets required;
  7. add liquidity with minimum accepted amounts and a deadline;
  8. send the LP position to the configured burn, lock, vesting or custody destination;
  9. persist the pool address and mark the launch graduated;
  10. emit one canonical graduation event containing all final amounts and addresses.

If this cannot be atomic, use explicit states such as PENDING, MIGRATING, LIVE and FAILED. Every step must be idempotent. A retry must detect an already-created or already-funded pool instead of duplicating liquidity or charging fees twice.

Existing-pool protection

A public Raphael pool may exist before graduation. The launchpad must define whether it will:

  • reject graduation until the conflict is reviewed;
  • seed the existing verified pool;
  • create a different supported pool class or fee tier; or
  • treat a predetermined factory-derived address as canonical.

Never add liquidity to an arbitrary address supplied by the token creator. Validate the factory, token pair, pool class and current price. If an existing pool's price materially differs from the curve's graduation price, adding liquidity can immediately transfer value to arbitrageurs.

LP ownership and liquidity claims

The UI and graduation event should make LP control unambiguous:

  • Burned: the LP position cannot normally be withdrawn.
  • Time-locked: identify the lock contract, beneficiary and unlock time.
  • Vested: identify the release schedule and controlling roles.
  • Treasury-controlled: disclose the multisig or account and its withdrawal powers.

Burning or locking LP tokens does not remove token-contract risks such as minting, pausing, blocklisting, transfer taxes or proxy upgrades.

Security requirements

A graduation integration should include:

  • reentrancy protection around token transfers and external pool calls;
  • exact accounting before and after fee deductions;
  • safe handling of fee-on-transfer, rebasing or callback-enabled tokens, or an explicit ban;
  • bounded approvals and approval cleanup;
  • minimum liquidity amounts and transaction deadlines;
  • protection against duplicate graduation;
  • deterministic pool validation against verified Raphael factories;
  • a pause path before migration, with no arbitrary post-graduation asset seizure;
  • tests for frontrunning, adverse pool price movement and partial failure;
  • a documented policy for unsold tokens and residual quote assets.

Create and seed the pool in one transaction where possible. Publishing an empty pool address before funding allows another account to establish an unintended initial price.

After graduation

Only mark the launch LIVE after the graduation receipt is confirmed and the final pool balances or liquidity position have been verified. Then:

  1. publish the token, pool and transaction addresses;
  2. expose the LP lock or burn proof;
  3. disable bonding-curve trading permanently for that launch;
  4. hand the pool event to indexers and aggregator partners;
  5. wait for required confirmations and indexing before redirecting users;
  6. request a Raphael gauge separately if the pool should participate in $RAPH emissions.

Graduation does not automatically create a gauge, guarantee aggregator inclusion, verify the token or make the market liquid beyond the assets actually deposited.

Required event data

The launchpad should emit or index a canonical record containing:

  • launch ID and token address;
  • quote-token address;
  • Raphael factory and pool address;
  • pool class, fee configuration or tick spacing;
  • token and quote amounts deposited;
  • LP token amount or concentrated position ID;
  • LP recipient or lock contract;
  • launchpad fees and recipients;
  • final curve supply and price;
  • transaction hash and block number.

This record gives wallets, explorers, aggregators and the launchpad UI one auditable handover point from the bonding curve to Raphael.