Skip to main content

1. Introduction to Pool Types

Overview

Liquidity pools are a foundational concept in DeFi, enabling users to trade tokens without relying on traditional order books. On Orca, liquidity pools provide the means for traders to swap between two tokens, while liquidity providers earn fees by supplying the tokens to the pool.

Splash Pools vs. Concentrated Liquidity Pools

  • Splash Pools: Splash Pools are the simplest type of liquidity pool. They are ideal for those looking to launch a new token with minimal parameters. You only need to provide the mint addresses of the two tokens and set the initial price. Splash Pools offer an easy entry point into liquidity provision, making them especially appealing for community-driven projects like memecoins. These projects often prioritize community engagement over technical complexity, and Splash Pools provide a straightforward way to get started.
  • Concentrated Liquidity Pools: Concentrated Liquidity Pools are more advanced and allow liquidity providers to concentrate their liquidity within specific price ranges. This results in higher capital efficiency but requires a deeper understanding of how to manage liquidity. Concentrated Liquidity Pools are better suited for experienced users who want greater control over their liquidity.

2. Getting Started Guide

Before creating a Splash Pool or a Concentrated Liquidity Pool, ensure you have completed the environment setup:
  • Client Setup: Create a WhirlpoolClient instance.
  • Wallet Connection: Connect a wallet to interact with the Solana network.
  • Token Ordering: Ensure your token mints are properly ordered.
Whirlpools is set up such that anyone is able to set up a liquidity pool within a WhirlpoolsConfig space.

Creating Splash Pools

Splash Pools are the easiest way to get started. Follow these steps to create one using the Legacy SDK:
  1. Token Addresses: Define the two token mint addresses.
  2. Set Initial Price: Set the price of the first token in terms of the second token.
  3. Create the Pool: Use the createSplashPool function to create the pool.
TypeScript

Creating Concentrated Liquidity Pools

Concentrated Liquidity Pools offer more control. Follow these steps to create one:
  1. Token Addresses: Define the two token mint addresses.
  2. Define Tick Spacing: Set the tick spacing based on your fee tier.
  3. Convert Price to Tick Index: Calculate the tick index from your desired price.
  4. Create the Pool: Use the createPool function to create the concentrated liquidity pool.
TypeScript

Important Considerations

When creating pools with the Legacy SDK, keep these factors in mind:
  • Token Ordering: Tokens must be cardinally ordered. Use the orderMints helper.
  • Price Representation: For concentrated pools, price must be converted to a tick index.
  • Fee Tiers: Different tick spacings correspond to different fee tiers.

Comparison of Pool Types

3. Usage Examples

Launching a Token Pair with a Splash Pool

Suppose you want to launch a new memecoin and pair it with USDC. You can leverage the simplicity of Splash Pools to quickly set up the pool with an initial price. This is ideal if you want to keep things simple and start earning trading fees with minimal configuration. For example, if a development team is building a launchpad for memecoins, Splash Pools are an ideal solution.

Creating a Concentrated Liquidity Pool for Efficiency

If you want to maximize capital efficiency, you can use the flexibility of Concentrated Liquidity Pools to define specific price ranges for your liquidity. This approach is beneficial when you expect price movements within certain bounds and want to concentrate liquidity accordingly. For example, a DeFi protocol might use a Concentrated Liquidity Pool to facilitate a stablecoin-stablecoin pair, where the price is expected to remain within a tight range. By concentrating liquidity in this range, the protocol can maximize returns for liquidity providers and reduce slippage for traders.

4. Next Steps

After creating a liquidity pool, the pool is still empty and requires liquidity for people to trade against. To make the pool functional, open a position and add liquidity. This enables traders to swap between tokens and helps you start earning fees.