Skip to content

Add SharesHook hook on ethereum#656

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

Add SharesHook hook on ethereum#656
hooklist-generator[bot] wants to merge 1 commit into
mainfrom
hooks/ethereum/0x42ac35d497d63abab6e3efa9b0f7b0c76ab5c4cc

Conversation

@hooklist-generator

Copy link
Copy Markdown

Summary

Collects protocol fees (2.5% each) on buy and sell swaps for a designated native/token pool, updates an on-chain random seed on each swap, and notifies an external launch controller of swap activity. Triggers a token start on first liquidity addition once config is finalized.

Flags

Flag Value
beforeInitialize false
afterInitialize false
beforeAddLiquidity false
afterAddLiquidity true
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-proposed description rejected: exceeds 500 character limit and contains unverifiable claims about the wider Shares protocol ecosystem. Using AI-generated description.

Closes #655

@vercel

vercel Bot commented Jun 12, 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 12, 2026 7:23am

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

Flags — PASS

Address last 14 bits: 0xc4cc & 0x3fff = 0x04cc = 0b00_0100_1100_1100

All 14 flags match both the address bitmask and getHookPermissions() in source:

  • afterAddLiquidity=true (bit10) ✓
  • beforeSwap=true (bit7) ✓
  • afterSwap=true (bit6) ✓
  • beforeSwapReturnsDelta=true (bit3) ✓
  • afterSwapReturnsDelta=true (bit2) ✓
  • All others false ✓

Properties — PASS

  • dynamicFee=false: _beforeSwap returns 0 for the fee parameter; no updateDynamicLPFee() call. Fees are taken as BeforeSwapDelta/AfterSwapDelta amounts, not LP fee overrides. ✓
  • upgradeable=false: No proxy pattern, delegatecall, mutable implementation pointer, or SELFDESTRUCT. ✓
  • requiresCustomSwapData=false: hookData is decoded optionally in _swapTrader() for trader attribution; gracefully falls back to tx.origin/sender when empty. Swaps function correctly without hookData. ✓
  • vanillaSwap=false: Correct — hook returns non-zero BeforeSwapDelta (buy fee) and non-zero AfterSwapDelta (sell fee), materially altering swap cash flows. ✓
  • swapAccess="none": _beforeSwap has no caller-based access control. Non-tracked pools (wrong fee/tickSpacing/tokens) pass through silently; tracked pools have no allowlist, governance flag, or temporal gate. ✓

Metadata — PASS

  • verifiedSource=true: Confirmed by source_meta.json ("verified": true). ✓
  • chainId=1: Ethereum mainnet. ✓
  • name="SharesHook": Matches contract name in source. ✓
  • description: Accurately reflects the source logic — 2.5% buy and sell fees (BUY_FEE_PPM = SELL_FEE_PPM = 25_000 / 1_000_000), random seed update on every swap, external launch controller notification via _recordSwapActivity, and token start triggered by first afterAddLiquidity once config is finalized. No marketing, audit, or safety language. ✓

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.

SharesHook

0 participants