Uniswap DualPool Explained: You Can Earn Returns Even When LP Funds Are Idle

Source: Uniswap; Compiled by: Jinse Finance Claw

Uniswap DualPool is now live — This is an open-source Uniswap v4 Hook, co-designed by Spark and developed by Uniswap Labs. It allows market makers to earn lending returns while assets are idle, and only deploys the funds when a trade occurs. From the outside, DualPool looks like a regular v4 pool: traders, aggregators, and solvers execute trades via the PoolManager. But internally, the pool’s funds are stored in an ERC-4626 yield vault; when a trade needs to be executed, the funds are pulled into concentrated liquidity positions.

The idle capital problem

On-chain liquidity is on standby all day long. Assets submitted into an AMM pool can be traded at any time, but during the gaps between trades, those assets generate no yield. For professional market makers, this forces them to make a trade-off between where their funds are stored:

  • Put funds in the pool: earn trading fees, but give up lending yield;

  • Put funds in a lending market: earn yield, but cannot participate in trading flow.

For stablecoin pairs, trading fees are thin and competition is fierce, so lending yield may match or even exceed fees. As a result, market makers sometimes choose yield, and that liquidity will not appear on the AMM.

DualPool eliminates this trade-off by providing liquidity instantly: during the trading gap, funds are held in a yield vault; when the trade arrives, the pool calls only the required funds on demand within the trade itself.

How DualPool works

Between two trades, the liquidity actually held in the PoolManager by DualPool is almost zero. Its funds are stored in an ERC-4626 vault selected by the pool operator, continuously earning lending yield. When a trade arrives, the Hook executes an atomic four-step loop within the transaction:

  1. Only withdraw exactly what is needed: The Hook calculates the various token amounts required by its configured price range based on the current price, and only withdraws the difference portion from the vault.

  2. Deploy concentrated liquidity: According to the operator’s allocation plan, publish the funds as one or multiple positions.

  3. Execute the trade normally: PoolManager runs standard swap calculations for these positions and charges the pool’s fixed fee, the same as any other pool.

  4. Re-deposit remaining funds into the vault: The Hook removes all positions it added, settles with PoolManager, and re-deposits the remaining funds back into the vault.

For traders, this is just a regular Uniswap trade. The operator’s funds leave the vault only for the duration of the trade, and are immediately re-deposited after the trade completes. Since the trade itself handles the withdrawal and re-depositing of liquidity, the system can run autonomously without any Keeper infrastructure.

Who DualPool is for

  • Operators are professional market makers. Operators deploy the pool, set fees, choose a yield vault, design liquidity distribution, and inject initial capital. In return, they receive both trading fees and yield generated from idle funds.

  • Liquidity providers (LPs) can join the pool when the operator allows external deposits. LPs receive proportional ownership of the pool’s assets while earning trading fees and vault yield, without active management.

  • Traders (Swappers) trade with DualPool just like any other Uniswap pool, using the interfaces, aggregators, and routers they already use. The entire trading process does not reveal the fact that the liquidity was just stored in a lending vault.

Routers and aggregators run DualPool trades through existing v4 execution paths without changes. The only (optional) additional work is quoting (described below).

Liquidity form

DualPool does not deploy funds into a single price range. Each pool comes with an operator-configured distribution plan: a set of weighted tick ranges that are deployed together on each trade. Ranges can overlap, be distributed asymmetrically on either side of the current price, or be entirely skewed to one side. This is enough to encode a market-making strategy, not just a single swing. Typical distribution shapes the operator may run include:

  • Stablecoin order book: concentrate most of the weight into a narrow band near the anchored price, with shallower coverage around the edges, so that the vast majority of depth is where nearly all trading volume occurs.

  • Barbell: keep the center tightly packed, while retaining one-sided depth farther away, so large one-sided flow can be traded without diluting liquidity onto ticks that are rarely touched.

  • Anchored defense ladder: stack increasingly deeper support step by step on the vulnerable side of the anchored price, suitable for operators with defense obligations.

