Swap / DEX·Solana · Eclipse
Orca
Concentrated-liquidity AMM on Solana and Eclipse. Whirlpools is the flagship CLMM program with tick-based ranges, position NFTs, and Splash Pools for one-click full-range pool creation.
- 01Solana CLMM swaps
- 02providing concentrated liquidity in tick ranges
- 03creating Whirlpools or Splash Pools
- 04Eclipse L2 liquidity
- 05automated rebalancing strategies
- pnpm add @orca-so/whirlpools @orca-so/whirlpools-client @orca-so/whirlpools-core @solana/kit
| Variable | Scope | Description |
|---|---|---|
| SOLANA_RPC_URL | Server | Solana mainnet RPC URL. Whirlpools SDK v2 issues many `getMultipleAccounts` calls — use a paid RPC (Helius/Triton) for production. |
Use `@orca-so/whirlpools` (v7+). The current SDK is built on `@solana/kit` (web3.js v2), NOT legacy `@solana/web3.js` v1 — initialize with `createSolanaRpc(url)` and `setWhirlpoolsConfig('solanaMainnet')`. For swaps call `swapInstructions(rpc, { inputAmount, mint }, whirlpoolAddress, slippageToleranceBps, signer)`. For new positions use `openFullRangePositionInstructions()` or `openPositionInstructions()` with a tick range, then `increaseLiquidityInstructions()`. Splash Pools (one-click full-range) are created via `createSplashPoolInstructions()`. Each helper returns `{ instructions, additionalSigners }` — assemble into a `VersionedTransaction` yourself and send.
- ⚑Whirlpools SDK v7 dropped `@solana/web3.js` v1 — code using `Connection` / `PublicKey` from v1 will not interop without `fromLegacyPublicKey`/`fromVersionedTransaction` adapters.
- ⚑Concentrated positions earn zero fees when price drifts outside your tick range — clients must monitor and either rebalance or use a manager (Kamino, Meteora vaults).
- ⚑Set compute unit limit ≥ 600k and a priority fee for any `increaseLiquidity` / `swap` instruction — Whirlpool tick crossings are CU-heavy and silently fail under defaults.
- ⚑Position NFTs are stored in the user's wallet; closing a position requires burning the NFT in the same tx via `closePositionInstructions`, otherwise rent leaks.
- ⚑Slippage is expressed in bps relative to the quote — set explicit `slippageToleranceBps` (e.g. 50 = 0.5%); SDK does not enforce a safe default.
- ⚑Eclipse mainnet uses a separate `setWhirlpoolsConfig('eclipseMainnet')` and different program address — do not hardcode Solana program IDs.