Uniswap v4

Uniswap v4 is an automated market maker (AMM) protocol version that combines a shared pool manager with optional smart-contract extensions called hooks. The architecture is designed to make pool operations more composable, while allowing developers to customize how individual pools behave. These features create possibilities, but they do not make every v4 pool safer, cheaper, or more liquid than another one.

One Pool Manager, Many Pools

In a given v4 deployment, a singleton contract called PoolManager handles the state and operations for that deployment’s pools. A pool is identified by its key parameters, including the two currencies, fee settings, tick spacing, and hook address. Earlier Uniswap versions generally used a separate contract for each pool; v4’s shared manager can avoid deploying a separate pool contract and can coordinate multiple actions through one contract.

This design does not mean every token pair shares liquidity. Each pool has its own reserves, prices, liquidity positions, and configuration. A transaction that uses several pools can combine their operations, but it still depends on the liquidity and rules of each pool involved.

Flash Accounting and Net Settlement

During a PoolManager unlock, an integrator can perform operations such as swaps and liquidity changes. Instead of requiring every intermediate token movement to be transferred between pool contracts immediately, v4 records credits and debts as temporary balance deltas. The operations must resolve those deltas before the unlock finishes; only the net amounts owed at the end need to be settled with token transfers.

This can reduce transfer and call overhead for multi-pool swaps or transactions that combine swaps with liquidity operations. It is a design-level optimization, not a fixed gas discount: actual costs depend on the route, tokens, hooks, transaction, and integration. Flash accounting also does not remove the need to settle balances correctly; the manager checks that no amount remains owed at the end of the operation.

Hooks Make Pool Behavior Programmable

A hook is an external smart contract that a pool can call at selected points, such as before or after initialization, adding or removing liquidity, swaps, or donations. A hook declares which callbacks it uses, and those permissions are encoded in its address. One pool can use one hook, while the same hook contract may be used by multiple pools. Hooks are optional: a pool without one can use the standard concentrated-liquidity behavior familiar from v3.

Hooks can support designs such as dynamic fees, custom curves, limit-order-like behavior, or extra rules around liquidity. These are building blocks, not built-in guarantees. A hook does not automatically attract liquidity, improve a trader’s execution, prevent sandwich attacks, or protect a liquidity provider from impermanent loss. Fee settings and outcomes depend on the pool’s implementation and market conditions.

The hook is selected when a pool is created and cannot later be added, removed, or swapped on that same pool. Before using a hooked pool, examine the exact pool and hook addresses, callback permissions, code, administrator controls, external dependencies, token contracts, liquidity, and exit options. An audited core contract does not mean every independently deployed hook has been audited or is safe.

What the Architecture Does Not Decide

Uniswap v4 supplies shared infrastructure; the design of each pool still matters. A pool can have thin liquidity, volatile assets, unusual fee logic, or a hook with its own code and permissions. Dynamic fees can react to conditions only if the pool’s design implements that behavior; the protocol does not provide one universal formula or promise that a fee will reduce losses. Users and liquidity providers need to evaluate the particular pool rather than treating the version number as a risk rating.

The v4 core repository also identifies both Business Source License 1.1 and MIT-licensed files, and says each file header identifies the applicable license. The repository README is not a substitute for checking the license of the specific code a developer plans to use.

Social Media Sentiment

A small recent r/defi discussion focused on how to assess a particular v4 pool’s hook rather than whether the protocol is simply good or bad. Participants emphasized checking permissions, custom accounting, administrator controls, token behavior, and liquidity; another commenter questioned whether a hook’s added complexity is justified by its practical benefit. This is one self-selected thread, not a representative survey of Uniswap users or evidence that every hook has the same risk.

Last updated: 2026-10

Related Terms

See Also

Sources

  • Uniswap Docs: v4 Architecture — Explains the shared PoolManager, singleton design, hooks, dynamic fees, and flash-accounting model.
  • Uniswap Docs: Hooks — Describes optional pool-specific hooks, callback permissions, potential uses, and the fact that a hook cannot be changed after pool initialization.
  • Uniswap Docs: Flash Accounting — Details temporary balance deltas, final settlement, and how reduced intermediate transfers can help multi-pool operations.
  • Uniswap v4 Core: Repository and License — States that the core repository contains BUSL-1.1 and MIT files and that each file header identifies its applicable license.