Repository navigation
Add AdaptivePoolPolicyHookV1 hook on base - #12110
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
_beforeSwapreturnsLPFeeLibrary.OVERRIDE_FEE_FLAG | feewith direction-dependent fee (fee0For1orfee1For0). - upgradeable: false — Confirmed.
source_meta.jsonreportsproxy: false. No proxy pattern,delegatecallto mutable address, orSELFDESTRUCTfound in source. - requiresCustomSwapData: false — Confirmed. Neither
_beforeSwapnor_afterSwapreadhookData; swaps execute correctly without it. - vanillaSwap: false — Correct.
dynamicFeeis true andafterSwapReturnsDeltais true; the hook overrides fees and collects an additional hook fee. - swapAccess: "none" — Confirmed.
_beforeSwapperforms 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_afterSwapwith revert on breach (confirmed), optional hook fee on unspecified amount (confirmed viahookFeestate variable), and liquidity allowlist whenpublicLiquidityEnabledis false (confirmed in_beforeAddLiquidity). No promotional, audit, or safety language.
All fields are correct.
Ponx
approved these changes
Nov 25, 2026
Ponx
left a comment
Collaborator
There was a problem hiding this comment.
Bot review verified (github-actions APPROVED). Address bitmask/flags consistent, description within the 500-char limit. LGTM.
Ponx
deleted the
hooks/base/0x2f7754e19b692c5b7bee4220c90f2c43b17108c4
branch
November 25, 2026 14:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Properties
Warnings
None
Closes #12109