Liquidity pool
A liquidity pool holds assets under shared accounting and trading rules so participants can exchange against available reserves.
Category: TradingOpposed arrows category cue
System record
Start with the economic purpose, participants, resources, and entitlements before studying implementation detail.
Why it exists
Liquidity pools replace or supplement individually posted orders with reusable inventory that a pricing mechanism can quote and settle against continuously.
Traditional-finance analogy
Dealer inventory or pooled market-making fund is the closest comparison recorded for this concept.
Where the analogy stops
- Pool inventory is governed by contract accounting and may be permissionlessly accessible rather than managed through one dealer balance sheet.
- Depositors usually receive a changing claim on reserves and fees, not a fixed claim to the quantities originally deposited.
Main actors
- ActorLiquidity provider
- ActorTrader
- ActorPool or manager contract
- ActorPricing mechanism
- ActorGovernance, fee recipient, or administrator
Assets and claims
Assets — controlled or transformed resources
Assets are resources the mechanism moves, holds, values, or transforms.
- AssetPool reserve assets
- AssetDeposit and withdrawal assets
Claims — entitlements and corresponding dependencies
Claims are rights to value, repayment, redemption, control, or another party's performance; each depends on an obligation or system that must honor it.
- ClaimPool share or position entitlement
- ClaimAccrued fee entitlement when accounted separately
A liquidity pool holds shared inventory under contract rules so traders can exchange against available reserves and providers can account for their positions.
Why it exists
Section titled “Why it exists”An order-driven market needs makers to maintain individual quotes. A pool makes inventory reusable: a pricing mechanism can offer trades whenever reserves and rules permit. The pool is the asset container and accounting system; the automated market maker is the rule that prices or accepts trades. Keeping those concepts separate exposes more bugs.
Traditional-finance analogy
Section titled “Traditional-finance analogy”Dealer inventory or a pooled market-making fund is a useful analogy. Unlike one dealer’s balance sheet, a smart-contract pool can expose its inventory through a public rule. Depositors normally receive a changing claim on reserves, not a promise to return the exact quantities deposited.
Actors, assets, and claims
Section titled “Actors, assets, and claims”Liquidity providers contribute assets. Traders change reserve composition. Pool and position-manager contracts account for inventory and claims. Pricing logic determines permissible trades. Governance, hooks, or fee recipients may change or receive part of the economic flow.
Reserve tokens are pool assets. A pool share, NFT position, or internal balance is the provider’s pooled share, represented as a claim token or account-bound claim. Separately accrued fees can be another entitlement.
Step-by-step pool lifecycle and state changes
Section titled “Step-by-step pool lifecycle and state changes”- Initialize the pool with its first accountable reserves, price or range state, and provider position.
- Accept later liquidity only under the share, range, fee, and rounding rules that preserve existing claims.
- Execute swaps by taking input, paying output, charging fees, and updating reserve and price state atomically.
- Accrue fees or incentives to the entitled positions without confusing them with unowned token balances.
- Burn or reduce a provider claim before releasing its proportional or range-specific reserves and fees.
- Reconcile actual balances, recorded reserves, active liquidity, claims, fees, and donations after every event.
| Event | Reserves | Provider claim | Other state |
|---|---|---|---|
| Initialize | First assets enter | Initial position is created | Initial price or range is set |
| Add liquidity | Assets increase | Share or liquidity increases | Fees and ranges may update |
| Swap | One reserve rises; another falls | Claim value and inventory mix change | Fees accrue; price state moves |
| Remove liquidity | Assets leave | Share or liquidity is burned | Accrued fees may be collected |
| Donation or direct transfer | Token balance changes | May or may not change | Accounting must define treatment |
A reference-value view can be written as
poolValue = Σ(reserveAmount_i × referencePrice_i). Each reserve amount is in
its token unit and each reference price uses one declared valuation currency.
That valuation is external analysis, not necessarily contract state.
Capital flow follows deposits, trades, withdrawals, and fees. Claim flow follows position minting, transfer, and burning. Return flow starts with trader-paid fees or explicit incentives. Risk flow reaches providers through inventory, token, accounting, contract, range, and governance failures; traders bear execution loss within their authorized bounds.
Return source and loss allocation
Section titled “Return source and loss allocation”Pools do not manufacture return. Traders pay fees; token issuers or governance may fund incentives; reserve prices create gains or losses in the valuation currency. Providers absorb inventory changes, adverse selection, and shortfalls unless an explicit junior reserve or guarantor takes the first loss.
Engineer or auditor lens
Section titled “Engineer or auditor lens”Reconcile actual balances, recorded reserves, shares, liquidity, fee growth, ranges, and donations. Test initialization, proportional deposits, unbalanced deposits, zero liquidity, rounding, minimum locked liquidity, callbacks, reentrancy, unusual token transfers, emergency controls, and withdrawal limits. No trade should make accountable reserves negative or bypass pricing and fees.
The Uniswap v2 pair contract is one concrete pool implementation with mint, burn, swap, reserve, and LP-token accounting. Uniswap’s pool documentation explains that version’s model. These references do not define concentrated, multi-asset, managed, stable-swap, or hook-based pools. Both references were reviewed 2026-08-10.
Common misunderstandings
Section titled “Common misunderstandings”- “The pool is the pricing formula.” Inventory/accounting and pricing are separate review surfaces.
- “LPs own their original deposit quantities.” Their claim normally follows the current reserves and position rules.
- “Contract balance equals available liquidity.” Ranges, claims, fees, locks, or accounting exclusions can make some balances inactive or unavailable.
Continue with the liquidity-provider position.
Machine-readable model
Key equations
Canonical expressions come from the structured concept record. KaTeX renders the notation, while the plain-text expression and variable table keep its meaning and units inspectable without JavaScript. Read the narrative above for the model's domain, assumptions, and rounding rules.
Equation 1 Plain-text equation:
poolValue = sum(reserveAmount_i * referencePrice_i)Variables and units for equation 1 Symbol Meaning Unit poolValuePool Value selected valuation unit (for example, USD) reserveAmount_iRecorded amount of reserve asset i units of reserve asset i referencePrice_iReference price assigned to reserve asset i valuation units per unit of reserve asset i
Assurance contract
Security properties
These structured statements define desired behavior. Their stable IDs can bind tests, invariants, specifications, audit findings, or proof results without turning descriptive review advice into an assurance claim.
Desired · not evaluated: No test, audit, or proof result is implied until scoped evidence is linked to this property.
Recorded reserves reconcile with accountable token balances under the selected accounting model
Deposits and withdrawals mint or burn claims without transferring more value than the accounting rule permits
Trades cannot make accountable reserves negative or bypass the pool's pricing and fee constraints
Uncollected fees, donations, rounding, and inactive liquidity are handled explicitly
Knowledge check
Quiz
Answer in your own words, then open the model answer.
What problem does Liquidity pool exist to address?
Model answer
Liquidity pools replace or supplement individually posted orders with reusable inventory that a pricing mechanism can quote and settle against continuously.