Skip to content

Add VolatilePairHook hook on ethereum - #10548

Merged
Ponx merged 1 commit into
mainfrom
hooks/ethereum/0x000022ec4ebd6b12294396e852e4c3876b253cc0
Oct 13, 2026
Merged

Ponx merged 1 commit into
mainfrom
hooks/ethereum/0x000022ec4ebd6b12294396e852e4c3876b253cc0

Conversation

@claude

@claude claude Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Requested by Christian Angelopoulos · Slack thread

Before: The hooklist has no entry for the VolatilePair hook that Uniswap Labs deployed on Ethereum at 0x000022Ec4eBD6b12294396E852E4C3876b253Cc0.

After: The hook is registered under hooks/ethereum/, with the same shape as its sibling, the StablePair hook (0x0000113d…bfcC0).

How: one new file, copied field for field from the Ethereum StablePair entry, with the address, name and description changed. The flags come from the address bits (0x3CC0). Checked on-chain: the hook is an ERC1967 proxy whose bytecode is identical to StablePair's proxy. Its implementation (0x1DDbf7215be4F8A7623B9B1B0255C6e1E3F6c000, set by the Upgraded event in the deploy tx) returns the same 14 flags from getHookPermissions() when its deployed bytecode is executed locally. The deploy tx 0x85a82d5d…5363 was sent by 0xe49acc3b…5b95 (the same deployer as StablePair) through the CREATE2 factory. scripts/validate.py and scripts/verify_flags.py pass locally.

Sibling PR: Uniswap/universe#43014 adds the same hook to the dev portal's Uniswap Labs Hooks docs and deployments explorer.

Note

Implementation verified. The hook team verified the implementation 0x1DDbf7215be4F8A7623B9B1B0255C6e1E3F6c000 on Etherscan. On re-run, the Review Hook PR workflow fetched the VolatilePairHook source and approved: every flag, property and metadata field matches the source. No JSON changes were needed.

Summary

VolatilePair is a Uniswap v4 dynamic-fee hook built for assets without a fixed reference price. Instead of charging a flat fee on every swap, it uses recent price moves to set fees by trade direction, capturing more value for LPs while keeping the quoted spread competitive.

Flags

Flag Value
beforeInitialize true
afterInitialize true
beforeAddLiquidity true
afterAddLiquidity true
beforeRemoveLiquidity false
afterRemoveLiquidity false
beforeSwap true
afterSwap true
beforeDonate false
afterDonate false
beforeSwapReturnsDelta false
afterSwapReturnsDelta false
afterAddLiquidityReturnsDelta false
afterRemoveLiquidityReturnsDelta false

Properties

Property Value Basis
dynamicFee true _beforeSwap returns feeE6 | LPFeeLibrary.OVERRIDE_FEE_FLAG, overriding the LP fee on every swap (confirmed from source)
upgradeable true ERC1967 proxy; implementation inherits BaseUUPSHook → UUPSUpgradeable, with _authorizeUpgrade gated by DEFAULT_ADMIN_ROLE
requiresCustomSwapData false hookData is unused in _beforeSwap; the fee comes from on-chain state only (confirmed from source)
vanillaSwap false Follows from dynamicFee: true
swapAccess none _beforeSwap has no access control (confirmed from source)

Warnings

  • Ethereum only. The address was not found on Arbitrum, the other chain where StablePair is listed (checked against warehouse data up to 2026-10-13 19:56 UTC).
  • auditUrl is empty, as it is for StablePair.

🤖 Generated with Claude Code

https://claude.ai/code/session_014fYw9QTMiuD2UhQD1AkQ9f

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fYw9QTMiuD2UhQD1AkQ9f

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: hooks/ethereum/0x000022ec4ebd6b12294396e852e4c3876b253cc0.json

Address Flags ✅

Lowest 14 bits of 0x...3cc0 = 0x3CC0 = 11 1100 1100 0000:

Bit Flag Expected File
13 beforeInitialize true true ✅
12 afterInitialize true true ✅
11 beforeAddLiquidity true true ✅
10 afterAddLiquidity true true ✅
9 beforeRemoveLiquidity false false ✅
8 afterRemoveLiquidity false false ✅
7 beforeSwap true true ✅
6 afterSwap true true ✅
5 beforeDonate false false ✅
4 afterDonate false false ✅
3 beforeSwapReturnsDelta false false ✅
2 afterSwapReturnsDelta false false ✅
1 afterAddLiquidityReturnsDelta false false ✅
0 afterRemoveLiquidityReturnsDelta false false ✅

