Add MultiPoolsHook hook on ethereum - #7161
Merged
Ponx merged 1 commit intoSep 17, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Review: hooks/ethereum/0xb9260a3a5e73037204fec8d5530311241fd44acc.json
Address Flags
The lowest 14 bits of 0xb9260a3a5e73037204fec8d5530311241fd44acc are 0x0ACC, which decodes as:
| Flag | Bit | Expected | JSON |
|---|---|---|---|
| beforeInitialize | 13 | false | false ✓ |
| afterInitialize | 12 | false | false ✓ |
| beforeAddLiquidity | 11 | true | true ✓ |
| afterAddLiquidity | 10 | false | false ✓ |
| beforeRemoveLiquidity | 9 | true | true ✓ |
| afterRemoveLiquidity | 8 | false | false ✓ |
| beforeSwap | 7 | true | true ✓ |
| afterSwap | 6 | true | true ✓ |
| beforeDonate | 5 | false | false ✓ |
| afterDonate | 4 | false | false ✓ |
| beforeSwapReturnsDelta | 3 | true | true ✓ |
| afterSwapReturnsDelta | 2 | true | true ✓ |
| afterAddLiquidityReturnsDelta | 1 | false | false ✓ |
| afterRemoveLiquidityReturnsDelta | 0 | false | false ✓ |
All 14 flags match. The source code also confirms 0x0ACC in its NatSpec comment.
Properties
- dynamicFee: false ✓ — Fixed
TOTAL_FEE_BPS = 100(1%) withBPS_DENOM = 10_000. No call toupdateDynamicLPFee()and no fee override returned frombeforeSwap. - upgradeable: false ✓ —
poolManagerandvaultare immutable. No proxy pattern or delegatecall to a mutable address.transferOwnershipchanges admin but not contract logic. - requiresCustomSwapData: false ✓ —
hookDatais ignored in all callbacks. Swaps function correctly with empty hookData. - vanillaSwap: false ✓ —
beforeSwapReturnsDeltaandafterSwapReturnsDeltaare both true, and the hook actively intercepts ETH and modifies swap amounts to collect a 1% fee. - swapAccess: "governance" ✓ —
beforeSwapcontainsrequire(registered[pid], "Hook: unregistered pool"), whereregisteredis set by the owner via theregisterPooladmin function. This is a boolean flag gated by the owner.
Metadata
- verifiedSource: true ✓ — Confirmed by
source_meta.json. - chainId: 1 ✓ — Matches
ethereuminchains.json. - name: "MultiPoolsHook" ✓ — Matches
contractNameinsource_meta.jsonand the contract declaration in source. - description ✓ — Every technical claim is substantiated:
- "fixed 1% swap fee" →
TOTAL_FEE_BPS = 100 / BPS_DENOM = 10000 - "0.7% to creator, 0.3% to platform" →
CREATOR_BPS = 70,PLATFORM_BPS = 30 - "collected via BeforeSwapDelta and afterSwap return deltas" →
toBeforeSwapDelta(...)inbeforeSwap,int128(int256(fee))returned inafterSwap - "Liquidity locked permanently after initial seed" →
lpSeededflag, subsequent adds revert - "removes always revert" →
beforeRemoveLiquidityalways reverts with"MultiPools: LP locked forever" - "pools must be registered by the owner" →
registerPoolwithonlyOwnermodifier
- "fixed 1% swap fee" →
No promotional, audit, or safety language present. All checks pass.
Ponx
approved these changes
Sep 16, 2026
Ponx
left a comment
Collaborator
There was a problem hiding this comment.
Bot review verified; bitmask/flags/properties check out. LGTM.
Ponx
deleted the
hooks/ethereum/0xb9260a3a5e73037204fec8d5530311241fd44acc
branch
September 17, 2026 00:13
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
Enforces a fixed 1% swap fee on all swaps, split 0.7% to the pool creator and 0.3% to the platform, collected via BeforeSwapDelta and afterSwap return deltas. Liquidity is locked permanently after an initial seed — subsequent adds revert and removes always revert — and pools must be registered by the owner before swaps are permitted.
Flags
Properties
Warnings
Closes #7152