Introducing DualPool
DualPool is now live, an open-source Uniswap v4 hook designed in collaboration with Spark and developed by Uniswap Labs that lets market makers earn lending yield on their inventory until the moment a swap needs it. From the outside, a DualPool is an ordinary v4 pool: swappers, aggregators, and solvers execute swaps through the PoolManager. Inside, the pool's capital sits in ERC-4626 yield vaults, pulled into concentrated liquidity positions when needed for a swap.
The idle capital problem
Onchain liquidity is always on. Assets committed to an AMM pool can be traded against at any moment, but between trades they earn nothing. For a professional market maker, that forces a tradeoff in where inventory sits:
- Commit it to a pool, and it earns swap fees while giving up lending yield.
- Commit it to a lending market, and it earns yield while sitting out the trade flow.
For stable pairs, where fees are thin and flow is competitive, lending yield can match or beat pool fees. So makers sometimes pick the yield, and that liquidity stays off the AMM.
DualPool removes this tradeoff by provisioning that liquidity just in time: inventory sits in yield vaults between swaps, and when a trade arrives, the pool recalls what it needs inside the swap itself.
How DualPool works
Between swaps, a DualPool holds effectively zero liquidity in the PoolManager. Its inventory lives in ERC-4626 vaults chosen by the pool's operator, earning lending yield continuously. When a swap arrives, the hook runs a four step cycle atomically inside the swap transaction:
- Withdraw just enough. The hook computes how much of each token its configured ranges need at the current price, and withdraws only that shortfall from the vaults.
- Deploy concentrated liquidity. It posts that capital as one or more positions, per the operator's distribution.
- Execute normally. The PoolManager runs its swap math against those positions and charges the pool's fixed fee, as it would for any other pool.
- Re-vault the remainder. The hook removes every position it added, settles up with the PoolManager, and deposits what's left back into the vaults.
To the swapper, it's a normal Uniswap swap. The operator's inventory is out of the vaults only for the duration of the swap and is redeposited immediately after. Because the swap deals with the withdrawing and redepositing of liquidity into the vaults, the system can operate autonomously without the need for any keeper infrastructure.
Who DualPool serves
- Operators are professional market makers. An operator deploys a pool, sets its fee, chooses the yield vaults, shapes the liquidity, and seeds the initial inventory. In return they capture both the swap fees and the yield on idle capital.
- Liquidity providers can join a pool when its operator allows outside deposits. LPs receive a proportional claim on the pool's assets, earning swap fees and vault yield together, with nothing to actively manage.
- Swappers trade against a DualPool like any other Uniswap pool, through the interfaces, aggregators, and routers they already use. Nothing about the swap reveals that the liquidity was in a lending vault a moment earlier.
- Routers and aggregators run DualPool swaps through their existing v4 execution path, unchanged. The only (optional) new work is quoting, covered below.
Shaping liquidity
DualPool does not deploy capital into a single price range. Each pool carries an operator configured distribution: a set of weighted tick ranges, deployed together on every swap. Ranges can overlap, sit asymmetrically around the current price, or be entirely one-sided. That's enough to encode a market-making strategy, not just a band. A few shapes an operator might run:
- A stablepair book could concentrate most weight in a tight band at the peg, with lighter coverage around it, so most of the depth sits where nearly all the volume happens.
- A barbell keeps a tight center and reserves one-sided depth further out, so large directional flow has something to trade into without diluting liquidity across ticks that rarely see volume.
- A peg-defense ladder stacks progressively deeper support on the vulnerable side of a peg, for operators with a mandate to defend one.
Operators can replace the distribution at any time between swaps, so shapes can rotate with the volatility regime: tight and aggressive in calm markets, wide and defensive in stressed ones. The capital allocation math is conservative by construction; the hook budgets each range its exact share of the pool's balance before computing liquidity, so overlapping ranges can never double count capital.
What never changes
Three properties are fixed at pool creation:
- The fee. Every DualPool ships with a static fee; no code path can change it afterward. To reprice a pair, an operator deploys a new pool.
- The vaults. The binding between a pool's currencies and its yield vaults is set once. No admin path can later point the pool's capital at a different vault.
- The swap math. Every swap runs the PoolManager's standard v4 math against whatever liquidity the hook deploys.
These invariants keep DualPools predictable for the aggregators and solvers routing to them: the operator cannot change core swap math, and no admin function can drain a pool LPs have deposited into. The powers the operator retains (pausing and resuming the pool, reshaping the liquidity distribution, gating outside deposits, and severing vault access in an emergency) sit entirely outside those three invariants.
Quoting a pool that holds no liquidity
A pool with no resident liquidity breaks a habit routers have relied on for years: reading pool state to estimate depth. Look at a DualPool onchain between swaps and you'll see a price but almost no liquidity, even when the pool can fill millions. DualPool therefore exposes a dedicated quoting surface. Leveraging the hook’s native quoting flow is completely optional, but doing so can dramatically improve routing outcomes:
- An indicative quote view prices a prospective swap against the liquidity the hook would deploy, fee included. A zero quote means the pool can't trade: route elsewhere.
- A pair of reserve views distinguishes the pool's total assets from its effective liquidity: what the vaults can return right now. When a vault is capped or utilization-constrained, effective liquidity is the ceiling; the hook sizes deployments against it, and routers should size fills against it too.
- A paused pool reverts with a distinct error rather than a silent empty fill, so routers can skip it.
Execution is unchanged, as a DualPool swap is a standard v4 swap with the same execution and slippage limits as any other. The one difference is cost, as the cycle adds vault withdrawals and deposits inside the swap, so gas overhead can be several times more than a vanilla v4 swap. At today’s gas prices it’s a few extra cents, but that still counts toward net execution price.
Security model
Most of DualPool's security model is enforced in code, independent of vault choice:
- Isolation. The hook tracks every pool's assets in a ledger keyed by pool and currency. Its aggregate token balance is never an input to accounting, and value recorded for one pool cannot be redeemed by another.
- Share safety. LP shares are internal and non-transferable. The share math carries a virtual offset against inflation attacks, always rounds in favor of existing LPs, and enforces a configurable minimum holding period to defend against same-block deposit and withdraw fee sniping.
- Reentrancy. User-facing entry points carry standard guards, and the swap cycle is protected by transient locks that reject reentrant swaps on the same pool and freeze all deposits and withdrawals anywhere on the hook while any cycle is in flight.
The core trust assumption is the underlying yield vaults. A pool's vaults hold its idle capital and a standing allowance from the hook, so operators must choose vaults whose governance and upgrade risk they accept. Vault selection is the core of an operator's risk management. If a vault’s risk becomes untenable, the backstop is a single emergency action: pause the pool, close deposits, revoke the vault allowances, and attempt to pull the pool's assets back out. A vault that is capped or illiquid degrades gracefully; quotes and deployments shrink to effective liquidity, LP claims on total assets are unaffected, and one that can't accept deposits never blocks a swap.
OpenZeppelin audited DualPool. No critical or high severity findings; every reported issue resolved. The audit report is available alongside the DualPool hook code.
Build with DualPool
If you want your inventory earning between fills, DualPool is live now. To deploy a DualPool of your own, use this deployment guide: it goes through deploying the audited hook from the canonical factory. The deployment guide covers the full process walks through configuration and verification.
To go deeper on how DualPool works, check out the GitHub repository and the developer docs, including the integration guide for routers and aggregators.
Acknowledgements
DualPool was designed and built in collaboration with Spark, who will own and operate its largest deployment—the ultimate destination for the $150M of liquidity they moved to Uniswap v4 in June. We’d also like to thank OpenZeppelin for their diligence in the audit process.



