Add RehypHook hook on base#572
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/base/0xe87be9bc8e462de016760aa83bac56d608836aa8.json
Flags Verification
Address 0xe87be9bc8e462de016760aa83bac56d608836aa8 — lowest 14 bits of 0x6aa8 = 0110 1010 1010 1000:
| Bit | Flag | Expected | JSON |
|---|---|---|---|
| 13 | beforeInitialize | true | true ✓ |
| 12 | afterInitialize | false | false ✓ |
| 11 | beforeAddLiquidity | true | true ✓ |
| 10 | afterAddLiquidity | false | false ✓ |
| 9 | beforeRemoveLiquidity | true | true ✓ |
| 8 | afterRemoveLiquidity | false | false ✓ |
| 7 | beforeSwap | true | true ✓ |
| 6 | afterSwap | false | false ✓ |
| 5 | beforeDonate | true | true ✓ |
| 4 | afterDonate | false | false ✓ |
| 3 | beforeSwapReturnsDelta | true | true ✓ |
| 2 | afterSwapReturnsDelta | false | false ✓ |
| 1 | afterAddLiquidityReturnsDelta | false | false ✓ |
| 0 | afterRemoveLiquidityReturnsDelta | false | false ✓ |
Confirmed also by HOOK_FLAGS = 1<<13 | 1<<11 | 1<<9 | 1<<7 | 1<<5 | 1<<3 and getHookPermissions() in the source.
Properties Verification
-
dynamicFee: false ✓ —
beforeSwapreturns a fee override of0(static);key.fee != 0causes revert, so pools are created with fee = 0. NoupdateDynamicLPFee()call anywhere. -
upgradeable: false ✓ — No proxy pattern, no
delegatecall, no mutable implementation pointer, noSELFDESTRUCT. All state is in the contract itself. -
requiresCustomSwapData: false ✓ — The
hookDataparameter inbeforeSwapis completely ignored (bytes calldatawith no usage). Swaps function normally with empty hookData. -
vanillaSwap: false ✓ — Correct:
beforeSwapReturnsDeltais true and the hook fully overrides swap execution using a custom bonding curve (reserve-based pricing). The hook takes assets from the pool manager and releases REHYP (or vice versa) entirely viaBeforeSwapDelta, bypassing standard AMM math entirely. -
swapAccess: "allowlist" ✓ —
_checkLaunchGuard()checkslaunchGuardAllowed[tx.origin]against an explicitly managed allowlist mapping. The guard can be permanently disabled by thelaunchGuardManager, but when active it is an allowlist gating mechanism.
Metadata Verification
- verifiedSource: true ✓ — Confirmed by
source_meta.json:"verified": true. - chainId: 8453 ✓ — Matches
chains.jsonentry forbase. - name: "RehypHook" ✓ — Matches
contractNameinsource_meta.jsonand the Solidity contract declarationcontract RehypHook. - description ✓ — All claims are substantiated by the source: bonding-curve AMM with virtual + real reserves;
beforeAddLiquidity/beforeRemoveLiquidityrevert withNoLP()(no external LP);beforeDonatereverts withNoDonate(); swaps exchange assets for REHYP using reserve-based pricing;_depositExcessRawdeposits excess into Aave V3 (aave.supply());harvestYieldcollects Aave yield, increasesxReserve, and burns REHYP supply via_burnRehypClaimsOutsideSwap. No audit, safety, or marketing language present.
All flags, properties, and metadata are correct.
marktoda
left a comment
There was a problem hiding this comment.
Bot review verified. RehypHook on base (0xe87b...6aa8). Bitmask 0x2aa8 → beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, beforeDonate, beforeSwapReturnsDelta. swapAccess=allowlist. LGTM.
Summary
A custom bonding-curve AMM hook that owns all pool liquidity internally, blocking external LP deposits and donations. Swaps exchange WETH/USDC/GHO for REHYP tokens using reserve-based pricing; excess assets are deposited into Aave V3 to earn yield, which can be harvested to increase reserves and burn REHYP supply.
Flags
Properties
Warnings
Closes #571