Launch a pool

Use Vertigo SDK v2 to launch a liquidity pool

Overview

The SDK v2 provides simplified pool creation:

  • createPool() - Create a liquidity pool for an existing token

  • launchTokenWithPool() - Create token and pool together (recommended, see Token Factories)

When to use direct pool creation

Use createPool() when:

  • You already have an existing token that you want to create a pool for

  • You need advanced control over pool parameters

  • You're integrating Vertigo pools into an existing token ecosystem

For new token launches, use launchTokenWithPool() from the Factory Client instead.

Prerequisites

  • An existing token mint (mintB) that you want to create a pool for

  • Sufficient SOL to pay for transaction fees and rent

  • A wallet configured with the SDK

Parameters

For createPool():

  • mintA - Base token (usually NATIVE_MINT for SOL)

  • mintB - The token you want to create a pool for

  • initialMarketCap - Starting market cap in lamports (for SOL)

  • royaltiesBps - Trading fee in basis points (e.g., 250 = 2.5%)

  • launchTime - (Optional) Unix timestamp for scheduled launch

  • privilegedSwapper - (Optional) Address that can swap without fees

Example: Create a pool for an existing token

Example: Create pool with scheduled launch

Launch the pool at a specific time:

Example: Create pool with privileged swapper

Allow a specific address to swap without fees:

For most use cases, it's better to use the Factory Client's launchTokenWithPool():

See Token Factories for complete documentation.

Migration from v1

v1 (Old) - Complex setup required

v2 (New) - Simple and clean

Key Improvements in v2

  1. Simplified interface - No need to manage owners, authorities, or token wallets

  2. Automatic setup - SDK handles all account creation and initialization

  3. Unified token programs - Automatically detects SPL vs Token-2022

  4. Better defaults - Sensible defaults for all optional parameters

  5. Type safety - Full TypeScript support with helpful IntelliSense

  6. Error handling - Clear, actionable error messages

Understanding Pool Parameters

  • initialMarketCap: The starting "virtual" SOL value backing the pool. A higher market cap means a higher starting price for the token.

  • royaltiesBps: Trading fee percentage in basis points (100 bps = 1%). These fees accumulate for the pool owner.

  • launchTime: Unix timestamp when trading becomes active. Swaps before this time will fail.

  • privilegedSwapper: An address that can swap without paying fees (useful for initial liquidity or market makers).

Tips

  • Always test on devnet before deploying to mainnet

  • Consider your initial market cap carefully - it determines the starting price

  • Trading fees typically range from 0.5% to 5% (50-500 bps)

  • Use privilegedSwapper for your initial liquidity provision to avoid fees

  • The SDK automatically handles all token account creation and rent

  • For new tokens, use launchTokenWithPool() instead of manual pool creation

Error Handling

Last updated