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.
Creating Splash Pools
Splash Pools are the easiest way to get started. Follow these steps to create one using the Legacy SDK:- Token Addresses: Define the two token mint addresses.
- Set Initial Price: Set the price of the first token in terms of the second token.
- Create the Pool: Use the
createSplashPoolfunction to create the pool.
TypeScript
Creating Concentrated Liquidity Pools
Concentrated Liquidity Pools offer more control. Follow these steps to create one:- Token Addresses: Define the two token mint addresses.
- Define Tick Spacing: Set the tick spacing based on your fee tier.
- Convert Price to Tick Index: Calculate the tick index from your desired price.
- Create the Pool: Use the
createPoolfunction 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
orderMintshelper. - Price Representation: For concentrated pools, price must be converted to a tick index.
- Fee Tiers: Different tick spacings correspond to different fee tiers.
