Skip to content

11Research

Uniswap v4 hook risks: an issuer review checklist

A permission flag identifies a callback, not a safety guarantee: review inputs, accounting, limits, privileged powers and tested exits together.

Version 1.05 min read

A hook is a control surface, not a safety label

Uniswap v4 lets a pool use an optional hook contract to customise behaviour around pool actions. One hook can serve many pools, but a pool has one hook slot. Callback permissions are represented by flags encoded in the hook address.1 These facts describe how a hook is connected. They do not establish that the chosen callbacks, dependencies or economic rules are appropriate for an issuer.

A useful review starts with the exact deployed configuration, not a feature list. A catalogue block may describe a capability, a reference implementation or a design option. It is not evidence of a separately deployed, OCB-owned or audited contract. Multiple advertised features still have to fit one coherent integration. Establish what is proposed, what exists and which code and parameters an audit actually covered.

Map every callback to an authority and an invariant

List the enabled callbacks, their callers, the pool identities they accept, and the state they may change. Review swap paths as well as liquidity changes and initialisation. A check that exists in one path may not protect another. Name the invariant in plain language: which assets may move, whose balance may change, and which input must be valid before that happens.

Custom accounting increases the need to reconcile deltas and settlement across the whole transaction. Test adverse and interrupted paths, rounding boundaries and the interaction with routers and supported token behaviours. Reusing a library can reduce the amount of novel code, but OpenZeppelin's accounting and fee building blocks are not an audit of the consuming integration.3 The integration, configuration and privileged operations remain review subjects.

Scroll sideways when needed. Focus the diagram and use the Left and Right Arrow keys.

Illustrative hook control and failure pathsCheck reference freshness, callback permissions and swap limits before swap accounting. Monitor the result. Stale data or failed checks take a defined pause or constrained-mode path, whose liquidity-exit behaviour must also be tested.Reference checksage / bounds / statusPermission + limitcallback / size / feeSwap + accountingsettle actual deltasMonitor outcomealerts + reconciliationFailure: defined constrainedmode or pause, named ownerTest exits in every state
Fig. 1. Review the normal path and the failure path together. Original illustrative diagram. A particular implementation may have different callbacks and settlement steps; the drawing is not a claim about a deployed OCB pool.

Fresh inputs need a defined failure response

A reference-aware rule needs more than a plausible price. Specify the feed identity, units, decimals, allowed age, expected market schedule and acceptable bounds. Check the returned update timestamp and distinguish a delayed update from an intentional closed-market state. Chainlink describes consumer-side freshness and bounds responsibilities; heartbeat and deviation settings vary by feed rather than supplying a universal safe timeout.4

Then decide what happens when an input is stale, missing or outside bounds. The response may be a pause or a deliberately constrained mode, but the owner, trigger and restart requirements must be explicit. A fallback reference brings its own trust and basis assumptions. Automatically accepting any available value can turn an availability measure into a new economic risk.

Dynamic fees do not create backing or guarantee a peg

A dynamic fee can change the cost of a swap. A reference-aware design may charge differently according to direction or deviation. Review the input used to calculate that deviation, the price movement one swap can produce, maximum fees and behaviour at boundaries. A fee computed before a swap should not be treated as proof that the whole trade remains within the intended exposure.

None of this guarantees a peg. Alignment also depends on executable arbitrage, available liquidity, economic backing, redemption rights and the ability to settle an exit. A fee incentive cannot manufacture missing reserves or make a suspended redemption process available. Our NAV-aware pool note discusses the specific reference-alignment design; this checklist asks how the complete implementation fails and who can act.

Table 1. An original issuer review checklist. Each row needs evidence and a named owner.
SurfaceEvidence to requestFail-safe ownership
Callbacks and accessEnabled flags, accepted pools/callers and permission tests.Integrator owns restrictions; issuer approves privileged powers.
Reference dependenciesFeed identity, units, timestamps, age limits and bounds.Risk owner defines stale mode and restart conditions.
Fees and swap limitsDeviation definition, per-swap limits and boundary tests.Operator monitors breaches within issuer-approved authority.
Accounting and settlementDelta reconciliation and full-transaction tests, including failure paths.Engineering owner investigates unresolved balances.
Admin and upgradesRole holders, delay rules, dependency upgrades and audit scope.Issuer controls authorised changes and incident escalation.
Pause and withdrawalsState-by-state swap, removal, collection and exit tests.Named incident owner executes the tested response.

Review changes over time as carefully as the launch state. Identify which parameters can change without replacing the hook, which dependencies are upgradeable, and which role can redirect a reference or alter a limit. A fixed hook address does not establish that every dependency or effective rule is immutable. Record the reviewed version and configuration, the process for announcing changes, and the evidence required before resuming after a material update. An audit report for one version should not silently become a claim about later code or broader powers. Keep administrative capability distinct from the authority actually granted to an operator.

A pause has to be tested, including exits

Do not assume that every pause leaves withdrawals open. Test removal, fee collection, token transfer and any redemption or adapter dependency in each relevant state. A hook may permit an exit while another contract prevents it. Record what holders can actually do, the assets they receive and which external conditions must hold. Where an exit is constrained, disclose the constraint instead of calling it unconditional.

Monitor feed age, reference deviation, fee changes, swap rejections, accounting exceptions and privileged actions. Alerts need an owner who can interpret them and a permitted response, not just a dashboard. Rehearse loss of the reference, compromised administration, dependency failure and a bad upgrade without publishing exploit instructions. Uniswap's security material supports a self-directed review; it is not certification or a guarantee of safety.2

Use the hook planning page to identify the intended scope, pool documentation for operating context and synthetic-index design for backing and redemption questions. Designs and technical products remain in development where stated. The release decision should rest on reviewed code, configuration, test evidence and accountable owners, not the number of features selected.


Disclosure: Onchain Bureau offers pool design and hook engineering. This original review framework is educational, not a security audit, certification or guarantee of safety, price support or returns. The sources establish documented interfaces and responsibilities; no live pool inspection, client performance or deployment claim is presented here.

Sources

  1. Uniswap developer documentation, Hooks. One optional hook contract per pool, reusable across pools, with callback permission flags encoded in its address. developers.uniswap.org (opens in a new tab)
  2. Uniswap developer documentation, Security. A self-directed security framework, not certification or a guarantee of hook safety. developers.uniswap.org (opens in a new tab)
  3. OpenZeppelin Uniswap Hooks documentation. Modular building blocks for hook accounting, fees and utilities; a library is not an audit of a consuming integration. docs.openzeppelin.com (opens in a new tab)
  4. Chainlink Data Feeds overview. Consumer responsibilities include freshness checks and application-specific bounds and responses. docs.chain.link (opens in a new tab)

In the docsUniswap v4 pools

Review the whole pool not just the fee rule.

Scope references, permissions, accounting, limits and incident ownership before implementation.

Onchain Bureau

Book a meeting.

30 minutes on Google Meet · Paris time

Checking the calendar…

Available dates and times will appear here.