Add AggHook hook on ethereum#676
Open
hooklist-generator[bot] wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Review: hooks/ethereum/0x190fde31adce92c21651c33b39dd064949dc6888.json
Address Flags
Address suffix 0x6888 = 0110 1000 1000 1000 binary. Lower 14 bits: 10 1000 1000 1000.
| Bit | Flag | Address | File | Match |
|---|---|---|---|---|
| 13 | beforeInitialize | 1 | true | ✅ |
| 12 | afterInitialize | 0 | false | ✅ |
| 11 | beforeAddLiquidity | 1 | true | ✅ |
| 10 | afterAddLiquidity | 0 | false | ✅ |
| 9 | beforeRemoveLiquidity | 0 | false | ✅ |
| 8 | afterRemoveLiquidity | 0 | false | ✅ |
| 7 | beforeSwap | 1 | true | ✅ |
| 6 | afterSwap | 0 | false | ✅ |
| 5 | beforeDonate | 0 | false | ✅ |
| 4 | afterDonate | 0 | false | ✅ |
| 3 | beforeSwapReturnsDelta | 1 | true | ✅ |
| 2 | afterSwapReturnsDelta | 0 | false | ✅ |
| 1 | afterAddLiquidityReturnsDelta | 0 | false | ✅ |
| 0 | afterRemoveLiquidityReturnsDelta | 0 | false | ✅ |
Properties
- dynamicFee=false ✅ —
beforeSwapreturns a hardcoded zero fee override (mstore(0x40, 0)). The_fee()helper callsV4_DONATE_SELECTOR(donation-based protocol fee), notupdateDynamicLPFee(). - upgradeable=false ✅ — No proxy pattern, delegatecall, mutable implementation storage, or SELFDESTRUCT.
- requiresCustomSwapData=false ✅ — The
bytes calldatahookData parameter inbeforeSwapis unnamed and never accessed; routing is determined solely fromSwapParams. - vanillaSwap=false ✅ — Correct:
beforeSwapReturnsDelta=truedisqualifies it, and the hook executes nested V3/V4 swaps and donates fees insidebeforeSwap. - swapAccess="none" ✅ —
beforeSwaponly verifies_onlyPoolManager()(structural enforcement that caller == pool manager). No user-level allowlist, temporal gate, or governance flag.
Metadata
- verifiedSource=true ✅ — Confirmed by
source_meta.json("verified": true). - chainId=1 ✅ —
ethereummaps to chainId 1 inchains.json. - name="AggHook" ✅ — Matches
contractNamefrom Etherscan metadata. - description ✅ — Accurately describes: swap interception via
beforeSwapReturnsDelta, multi-pool routing across V3 (Uniswap + PancakeSwap, confirmed byuniswapV3SwapCallback/pancakeV3SwapCallback) and V4 pools, donate-based protocol fee via_fee(), bytecode-baked pool addresses (confirmed byDATAconstant inConfig.sol), andtx.origin-based admin gate onbeforeAddLiquidity/beforeInitialize(confirmed by_onlyAdmin()usingorigin()).
All fields verified against on-chain source. No issues found.
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
AggHook intercepts swaps via beforeSwapReturnsDelta to route liquidity across multiple registered V3 and V4 pools (including Uniswap V3 and PancakeSwap V3 via swap callbacks), performing multi-hop execution and charging a protocol fee via the pool manager's donate function. Routing data and pool addresses are baked into the contract bytecode; add-liquidity and initialization are restricted to an admin address (tx.origin check).
Flags
Properties
Warnings
Closes #675