Use the app
Create a pool
Two tokens, a starting price, a hook and its settings. Everything you choose here is fixed for the life of the pool.
Anyone can create a pool. The Create page builds one with no hook or with one of the built-in hooks, and shows the pool's face and a one-sentence summary of what you're about to make before you sign.
Steps#
Choose the tokens
Pick a base and a quote token from the tokens already in pools, the tokens in your wallet, or paste any classic SPL mint address without a freeze authority. Prices on the page are quoted as quote per base. On chain the two mints are stored in their byte order; the app handles that for you.
Set the starting price
Type how much quote one base is worth. If the pair already has pools, the field starts at their price. The starting price only matters until liquidity arrives: the first deposits decide where the pool actually trades, so set it close to the market.
Plug in a hook
Choose No hook, No-op, Dynamic fee, TWAP oracle or Range order. The face shows which contacts the hook needs; the program refuses a built-in hook without them.
Set the fee and grid
Pick a base fee of 0.05%, 0.30% or 1.00%, and a tick spacing of 1, 10, 60 or 200. The page shows how far apart neighboring prices are on that grid. Positions can only start and end on it.
Create
Press Create pool and approve. The pool, its vaults, its account list and the hook's state account are created in one transaction.
Hook settings#
Each hook asks for its own settings. The defaults are starting points, not tuned values.
| Setting | Default | What it does |
|---|---|---|
| Max fee | 1.00% | The pool's max fee. The hook can't charge more. |
| Per tick of movement | 0.01% | Fee added per tick of recent average price movement. |
| Max added fee | 0.70% | The most the hook adds on top of the base fee. |
| Decay | 1%/s | How fast the measured movement fades, per second. |
| Weight of the latest swap | 25% | How much one swap moves the running average. |
See Dynamic fee for the formula and a calculator.
| Setting | Default | What it does |
|---|---|---|
| Shortest window | 30 s | Reads of a shorter window are refused. |
| Record on liquidity changes | Off | Also writes an observation on deposits and withdrawals (adds permissions 4 and 8). |
| Setting | Default | What it does |
|---|---|---|
| Side | Sell base above the price | Or buy base below it. |
| Starts | 3% | How far from the starting price the order begins. |
| Width | 1% | How far the price travels through the order to fill it. |
The order's owner is the wallet that creates the pool. See Place a range order.
The no-op hook has no settings. It is called before and after every swap and changes nothing, which makes it the honest baseline for what a hook costs.
Hook compute#
Pools with a hook also set the most compute one hook call may use, from 50,000 to 1,200,000 units; the default is 300,000. Socket measures each call after it returns and rejects the swap if the call used more. It can't reserve compute for the hook ahead of time: every call shares the transaction's budget.
What it costs#
Creating a pool locks rent in its new accounts: the 8 KiB pool account, two token vaults, the account list and, with a built-in hook, its 2 KiB state account. Expect roughly 0.07 to 0.09 SOL, plus the network fee. Rent stays with the accounts; there is no instruction to close a pool.
Pools with your own hook#
The app creates pools with the built-in hooks only. To create a pool with a hook program of your own, use POST /prepare/initialize in the HTTP API or initializeInstruction in the SDK, and see Write a hook. A pool can be created with any hook program, but routers and the Socket API only route through hooks on their allowlist.