Docs · Guides
Providing liquidity
Open a position, add and remove liquidity, collect fees, split, hand over and lock a position, and the rules that can refuse each step.
Positions
Liquidity on reel is held in a Position account, ["position", pool, owner, nonce], one per owner and nonce, so a wallet can hold several in one pool. PositionOpen creates an empty one. Every reel pool is full range: a position earns on every swap, whatever the price.
A position records its shares, its fee-growth checkpoints, what it is owed, any lock, and what it has collected over its life.
Add liquidity
LiquidityAdd(max_base, max_quote, min_shares) adds in proportion to the reserves: the shares are min(max_base × S / rb, max_quote × S / rq), and the deposit is rounded up per side, so you never pay less than your shares are worth. min_shares protects you if the price moves before the transaction lands.
An add is refused:
- during an Anti-Snipe guard, unless it is the launch position (
GuardAddRefused); - during a Buy/Sell Block sell lock, for the same reason;
- on a Zap Relay target pool, unless it comes from a feeder (
ZapTargetOnly); - on an agent-gated pool, without an
Agent(and a score, if the pool asks for one); - above the pool's deposit cap (
DepositCapExceeded), if the pool has a cap set.
Fees owed are settled before the shares change, and the LP stream's release window restarts, so an add right before a payout only earns what streams after it.
Collect fees
FeesCollect pays what the position is owed, in both tokens, without touching its shares. A locked position can always collect. On a launch under a launch lock, the beneficiary collects the launch positions' fees.
Remove liquidity
LiquidityRemove(shares, min_base, min_quote) pays floor(shares × reserve / S) of each side, after settling fees. It is refused while:
- the position is locked (
PositionLocked); - it is a launch position and the launch's principal lock hasn't ended (
PrincipalLocked): the guard, the dev-buy lock and the liquidity lock; - it is a launch position under a launch lock (
LaunchLocked).
Removing is never gated by the agent gate or a deposit cap. The virtual quote a launch opened with stays in the pool: it can't be withdrawn by anyone.
Split, hand over, lock, close
PositionSplitmoves some shares into a new position of yours; the new one inherits the lock.PositionTransfernames a new owner andPositionAcceptcompletes it. Sending the zero key cancels a pending handover.PositionLocklocks until a time, or for good (PERMANENT). It only extends.PositionClosereturns the account's rent once its shares and fees owed are zero.
Launch positions belong to the launch, not a wallet: they can't be split or handed over on their own. The launch changes hands as a whole (LaunchTransfer).
What an LP earns, and risks
An LP earns the base fee on every swap, plus whatever the pool's blocks send to LPs: Snipe tax, dynamic fees, LP Rewards, Storm Fee, advisory surcharges, and its share of recapture and released King of the Pool pots.