Skip to content

Add MultiPoolsHook hook on ethereum - #7161

Merged
Ponx merged 1 commit into
mainfrom
hooks/ethereum/0xb9260a3a5e73037204fec8d5530311241fd44acc
Sep 17, 2026
Merged

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

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

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

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

Properties

Property Value
dynamicFee false
upgradeable false
requiresCustomSwapData false
vanillaSwap false
swapAccess governance

Warnings

  • Submitter did not provide a name. Using AI-derived "MultiPoolsHook".
  • Submitter did not provide a description. Using AI-generated description.

Closes #7152

@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/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%) with BPS_DENOM = 10_000. No call to updateDynamicLPFee() and no fee override returned from beforeSwap.
  • upgradeable: false ✓ — poolManager and vault are immutable. No proxy pattern or delegatecall to a mutable address. transferOwnership changes admin but not contract logic.
  • requiresCustomSwapData: false ✓ — hookData is ignored in all callbacks. Swaps function correctly with empty hookData.
  • vanillaSwap: false ✓ — beforeSwapReturnsDelta and afterSwapReturnsDelta are both true, and the hook actively intercepts ETH and modifies swap amounts to collect a 1% fee.
  • swapAccess: "governance" ✓ — beforeSwap contains require(registered[pid], "Hook: unregistered pool"), where registered is set by the owner via the registerPool admin function. This is a boolean flag gated by the owner.

Metadata

  • verifiedSource: true ✓ — Confirmed by source_meta.json.
  • chainId: 1 ✓ — Matches ethereum in chains.json.
  • name: "MultiPoolsHook" ✓ — Matches contractName in source_meta.json and 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(...) in beforeSwap, int128(int256(fee)) returned in afterSwap
    • "Liquidity locked permanently after initial seed" → lpSeeded flag, subsequent adds revert
    • "removes always revert" → beforeRemoveLiquidity always reverts with "MultiPools: LP locked forever"
    • "pools must be registered by the owner" → registerPool with onlyOwner modifier

No promotional, audit, or safety language present. All checks pass.

@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; bitmask/flags/properties check out. LGTM.

@Ponx
Ponx merged commit 1033e0f into main Sep 17, 2026
5 checks passed
@Ponx
Ponx deleted the hooks/ethereum/0xb9260a3a5e73037204fec8d5530311241fd44acc branch September 17, 2026 00:13
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: 0xb9260a3a5e73037204fec8d5530311241fd44acc on ethereum

1 participant