Skip to content

Add AdaptivePoolPolicyHookV1 hook on base - #12110

Merged
Ponx merged 1 commit into
mainfrom
hooks/base/0x2f7754e19b692c5b7bee4220c90f2c43b17108c4
Nov 25, 2026
Merged

Ponx merged 1 commit into
mainfrom
hooks/base/0x2f7754e19b692c5b7bee4220c90f2c43b17108c4

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

Summary

Applies asymmetric directional LP fee overrides (configurable per swap direction) on Uniswap v4 dynamic-fee pools, enforces configurable minimum and maximum sqrtPrice bounds in afterSwap (reverting out-of-bounds swaps), and optionally charges an additional hook fee on each swap. Liquidity provision is gated to an owner-managed allowlist when public access is disabled.

Flags

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

Properties

Property Value
dynamicFee true
upgradeable false
requiresCustomSwapData false
vanillaSwap false
swapAccess none

Warnings

None

Closes #12109

@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/base/0x2f7754e19b692c5b7bee4220c90f2c43b17108c4.json

Address Flags

The last two bytes of the address are 0x08C4 (2244 decimal). Decoding 14 bits:

Bit Flag Decoded File Match
13 beforeInitialize false false ✓
12 afterInitialize false false ✓
11 beforeAddLiquidity true true ✓
10 afterAddLiquidity false false ✓
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 true true ✓
1 afterAddLiquidityReturnsDelta false false ✓
0 afterRemoveLiquidityReturnsDelta false false ✓

The source code confirms the mask: BEFORE_ADD_LIQUIDITY | BEFORE_SWAP | AFTER_SWAP | AFTER_SWAP_RETURNS_DELTA = 0x08C4.

Properties

  • dynamicFee: true — Confirmed. _beforeSwap returns LPFeeLibrary.OVERRIDE_FEE_FLAG | fee with direction-dependent fee (fee0For1 or fee1For0).
  • upgradeable: false — Confirmed. source_meta.json reports proxy: false. No proxy pattern, delegatecall to mutable address, or SELFDESTRUCT found in source.
  • requiresCustomSwapData: false — Confirmed. Neither _beforeSwap nor _afterSwap read hookData; swaps execute correctly without it.
  • vanillaSwap: false — Correct. dynamicFee is true and afterSwapReturnsDelta is true; the hook overrides fees and collects an additional hook fee.
  • swapAccess: "none" — Confirmed. _beforeSwap performs no access control — it only applies the fee override. Price bound checks are in _afterSwap (reverting post-swap, not gating access).

Metadata

  • verifiedSource: true — Confirmed by source_meta.json ("verified": true).
  • chainId: 8453 — Correct for Base.
  • name: "AdaptivePoolPolicyHookV1" — Matches the on-chain contract name exactly.
  • description — All technical claims verified against source: asymmetric directional LP fee overrides (confirmed in _beforeSwap), configurable sqrtPrice bounds enforced in _afterSwap with revert on breach (confirmed), optional hook fee on unspecified amount (confirmed via hookFee state variable), and liquidity allowlist when publicLiquidityEnabled is false (confirmed in _beforeAddLiquidity). No promotional, audit, or safety language.

All fields are correct.

@Ponx Ponx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Bot review verified (github-actions APPROVED). Address bitmask/flags consistent, description within the 500-char limit. LGTM.

@Ponx
Ponx merged commit 0ee00e2 into main Nov 25, 2026
5 checks passed
@Ponx
Ponx deleted the hooks/base/0x2f7754e19b692c5b7bee4220c90f2c43b17108c4 branch November 25, 2026 14:10
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.

hook: AdaptivePoolPolicyHookV1 — ETH/cbBTC (Base)

1 participant