Add StrategyHook hook on robinhood#1115
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/robinhood/0xc8fe3570f110d092e86393c095c6998a8d5a6544.json
Address Flags
Address 0xc8fe3570f110d092e86393c095c6998a8d5a6544 — lowest 14 bits: 0x6544 & 0x3FFF = 0x2544 = 10 0101 0100 0100 binary.
All 14 flag bits match the JSON and match getHookPermissions() in the source:
beforeInitialize= true (bit 13 = 1) ✓afterAddLiquidity= true (bit 10 = 1) ✓afterRemoveLiquidity= true (bit 8 = 1) ✓afterSwap= true (bit 6 = 1) ✓afterSwapReturnsDelta= true (bit 2 = 1) ✓- All other flags = false ✓
Chain & Metadata
chainId: 4663matcheschains.jsonentry forrobinhood✓name: "StrategyHook"matchessource_meta.json(contractName: "StrategyHook") and the contract declarationcontract StrategyHook✓verifiedSource: trueconfirmed bysource_meta.json("verified": true) ✓- No promotional, audit, or endorsement language in name or description ✓
Properties
-
dynamicFee: false— Correct. The hook has nobeforeSwapflag and never callspoolManager.updateDynamicLPFee(). Fees collected inafterSwapare an additional hook fee viaafterSwapReturnsDelta, not a dynamic LP fee override. -
upgradeable: false— Correct.source_meta.jsonshowsproxy: false. Contract is a standardBaseHook + Ownablewith no proxy,delegatecall, mutable implementation pointer, orSELFDESTRUCT. -
requiresCustomSwapData: false— Correct._afterSwapignores thebytes calldata(hookData) parameter entirely; swaps proceed without it. -
vanillaSwap: false— Correct.afterSwapReturnsDeltais true, so this must be false per spec. Confirmed:_afterSwapreturns a non-zeroint128fee delta that modifies the effective swap output. -
swapAccess: "none"— Correct. There is nobeforeSwaphook._afterSwapcontains no access-control gate (no allowlist, temporal, or governance check).feeExemptSwappersonly waives the fee; it does not block or gate swap execution.
Description Accuracy
"A multi-strategy hook that collects a time-decaying swap fee via afterSwapReturnsDelta, splitting proceeds between an ops wallet and fee collector. Pools are owner-initialized and mapped to configurable strategies; exact-output swaps revert."
All claims substantiated:
- Multi-strategy:
mapping(uint256 => StrategyConfig) public strategieswith multiple IDs ✓ - Time-decaying fee via
afterSwapReturnsDelta:_feeBps()decays fromstartingFeeBpstowardrestingFeeBpsbased onblock.timestamp - launchTimestamp, collected viaint128return in_afterSwap✓ - Split between ops wallet and fee collector: explicit
opsAmount/collectorAmountsplit logic ✓ - Owner-initialized pools:
_beforeInitializeenforcesif (sender != owner()) revert NotOwner()✓ - Exact-output reverts:
if (params.amountSpecified > 0) revert ExactOutputNotAllowed()✓
All checks pass.
marktoda
left a comment
There was a problem hiding this comment.
Bot review verified. StrategyHook (robinhood). Flags: beforeInitialize, afterAdd/RemoveLiquidity, afterSwap, afterSwapReturnsDelta. LGTM.
Summary
A multi-strategy hook that collects a time-decaying swap fee via afterSwapReturnsDelta, splitting proceeds between an ops wallet and fee collector. Pools are owner-initialized and mapped to configurable strategies; exact-output swaps revert.
Flags
Properties
Warnings
Closes #1108