Operators can replace the distribution plan at any time between two trades, so the shape can be flexibly adjusted based on the volatility environment: narrow and aggressive when the market is calm, wide and defensive when the market is tense. The capital allocation algorithm is conservative in construction: before computing liquidity, the Hook assigns each range the exact share of the pool’s balance, so overlapping ranges never double-count capital.

Properties that never change

The following three attributes are fixed at pool creation time:

  • Fees: Each DualPool has static fees; after that, no code path can change them. If you need to reprice the same trading pair, the operator must deploy a new pool.

  • Vault: The binding relationship between the pool’s currency and its yield vault is set once at creation. After that, there is no admin path to redirect the pool’s funds to a different vault.

  • Trading logic: Every trade runs PoolManager’s standard v4 math operations, for any liquidity deployed via the Hook.

These immutabilities ensure DualPool is predictable for aggregators and solvers routing to it: operators cannot change the core trading logic, and there is no admin function to steal funds deposited by LPs. The operator’s retained powers (pause and resume the pool, rebalance liquidity distribution, limit external deposits, and cut off vault access in emergencies) are entirely outside these three immutabilities.

Quoting pools with zero liquidity

A pool without standing liquidity breaks routers and aggregators’ habits over the years: they estimate depth by reading pool state. If you look at an on-chain DualPool between two trades, you’ll see a price, but liquidity is nearly zero — even if that pool can clear millions of dollars. Therefore, DualPool exposes a dedicated quoting interface. Using Hook’s native quoting flow is completely optional, but doing so can significantly improve routing performance:

  • Indicative quote view: Price an expected trade based on the liquidity (including fees) the Hook will deploy. A zero quote means the pool cannot trade and should be routed elsewhere.

  • Paired reserve view: Distinguish the pool’s total assets from effective liquidity — the amount the vault can return immediately. When the vault has a cap or is constrained by utilization, effective liquidity equals the cap; the Hook configures the fund size based on this cap, and the router should control the trade size accordingly.

  • Paused pools return a clear error rather than silently returning empty padding, so routers can skip them.

There are no changes at the execution level, because DualPool trades are standard v4 trades with the same execution and slippage constraints as other pools. The only difference is cost: this loop adds vault withdrawal and deposit operations inside the trade, so Gas usage may be several times higher than a typical v4 trade. At current Gas prices, that’s only a few cents extra, but it still factors into the net execution price.

Security model

Most of DualPool’s security model is enforced by code, independent of vault selection:

  • Isolation: The Hook maintains a ledger for each pool’s assets by pool and currency. Its total token balance is never used as an accounting input, and assets recorded by one pool cannot be redeemed by another pool.

  • Share safety: LP shares are internal and non-transferable. Share calculation includes a virtual offset to defend against inflation attacks, always rounding in a direction favorable to existing LPs, and requiring a configurable minimum holding period to prevent fee sniping by depositing and withdrawing within the same block.

  • Reentrancy protection: User-facing entry points have standard protections; the trade loop is protected by a transient lock, which rejects reentrant trades within the same pool and freezes any vault deposit and withdrawal actions on the Hook during any loop execution.

The core trust assumption is the underlying yield vault. The pool’s vault holds its idle funds, and the Hook has persistent authorization to it; therefore, the operator must choose a vault whose governance and upgrade risks are acceptable. Vault selection is a core part of the operator’s risk management. If a vault’s risk becomes unacceptable, the fallback is a single emergency procedure: pause the pool, disable deposits, revoke vault authorization, and attempt to fully withdraw all pool assets. If the vault has a cap or insufficient liquidity, the system degrades gracefully: quoting and deployment size shrink to effective liquidity, and LPs’ equity in total assets is unaffected; a vault that cannot accept deposits will never block trades.

OpenZeppelin audited DualPool and found no severe or high-risk vulnerabilities; all issues reported have been fixed. The audit report is provided together with the DualPool Hook code.

Building with DualPool

If you want your capital to keep earning yield between two executions, DualPool is now live. To deploy your own DualPool, use this deployment guide: it walks you through deploying an audited Hook from the official factory. The deployment guide covers the complete process, including configuration and verification.

For a deeper understanding of how DualPool works, check the GitHub repository and developer documentation, which includes integration guides for routers and aggregators.

UNI1.40%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pinned