Add StonkHookV3 hook on robinhood - #4495
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/robinhood/0x9265a95731ce3324d3560573f642ed7006789acc.json
Address Flags
Decoded from address 0x9265a95731ce3324d3560573f642ed7006789acc (last 14 bits: 0x9ACC & 0x3FFF = 0x1ACC):
| Bit | Flag | Address | Hook File | Source (getHookPermissions) |
|---|---|---|---|---|
| 13 | beforeInitialize | 0 | false | false ✓ |
| 12 | afterInitialize | 1 | true | true ✓ |
| 11 | beforeAddLiquidity | 1 | true | true ✓ |
| 10 | afterAddLiquidity | 0 | false | false ✓ |
| 9 | beforeRemoveLiquidity | 1 | true | true ✓ |
| 8 | afterRemoveLiquidity | 0 | false | false ✓ |
| 7 | beforeSwap | 1 | true | true ✓ |
| 6 | afterSwap | 1 | true | true ✓ |
| 5 | beforeDonate | 0 | false | false ✓ |
| 4 | afterDonate | 0 | false | false ✓ |
| 3 | beforeSwapReturnsDelta | 1 | true | true ✓ |
| 2 | afterSwapReturnsDelta | 1 | true | true ✓ |
| 1 | afterAddLiquidityReturnsDelta | 0 | false | false ✓ |
| 0 | afterRemoveLiquidityReturnsDelta | 0 | false | false ✓ |
All 14 flags match.
Properties
-
dynamicFee: true — Correct.
beforeSwapreturnsLPFeeLibrary.OVERRIDE_FEE_FLAGand computes a time-varying fee via_feeNow(), which decays fromlaunchFeetofeeover the launch window using exponential halvings. LP fee is effectively always overridden. -
upgradeable: false — Correct. Contract explicitly states "not upgradeable, no delegatecall, no owner." Constructor sets only immutable variables. No proxy patterns, no
SELFDESTRUCT, no mutable implementation references.factoryandfeeLockerareimmutable. -
requiresCustomSwapData: false — Correct. In
beforeSwap,hookDatais only used ifhookData.length == 32to decode an optional referrer address and emitSwapReferred. This has no effect on swap execution — swaps function identically with empty hookData. -
vanillaSwap: false — Correct.
beforeSwapReturnsDeltaandafterSwapReturnsDeltaare both true, and the hook materially modifies swap execution by withholding asset-leg fees, applying exponential anti-snipe surcharges, and routing fee shares into permanent pool liquidity. -
swapAccess: "temporal" — Correct.
beforeSwapcallsIStonkTokenV3(cfg.token).isTradingOpen()which reads a pluggable market-hours oracle (NYSE schedule). Per the interface, the oracle exposesnextWindowOpen,windowClose, andlaunchTime— all timestamp-based fields. Swaps are fully closed outside market hours and open during them, fitting the"temporal"classification.
Metadata
- chainId: 4663 — Matches
robinhoodentry inchains.json✓ - name: "StonkHookV3" — Matches
contractNameinsource_meta.json✓ - verifiedSource: true — Confirmed by
source_meta.json("verified": true) ✓ - description — Accurate. The description correctly identifies: (1) market-hours oracle gating (NYSE schedule) via
isTradingOpen(); (2) asset-leg fee withholding on every swap, split between permanent pool liquidity (pendingLiquidity) and beneficiaries (pendingFees); (3) exponentially decaying anti-snipe surcharge (_feeNow/StonkLaunchFee); (4)beforeRemoveLiquidityunconditionally reverting any negativeliquidityDelta. No audit claims, safety guarantees, or promotional language present. ✓ - auditUrl: "" — No issues.
Conclusion
All flags, properties, and metadata are consistent with the verified on-chain source code. Approving.
Summary
A Uniswap v4 hook that gates swaps on a pluggable market-hours oracle (NYSE schedule), withholds an asset-leg fee on every swap split between permanent pool liquidity and project beneficiaries, and applies an exponentially decaying anti-snipe surcharge. Liquidity can only increase:
beforeRemoveLiquidityunconditionally reverts any negative delta from any caller.Flags
Properties
Warnings
Closes #4494