Using PoffertSwap
Pools and liquidity
What a liquidity pool is, how to open one, how to add or remove liquidity and how the pool decides your price.
On this page
A liquidity pool is a shared pot holding two kinds of tokens, for example SOL and a token. Anyone can swap one for the other against the pot, and the people who filled the pot (the liquidity providers) earn a share of the fees.
Pools are how trading continues after a token graduates, and they let you open a market for any pair of tokens, not only SOL pairs.
How a pool sets its price#
PoffertSwap pools follow the classic constant product rule: the amounts of the two tokens, multiplied together, never get smaller after a swap. When you swap, you add some of one token and take some of the other, and the price moves accordingly. Trading a large share of the pot moves the price a lot. Trading a tiny share barely moves it.
Here is a real example, computed with the program's own formula:
| The pool holds | 100 SOL and 24,000,000 tokens |
| You swap | 1 SOL |
| Swap fee (0.30%) | 0.003 SOL |
| You receive | 236,917.92 tokens |
| What you got compared with the pool's price before your swap | 1.28% less (the fee plus the price impact) |
The price you get is a little worse than the pool's price before your swap. That difference has two parts: the fee (0.30%) and the price impact (your swap changes the pot). The smaller the swap compared with the pot, the closer to the fee alone you get.
The Pools page#
Pools lists every pool, sorted by Top TVL (the most value inside), Top volume (the most trading in the last 24 hours) or New. On larger screens you also see the fee and the age. Tap a pool to see it.
A pool's page shows:
- Your position: your share of the pool in percent and how many LP tokens you hold.
- Activity: the swaps and the additions and removals of liquidity, live.
- Add and remove liquidity (see below).
Two kinds of pool#
| Graduated pool | Open pool | |
|---|---|---|
| How it is created | Automatically when a token's curve is full | By anyone, for any pair of tokens |
| Swap fee | 0.30% | 0.25% |
| Who earns the fee | 0.20% liquidity providers, 0.05% platform, 0.05% the token's creator | 0.20% liquidity providers, 0.05% platform |
| The first liquidity | Locked forever. It is never turned into LP tokens, so nobody can withdraw it | Belongs to whoever opened the pool |
| Can others add liquidity? | Yes | Yes |
For the details of how the first kind appears, see Graduation.
Create a pool#
Use this to open a market for a pair that has no pool yet.
- Open Pools and press Create pool.
- Choose the first token and the second token. You can search or paste an address.
- Type how much of each you want to put in.
- Read the box that says You are setting the starting price.
- Press Create pool and approve.
The first person to add liquidity sets the price. If you start a pool far from the real market price, other traders can swap against it at a profit, at your expense, straight away. Match the price you see elsewhere before you confirm.
Good to know:
- You receive LP tokens, a receipt for your share. A very small fixed amount (1,000 LP units) is kept in the pool forever, so a pool can never be emptied completely.
- A pair can have only one pool. If the pair already has one, the button says so and you can add to the existing pool instead.
- A token that is still on its bonding curve cannot get a separate pool. Its liquidity moves into a pool automatically when the curve fills, and creating one earlier could only start it at a wrong price. The page tells you when this applies.
Add liquidity#
Open the pool and choose Add.
- Type an amount of one of the two tokens. The other amount follows the pool's ratio and fills in by itself.
- Check Your share of the pool after and the LP tokens you will receive.
- Press Add liquidity and approve.
Because the amounts must match the pool's current ratio, you cannot change the price by adding liquidity. If the price moves while your transaction is on its way, the amount of LP tokens you receive can only be at least the minimum shown (your slippage setting), or the transaction is cancelled.
Remove liquidity#
Open the pool and choose Remove.
- Choose how much of your position to take out as a percentage of your LP tokens.
- Check what you will receive of each token and the share of the pool withdrawn.
- Press Remove liquidity and approve.
You get both tokens back in proportion to the pool at that moment, and your LP tokens are burned. Removing liquidity is never blocked, even if trading is paused.
You get back your share of what is in the pool now, not what you put in. If the price has moved since you added liquidity, you will hold a different mix of the two tokens. That difference is a normal part of providing liquidity.
What you earn#
Liquidity providers earn 0.20% of every swap. That part of the fee stays in the pool, so each LP token becomes worth a little more over time. You collect it by removing your liquidity.
Which tokens can have a pool#
- Standard Solana tokens: yes.
- Tokens that use the newer Token-2022 standard: only if they use harmless, informational extensions (metadata and group information). Tokens with other extensions, for example a transfer fee, a transfer hook, a permanent delegate, non-transferable tokens or default-frozen accounts, are rejected. This protects pools from tokens that could take part of every transfer or lock the pool.
- Wrapped SOL is how SOL takes part. The app wraps and unwraps it for you.