Skip to content

Add AggHook hook on ethereum#673

Open
hooklist-generator[bot] wants to merge 1 commit into
mainfrom
hooks/ethereum/0xd847b6153c321abfbf7969422fceb129343d2888
Open

Add AggHook hook on ethereum#673
hooklist-generator[bot] wants to merge 1 commit into
mainfrom
hooks/ethereum/0xd847b6153c321abfbf7969422fceb129343d2888

Conversation

@hooklist-generator

Copy link
Copy Markdown

Summary

Routes swaps through a hardcoded set of 3 Uniswap v4 pools and 6 V3-compatible pools, sorted on-the-fly by effective sqrtPrice. Handles exactIn and exactOut in both directions, returns a BeforeSwapDelta that fully settles the exchange. Liquidity additions and pool initialization are restricted to a hardcoded admin address.

Flags

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

Properties

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

Warnings

  • Submitter-proposed description rejected: exceeds 500-character limit and references unverifiable DEX brand names (PancakeSwap, Aerodrome, SushiSwap) not independently identifiable from source, plus contains marketing language. Using AI-generated description.

Closes #672

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment Jun 19, 2026 8:43pm

Request Review

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

Address Flags

Address 0xd847b6153c321abfbf7969422fceb129343d2888 → lowest 14 bits = 0x2888 = bits 13, 11, 7, 3 set.

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

Properties

  • dynamicFee: false ✅ — beforeSwap returns a zero fee override (mstore(0x40, 0) in the return assembly). The _fee() function performs a donate-based fee collection but does not call updateDynamicLPFee() and does not set a dynamic LP fee override.

  • upgradeable: false ✅ — source_meta.json confirms "proxy": false. No proxy pattern, delegatecall, or mutable implementation address found in source.

  • requiresCustomSwapData: false ✅ — The beforeSwap function accepts bytes calldata hookData but completely ignores it. All routing logic is driven by hardcoded pool data and on-chain sqrtPrice reads. Swaps work without any custom hookData.

  • vanillaSwap: false ✅ — Correct. The hook has beforeSwapReturnsDelta = true and actively intercepts and reroutes the entire swap through external pools, returning a BeforeSwapDelta that fully settles the exchange. This is mandatory false.

  • swapAccess: "none" ✅ — beforeSwap only enforces _onlyPoolManager() (verifying msg.sender == PoolManager), which is a protocol invariant rather than user-facing access control. No allowlist, governance flag, or temporal gate on swaps.

Metadata

  • chainId: 1 ✅ — Matches ethereum in chains.json.
  • name: "AggHook" ✅ — Matches contractName from source metadata.
  • verifiedSource: true ✅ — Confirmed by source_meta.json.
  • description ✅ — All claims substantiated by source:
    • "3 Uniswap v4 pools and 6 V3-compatible pools" → V4_POOLS_LEN = 3, V3_POOLS_LEN = 6 in Config.sol.
    • "sorted on-the-fly by effective sqrtPrice" → _rfq041()/_rfq140() in Quoter.
    • "exactIn and exactOut in both directions" → four routing functions (_exactInput041, _exactInput140, _exactOutput041, _exactOutput140).
    • "returns a BeforeSwapDelta that fully settles the exchange" → explicit assembly return with BeforeSwapDelta in Router.
    • "Liquidity additions and pool initialization restricted to a hardcoded admin address" → beforeAddLiquidity and beforeInitialize both call _onlyAdmin().
    • No marketing, audit, or promotional language.

All flags, properties, and metadata are accurate and consistent with the on-chain source code.

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: ETH/USDC Aggregator Hook

0 participants