Skip to content

Add RehypHook hook on base#572

Merged
marktoda merged 1 commit into
mainfrom
hooks/base/0xe87be9bc8e462de016760aa83bac56d608836aa8
May 22, 2026
Merged

Add RehypHook hook on base#572
marktoda merged 1 commit into
mainfrom
hooks/base/0xe87be9bc8e462de016760aa83bac56d608836aa8

Conversation

@hooklist-generator
Copy link
Copy Markdown

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

Flag Value
beforeInitialize true
afterInitialize false
beforeAddLiquidity true
afterAddLiquidity false
beforeRemoveLiquidity true
afterRemoveLiquidity false
beforeSwap true
afterSwap false
beforeDonate true
afterDonate false
beforeSwapReturnsDelta true
afterSwapReturnsDelta false
afterAddLiquidityReturnsDelta false
afterRemoveLiquidityReturnsDelta false

Properties

Property Value
dynamicFee false
upgradeable false
requiresCustomSwapData false
vanillaSwap false
swapAccess allowlist

Warnings

  • Submitter-proposed description rejected: exceeds 500-character limit (~669 chars). Using AI-generated description.

Closes #571

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment May 22, 2026 2:50am

Request Review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ✓ — beforeSwap returns a fee override of 0 (static); key.fee != 0 causes revert, so pools are created with fee = 0. No updateDynamicLPFee() call anywhere.

  • upgradeable: false ✓ — No proxy pattern, no delegatecall, no mutable implementation pointer, no SELFDESTRUCT. All state is in the contract itself.

  • requiresCustomSwapData: false ✓ — The hookData parameter in beforeSwap is completely ignored (bytes calldata with no usage). Swaps function normally with empty hookData.

  • vanillaSwap: false ✓ — Correct: beforeSwapReturnsDelta is 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 via BeforeSwapDelta, bypassing standard AMM math entirely.

  • swapAccess: "allowlist" ✓ — _checkLaunchGuard() checks launchGuardAllowed[tx.origin] against an explicitly managed allowlist mapping. The guard can be permanently disabled by the launchGuardManager, but when active it is an allowlist gating mechanism.

Metadata Verification

  • verifiedSource: true ✓ — Confirmed by source_meta.json: "verified": true.
  • chainId: 8453 ✓ — Matches chains.json entry for base.
  • name: "RehypHook" ✓ — Matches contractName in source_meta.json and the Solidity contract declaration contract RehypHook.
  • description ✓ — All claims are substantiated by the source: bonding-curve AMM with virtual + real reserves; beforeAddLiquidity/beforeRemoveLiquidity revert with NoLP() (no external LP); beforeDonate reverts with NoDonate(); swaps exchange assets for REHYP using reserve-based pricing; _depositExcessRaw deposits excess into Aave V3 (aave.supply()); harvestYield collects Aave yield, increases xReserve, and burns REHYP supply via _burnRehypClaimsOutsideSwap. No audit, safety, or marketing language present.

All flags, properties, and metadata are correct.

Copy link
Copy Markdown
Contributor

@marktoda marktoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot review verified. RehypHook on base (0xe87b...6aa8). Bitmask 0x2aa8 → beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, beforeDonate, beforeSwapReturnsDelta. swapAccess=allowlist. LGTM.

@marktoda marktoda merged commit a55c9c1 into main May 22, 2026
7 checks passed
@marktoda marktoda deleted the hooks/base/0xe87be9bc8e462de016760aa83bac56d608836aa8 branch May 22, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hook:RehypHook

1 participant