Skip to content

Add OnlyHooksHook hook on ethereum#666

Open
hooklist-generator[bot] wants to merge 1 commit into
mainfrom
hooks/ethereum/0x903633d861ab705dc6a2ef91b478b9cab00f4044
Open

Add OnlyHooksHook hook on ethereum#666
hooklist-generator[bot] wants to merge 1 commit into
mainfrom
hooks/ethereum/0x903633d861ab705dc6a2ef91b478b9cab00f4044

Conversation

@hooklist-generator

Copy link
Copy Markdown

Summary

Takes a fee (default 1%) on the output token of every swap via afterSwapReturnsDelta, routing 50% to the treasury and 50% split evenly among the trader's active creator beneficiaries per SubscriptionRegistry. Unsubscribed traders send the full creator share to treasury. Trader identity is decoded from hookData if present, otherwise falls back to tx.origin; empty hookData never reverts.

Flags

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

Properties

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

Warnings

  • Submitter-proposed description rejected: exceeds 500-character limit and incorrectly describes creditToken as "for USDC" when the code accepts any ERC20 token via Currency.wrap(token). Using AI-generated description.

Closes #665

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment Jun 19, 2026 11:54am

Request Review

@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/0x903633d861ab705dc6a2ef91b478b9cab00f4044.json

Address Flags

Address 0x903633d861ab705dc6a2ef91b478b9cab00f4044 → last 14 bits = 0x0044 = 68 = 0b01000100:

Bit Flag Expected Hook File
6 afterSwap true true ✓
2 afterSwapReturnsDelta true true ✓
all others false false ✓

Confirmed by getHookPermissions() in source: p.afterSwap = true; p.afterSwapReturnDelta = true.

Properties

  • dynamicFee: false — No beforeSwap hook, no lpFeeOverride, no updateDynamicLPFee() call. ✓
  • upgradeable: false — No proxy pattern, no delegatecall, no mutable implementation storage, no SELFDESTRUCT. ✓
  • requiresCustomSwapData: false_trader() decodes hookData only if length >= 32 and address is non-zero; otherwise falls back to tx.origin. Empty hookData never causes a revert. ✓
  • vanillaSwap: falseafterSwapReturnsDelta is true and the hook takes a fee from the output currency via poolManager.take() + positive return delta, materially altering swap output. Correctly false. ✓
  • swapAccess: "none" — No beforeSwap flag; afterSwap contains no access control gating. ✓

Metadata

  • chainId: 1 matches ethereum in chains.json. ✓
  • verifiedSource: true confirmed by source_meta.json. ✓
  • name: "OnlyHooksHook" matches the Solidity contract name exactly. ✓
  • description accurately describes all key behaviors: 1% default fee (hookFeeBps = 100, BPS = 10,000) on the unspecified (output) token via afterSwapReturnsDelta; 50% protocol cut to treasury (protocolShareBps = 5000); creator half split evenly among activeBeneficiaries from SubscriptionRegistry; unsubscribed traders route full creator share to treasury; trader identity decoded from hookData or falls back to tx.origin; empty hookData never reverts. No promotional, audit, safety, or affiliation language. ✓

All checks pass.

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: OnlyHooks

0 participants