Add Aegis Engine hook on monad#664
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/monad/0xe449e013004db4a5681e9622ca10c5ba0ea610cc.json
Contract: AegisHook (verified on Monad, chainId 143)
Flags
Address 0xe449e013004db4a5681e9622ca10c5ba0ea610cc — last 14 bits: 0x10cc = 0b00_0100_0011_0011_00 → masked to 14 bits: 0x10cc.
| Bit | Flag | Address | File | Match |
|---|---|---|---|---|
| 13 | beforeInitialize | 0 | false | ✓ |
| 12 | afterInitialize | 1 | true | ✓ |
| 11 | beforeAddLiquidity | 0 | false | ✓ |
| 10 | afterAddLiquidity | 0 | false | ✓ |
| 9 | beforeRemoveLiquidity | 0 | false | ✓ |
| 8 | afterRemoveLiquidity | 0 | false | ✓ |
| 7 | beforeSwap | 1 | true | ✓ |
| 6 | afterSwap | 1 | true | ✓ |
| 5 | beforeDonate | 0 | false | ✓ |
| 4 | afterDonate | 0 | false | ✓ |
| 3 | beforeSwapReturnsDelta | 1 | true | ✓ |
| 2 | afterSwapReturnsDelta | 1 | true | ✓ |
| 1 | afterAddLiquidityReturnsDelta | 0 | false | ✓ |
| 0 | afterRemoveLiquidityReturnsDelta | 0 | false | ✓ |
Also confirmed against getHookPermissions() in source (lines 112–129).
Properties
-
dynamicFee: true ✓ —
_beforeSwapreturnsactiveFee | LPFeeLibrary.OVERRIDE_FEE_FLAGwithactiveFeesourced fromDYNAMIC_FEE_MANAGER.prepareSwap()._afterInitializeenforcesLPFeeLibrary.isDynamicFee(key.fee). -
upgradeable: false ✓ — All external dependencies (
ORACLE_MANAGER,DYNAMIC_FEE_MANAGER,AEGIS_ENGINE,LIMIT_ORDER_MANAGER) areimmutable. No proxy pattern,delegatecall, orSELFDESTRUCT.source_meta.jsonconfirms"proxy": false. -
requiresCustomSwapData: false ✓ — The
bytes calldatahookData parameter is unnamed and unused in both_beforeSwapand_afterSwap. Swaps execute without any hookData. -
vanillaSwap: false ✓ — Dynamic fees are overridden each swap; hook charges fees via
BeforeSwapDelta(exactIn) andAfterSwapDelta(exactOut), directly modifying swap economics. -
swapAccess: "none" ✓ — No caller-based gating in
_beforeSwap. Thesender == address(AEGIS_ENGINE)check (line 219) only caps the fee for engine-initiated swaps — it does not block any swap. ThePausableinherited contract only gates_tryReinvest(checked inside_tryReinvestat line 410), not_beforeSwapitself.
Metadata
- chainId: 143 ✓ — Matches
chains.jsonentry formonad. - verifiedSource: true ✓ — Confirmed by
source_meta.json. - name: "Aegis Engine" — The on-chain contract name is
AegisHook(NatSpec@title AegisHook). "Aegis Engine" refers to theIAegisEnginedependency (the fee-reinvestment component), not the hook itself. However, it reads as a project-qualified label for the Aegis system and contains no prohibited language (no "audited", "safe", "official", etc.). Acceptable under the project-qualified label allowance. - description ✓ — Accurately describes dynamic LP fee overriding, configurable hook fees via BeforeSwapDelta/AfterSwapDelta, and fee reinvestment via AegisEngine. All claims are substantiated by the Solidity logic. No marketing or audit claims.
- auditUrl ✓ — Valid schema field, follows
https://pattern.
Outcome: APPROVE — All flags match the address bitmask, all properties are correctly derived from the source logic, and metadata is accurate.
Summary
AegisHook is a Uniswap v4 hook that applies dynamic LP fees computed by an external DynamicFeeManager (overriding the pool fee each swap), charges a configurable hook fee on each swap via BeforeSwapDelta/AfterSwapDelta, and periodically reinvests accumulated hook fees into a full-range LP position through an AegisEngine contract.
Flags
Properties
Warnings
Closes #662