Add LivoSwapHook (V2) hook on robinhood#1099
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/robinhood/0xdb1902bc975992828616b0224d9c5ff907e9c0cc.json
Address Flags
Decoded the lowest 14 bits of 0x...c0cc = 0xc0cc = 1100 0000 1100 1100:
| Bit | Flag | Address bit | JSON |
|---|---|---|---|
| 7 | beforeSwap | 1 | true ✓ |
| 6 | afterSwap | 1 | true ✓ |
| 3 | beforeSwapReturnsDelta | 1 | true ✓ |
| 2 | afterSwapReturnsDelta | 1 | true ✓ |
| all others | — | 0 | false ✓ |
Matches getHookPermissions() exactly.
Source Code Verification
Contract: LivoSwapHook (NatSpec @title LivoSwapHook V2). Singleton, ownerless hook for Livo-graduated ETH/token pools.
dynamicFee: false — _beforeSwap returns 0 as the uint24 fee override; no updateDynamicLPFee() call anywhere. ✓
upgradeable: false — FEE_ROUTER and TREASURY are immutable. No proxy pattern, no delegatecall, no SELFDESTRUCT. NatSpec explicitly describes it as ownerless. ✓
requiresCustomSwapData: false — hookData (bytes calldata) is never decoded in either _beforeSwap or _afterSwap. ✓
vanillaSwap: false — Both beforeSwapReturnsDelta and afterSwapReturnsDelta are true, and the hook materially withholds fees from the swap via toBeforeSwapDelta and afterSwap int128 returns. ✓
swapAccess: "governance" — _beforeSwap calls ILivoToken(token).graduated() and reverts with NoSwapsBeforeGraduation() if false. This is a boolean flag set by the protocol admin via the graduation process — correctly classified as "governance". ✓
Metadata
verifiedSource: true— confirmed bysource_meta.json("verified": true). ✓chainId: 4663— matcheschains.jsonfor "robinhood". ✓name: "LivoSwapHook (V2)"— consistent with contract nameLivoSwapHookand NatSpec@title LivoSwapHook V2. No promotional, audit, or endorsement language. ✓description— every claim is substantiated by the Solidity logic: singleton design, ETH-leg fee collection across all four swap directions (exact-input/output × buy/sell), fee routing viaLivoLpFeeRouter.depositLpFees()andILivoToken.accrueFees(), graduation gate (NoSwapsBeforeGraduation), and BeforeSwapDelta/AfterSwapDelta selection logic. ✓
All flags, properties, and metadata are correct.
Summary
Singleton fee hook for Livo-graduated ETH/token pools. Collects LP fees and post-graduation taxes on the ETH leg across all four swap directions, routing them to a treasury fee router and per-token receivers via ILivoToken.accrueFees(). Blocks swaps on non-graduated tokens. Fees are withheld via BeforeSwapDelta or AfterSwapDelta depending on which leg the ETH amount is known.
Flags
Properties
Warnings
Closes #1093