Add AggHook hook on ethereum#673
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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 ✅ —
beforeSwapreturns a zero fee override (mstore(0x40, 0)in the return assembly). The_fee()function performs a donate-based fee collection but does not callupdateDynamicLPFee()and does not set a dynamic LP fee override. -
upgradeable: false ✅ —
source_meta.jsonconfirms"proxy": false. No proxy pattern,delegatecall, or mutable implementation address found in source. -
requiresCustomSwapData: false ✅ — The
beforeSwapfunction acceptsbytes calldatahookData 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 = trueand actively intercepts and reroutes the entire swap through external pools, returning aBeforeSwapDeltathat fully settles the exchange. This is mandatory false. -
swapAccess: "none" ✅ —
beforeSwaponly enforces_onlyPoolManager()(verifyingmsg.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
ethereuminchains.json. - name: "AggHook" ✅ — Matches
contractNamefrom 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 = 6inConfig.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
BeforeSwapDeltain Router. - "Liquidity additions and pool initialization restricted to a hardcoded admin address" →
beforeAddLiquidityandbeforeInitializeboth call_onlyAdmin(). - No marketing, audit, or promotional language.
- "3 Uniswap v4 pools and 6 V3-compatible pools" →
All flags, properties, and metadata are accurate and consistent with the on-chain source code.
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
Properties
Warnings
Closes #672