Skip to content

Add HHook hook on ethereum - #7124

Merged
Ponx merged 1 commit into
mainfrom
hooks/ethereum/0x211d79ee98c5658989763bc367ded650a3a7d0cc
Sep 17, 2026
Merged

Ponx merged 1 commit into
mainfrom
hooks/ethereum/0x211d79ee98c5658989763bc367ded650a3a7d0cc

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

Summary

A Uniswap v4 hook implementing a reserve-backed floor price for the H token. On exact-input sells below RFV, beforeSwap intercepts the swap, burns the H, and pays ETH from the treasury at RFV. A 5% swap tax is applied via afterSwap (burning H on buys, routing ETH to treasury on sells). Also mints epoch-based staking rewards on each swap.

Flags

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

Properties

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

Warnings

  • Submitter did not provide a name. Using AI-derived "HHook".
  • Submitter did not provide a description. Using AI-generated description.

Closes #7108

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

Deployment failed for project hooklist with the following error:

Resource is limited - try again in 60 minutes (more than 450, code: "api-deployments-paid-per-hour").

Learn More: https://vercel.com/uniswap?upgradeToPro=build-rate-limit

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: hooks/ethereum/0x211d79ee98c5658989763bc367ded650a3a7d0cc.json

Address Flag Verification

Address ends in 0xd0cc. Lowest 14 bits: 0xd0cc & 0x3FFF = 0x10cc = 0001 0000 1100 1100.

Bit Flag Expected Filed
13 beforeInitialize false false ✓
12 afterInitialize true true ✓
11 beforeAddLiquidity false false ✓
10 afterAddLiquidity false false ✓
9 beforeRemoveLiquidity false false ✓
8 afterRemoveLiquidity false false ✓
7 beforeSwap true true ✓
6 afterSwap true true ✓
5 beforeDonate false false ✓
4 afterDonate false false ✓
3 beforeSwapReturnsDelta true true ✓
2 afterSwapReturnsDelta true true ✓
1 afterAddLiquidityReturnsDelta false false ✓
0 afterRemoveLiquidityReturnsDelta false false ✓

All 14 flag bits match. The source also confirms in a comment: HOOK FLAG MASK (lower 14 bits = 0x10CC).

Properties Verification

  • dynamicFee: false ✓ — beforeSwap always returns fee=0; no call to poolManager.updateDynamicLPFee() anywhere in the source.
  • upgradeable: false ✓ — All key contract references (poolManager, token, treasury, staking) are immutable. No proxy pattern, no delegatecall to mutable addresses, no SELFDESTRUCT. source_meta.json confirms proxy: false.
  • requiresCustomSwapData: false ✓ — Both beforeSwap and afterSwap accept bytes calldata but never read from it. Swaps function correctly with empty hookData.
  • vanillaSwap: false ✓ — Correct; beforeSwapReturnsDelta and afterSwapReturnsDelta are both true, and the hook actively modifies swap execution (floor price intercept and 5% tax delta).
  • swapAccess: "none" ✓ — beforeSwap contains no allowlist, governance flag, or time-based gate. The sender == address(this) guard is an internal routing check (skipping the hook's own potential swaps), not user-facing access control.

Metadata Verification

  • verifiedSource: true ✓ — Confirmed by source_meta.json (verified: true).
  • chainId: 1 ✓ — Matches chains.json entry for ethereum.
  • name: "HHook" ✓ — Matches contractName in source_meta.json and contract HHook is IHooks in source.
  • description ✓ — All technical claims are substantiated by the Solidity logic:
    • Reserve-backed floor price: _rfvE18() computes treasury ETH / H supply; beforeSwap intercepts exact-input sells when spotE18 < rfvE18.
    • Burns H and pays ETH at RFV: token.burn(hIn) and treasury.payoutToHook(ethOut).
    • 5% swap tax via afterSwap: TAX_BPS = 500; H burned on buys (token.burn(taxed)), ETH forwarded to treasury on sells (treasury.notifyTax{value: taxed}()).
    • Epoch-based staking rebase triggered on each swap via _maybeRebase().
    • No promotional, audit, or endorsement language.

All fields are correct.

@Ponx Ponx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Bot review verified; bitmask/flags/properties check out. LGTM.

@Ponx
Ponx merged commit 541d76f into main Sep 17, 2026
5 of 6 checks passed
@Ponx
Ponx deleted the hooks/ethereum/0x211d79ee98c5658989763bc367ded650a3a7d0cc branch September 17, 2026 00:56
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: 0x211d79ee98c5658989763bc367ded650a3a7d0cc on ethereum

1 participant