All flags are correct.

Proxy / Source Verification ⚠️

source_meta.json confirms this hook address is an ERC1967Proxy with:

  • verified: true (the proxy contract itself is verified)
  • implementation: 0x1ddbf7215be4f8a7623b9b1b0255c6e1e3f6c000

The .sources/ directory contains only the proxy contract (ERC1967Proxy + ERC1967Utils). The implementation contract source code is not present. This means the actual hook logic — the beforeSwap, afterSwap, beforeInitialize, afterInitialize, beforeAddLiquidity, afterAddLiquidity callbacks — cannot be inspected.

Properties — Cannot Verify ❌

Because the implementation source is unavailable, the following cannot be confirmed:

  • dynamicFee: true — The description claims fees are dynamically adjusted based on recent price moves, but this cannot be verified without reading the implementation's beforeSwap / afterSwap logic or any updateDynamicLPFee() calls.
  • requiresCustomSwapData: false — Cannot verify whether hookData is optional or required.
  • vanillaSwap: false — Correctly set to false given dynamicFee: true, but the underlying claim (dynamicFee: true) is itself unverified.
  • swapAccess: "none" — Cannot verify whether beforeSwap contains access control.

upgradeable: true ✅

Confirmed: the hook is an ERC1967Proxy, which delegates all calls to a mutable implementation address stored in an EIP-1967 slot. This is a standard upgradeable proxy pattern.

Metadata

  • chainId: 1 — Correct for Ethereum.
  • verifiedSource: true — The proxy source is verified. Whether the implementation is separately verified on Etherscan is unknown (it was not resolved into .sources/).
  • name: "VolatilePairHook" — The verified contract name is ERC1967Proxy; "VolatilePairHook" presumably refers to the implementation. This cannot be confirmed without implementation source.
  • description — Makes specific technical claims (dynamic fee, fee direction based on price volatility, LP value capture) that cannot be substantiated without the implementation source.

Required Action

The implementation contract at 0x1ddbf7215be4f8a7623b9b1b0255c6e1e3f6c000 must have verified source available before this entry can be approved. Without it, the properties fields and description cannot be cross-referenced against on-chain logic.

@claude
claude Bot marked this pull request as draft October 13, 2026 20:34

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: hooks/ethereum/0x000022ec4ebd6b12294396e852e4c3876b253cc0.json

Address Flags

Address 0x000022ec4ebd6b12294396e852e4c3876b253cc0 — last 14 bits of 0x3cc0:

Bit Flag JSON Correct?
13 beforeInitialize true ✓
12 afterInitialize true ✓
11 beforeAddLiquidity true ✓
10 afterAddLiquidity true ✓
9 beforeRemoveLiquidity false ✓
8 afterRemoveLiquidity false ✓
7 beforeSwap true ✓
6 afterSwap true ✓
5–0 (donate, delta flags) all false ✓

Confirmed by BaseDynamicFeeHook.getHookPermissions() which returns the identical permission set.

Properties

  • dynamicFee: true — _beforeSwap returns feeE6 | LPFeeLibrary.OVERRIDE_FEE_FLAG as its third return value, overriding the LP fee on every swap. ✓
  • upgradeable: true — Inherits BaseUUPSHook → UUPSUpgradeable. _authorizeUpgrade is gated by onlyRole(DEFAULT_ADMIN_ROLE). source_meta.json confirms "proxy": true. ✓
  • requiresCustomSwapData: false — _beforeSwap has a bytes calldata hookData parameter that is entirely unused; the fee is computed purely from on-chain state. ✓
  • vanillaSwap: false — Correct; dynamicFee is true, so vanillaSwap must be false. ✓
  • swapAccess: "none" — _beforeSwap performs no access control; it computes and returns a fee override without any gating logic. ✓

Metadata

  • name: "VolatilePairHook" — matches contractName in source_meta.json and the contract's own declaration. ✓
  • chainId: 1 — correct for ethereum. ✓
  • verifiedSource: true — confirmed by source_meta.json. ✓
  • description — accurately describes the on-chain logic: dynamic fees, bid/ask direction differentiation, price-move-based fee adjustment. No audit claims, safety guarantees, or promotional language. ✓

All fields verified against on-chain source. No issues found.

@claude
claude Bot marked this pull request as ready for review October 13, 2026 21:03
@Ponx
Ponx merged commit 6a25998 into main Oct 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants