Add Aegis hook on ethereum#576
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/ethereum/0x8f29bd5c8429730fa4c46e6295c4e679ededd0cc.json
Contract: AegisHook (source verified on Etherscan, source_meta.json: proxy=false, verified=true)
Flags — Address Bitmask
Address suffix 0xd0cc → lowest 14 bits = 0x10CC (4300):
| Bit | Flag | Expected | File |
|---|---|---|---|
| 13 | beforeInitialize | false | false ✓ |
| 12 | afterInitialize | true | true ✓ |
| 11–8 | add/removeLiquidity | false | false ✓ |
| 7 | beforeSwap | true | true ✓ |
| 6 | afterSwap | true | true ✓ |
| 5–4 | donate | false | false ✓ |
| 3 | beforeSwapReturnsDelta | true | true ✓ |
| 2 | afterSwapReturnsDelta | true | true ✓ |
| 1–0 | addLiq/removeLiqReturnsDelta | false | false ✓ |
getHookPermissions() in source confirms all 14 bits identically.
Properties
-
dynamicFee = true ✓
_beforeSwapcallsDYNAMIC_FEE_MANAGER.prepareSwap()and returnsactiveFee | LPFeeLibrary.OVERRIDE_FEE_FLAG— explicit LP fee override on every swap. -
upgradeable = false ✓
No proxy pattern, nodelegatecall, no mutable implementation pointer, noSELFDESTRUCT.source_meta.jsonconfirmsproxy: false.Ownable/Pausabledo not introduce upgradeability. -
requiresCustomSwapData = false ✓
ThehookDataparameter in_beforeSwapis completely ignored (bytes calldatawith no usage). Swaps execute normally with emptyhookData. -
vanillaSwap = false ✓
dynamicFee=true,beforeSwapReturnsDelta=true,afterSwapReturnsDelta=true— all independently mandatefalse. The hook also charges a configurable hook fee deducted from the swap input via delta returns, materially changing swap economics. -
swapAccess = "none" ✓
_beforeSwaphas no access control guard. ThePausablepattern is present in the contract but_beforeSwaphas nowhenNotPausedmodifier andBaseHook.beforeSwapalso applies no pausing —paused()is only checked inside_tryReinvest(fee reinvestment path).
Metadata
- chainId = 1 ✓ — matches
chains.jsonethereum entry. - verifiedSource = true ✓ — confirmed by
source_meta.json. - name = "Aegis" ✓ — recognizable abbreviation of the on-chain contract name
AegisHook; no promotional or endorsement language. - description ✓ — accurately captures all four behaviors substantiated by the source: (1) dynamic fees from
IDynamicFeeManager, (2) TWAP oracle updates viaIOracleManager.afterSwap, (3) per-swap hook fee charged asBeforeSwapDelta/AfterSwapDelta, and (4) periodic full-range fee reinvestment viaIAegisEngineon the 1-hourREINVEST_COOLDOWN. No marketing, audit, or affiliation language.
All fields are correct and consistent with the verified on-chain source.
marktoda
left a comment
There was a problem hiding this comment.
Bot review verified. Aegis on ethereum (0x8f29...d0cc). Bitmask 0x10cc → afterInitialize, beforeSwap, afterSwap, beforeSwapReturnsDelta, afterSwapReturnsDelta. dynamicFee=true. LGTM.
Summary
AegisHook applies dynamic swap fees sourced from an external DynamicFeeManager, updates a TWAP oracle on each swap, charges a configurable hook fee on every trade (taken as a BeforeSwapDelta/AfterSwapDelta), and periodically reinvests accumulated fees as full-range liquidity via an AegisEngine on a 1-hour cooldown.
Flags
Properties
Warnings
Closes #573