Add BackedFeeHook hook on robinhood#1117
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/robinhood/0xced7aa50727f3cd251985b09a2080db056a8c0cc.json
Address Flags
Address suffix 0xc0cc, lowest 14 bits: 0x00cc = 11001100 binary.
| Bit | Flag | Decoded | JSON |
|---|---|---|---|
| 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 ✓ |
All 14 flag bits match the address bitmask.
Source Code Verification
Contract: BackedFeeHook — verified on Robinhood chain (chainId 4663). Matches source_meta.json.
dynamicFee: false — Fixed FEE_BPS = 300 (3%). No lpFeeOverride returned from beforeSwap, no call to poolManager.updateDynamicLPFee(). ✓
upgradeable: false — vault is immutable, no proxy pattern, no delegatecall, no SELFDESTRUCT. ✓
requiresCustomSwapData: false — hookData parameter is accepted but entirely unused in both _beforeSwap and _afterSwap. Swaps work correctly with empty hookData. ✓
vanillaSwap: false — Both beforeSwapReturnsDelta and afterSwapReturnsDelta are true and the hook actively takes fees (calls poolManager.take), modifying swap behavior. Correctly set to false. ✓
swapAccess: "none" — No access control on swappers. The hooks execute unconditionally for any caller on ETH pools; non-ETH pools pass through untaxed as a guard. ✓
Metadata
name: "BackedFeeHook"— matchescontractNamefrom verified source. No promotional language. ✓chainId: 4663— matchesrobinhoodinchains.json. ✓verifiedSource: true— confirmed bysource_meta.json. ✓description— accurately describes the fixed 3% ETH fee, vault routing, beforeSwap/afterSwap split logic, and non-ETH pool passthrough. All claims substantiated by source code. ✓
All fields are correct.
Summary
A fee-taking hook that charges a fixed 3% swap tax in native ETH (currency0) on all swaps, routing the full fee to a vault address. Fee collection is split between beforeSwap (ETH-specified swaps) and afterSwap (ETH-unspecified swaps) using return deltas; non-ETH pools pass through untaxed.
Flags
Properties
Warnings
Closes #1109