Skip to content

Add TTTHook hook on ethereum#570

Merged
marktoda merged 1 commit into
mainfrom
hooks/ethereum/0xdee7a2ffa963f82facbb12a4e3e8909e4a51a444
May 22, 2026
Merged

Add TTTHook hook on ethereum#570
marktoda merged 1 commit into
mainfrom
hooks/ethereum/0xdee7a2ffa963f82facbb12a4e3e8909e4a51a444

Conversation

@hooklist-generator
Copy link
Copy Markdown

Summary

Uniswap v4 hook for TTT/ETH pools launched by the TenThousandTokens factory. Applies a decaying buy fee (99%→1% over 98 blocks from launch) and a flat 1% sell fee; buy fees are converted to ETH via an internal pool swap and split between a FeeSplitter and a per-token buyback sink in afterSwap.

Flags

Flag Value
beforeInitialize true
afterInitialize false
beforeAddLiquidity false
afterAddLiquidity true
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

None

Closes #569

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

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

Project Deployment Actions Updated (UTC)
hooklist Ready Ready Preview, Comment May 21, 2026 9:10pm

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

Address Flags

Address suffix 0xa444 = 1010 0100 0100 0100 binary. All 14 flag bits match the hook file and getHookPermissions():

Flag Address bit File Source
beforeInitialize 1 true
afterInitialize 0 false
beforeAddLiquidity 0 false
afterAddLiquidity 1 true
beforeRemoveLiquidity 0 false
afterRemoveLiquidity 0 false
beforeSwap 0 false
afterSwap 1 true
beforeDonate 0 false
afterDonate 0 false
beforeSwapReturnsDelta 0 false
afterSwapReturnsDelta 1 true
afterAddLiquidityReturnsDelta 0 false
afterRemoveLiquidityReturnsDelta 0 false

Properties

  • dynamicFee: false — Correct. The hook has no beforeSwap and doesn't call updateDynamicLPFee(). Fees are implemented via afterSwapReturnsDelta, which is a post-swap delta mechanism, not a dynamic LP fee.
  • upgradeable: false — Correct. No proxy pattern, delegatecall, mutable implementation slot, or SELFDESTRUCT. Owner can update feeAddress and (once) factory, but the contract logic itself is immutable.
  • requiresCustomSwapData: false — Correct. _afterSwap accepts bytes calldata hookData but never reads it; swaps work normally without any custom data.
  • vanillaSwap: false — Correct. The hook uses afterSwapReturnsDelta: true to take fees from swappers (_handleBuy/_handleSell), materially changing the token amounts received. This disqualifies it from vanilla.
  • swapAccess: "none" — Correct. There is no beforeSwap hook, so no access control gate on swaps.

Metadata

  • name: "TTTHook" — Matches contractName from Etherscan (source_meta.json) and the NatSpec @title in source.
  • chainId: 1 — Correct for ethereum per chains.json.
  • verifiedSource: true — Confirmed by source_meta.json ("verified": true).
  • description — Accurate and substantiated by source logic: decaying buy fee (99%→1% over 98 blocks: STARTING_BUY_FEE=9900, RESTING_FEE=100, decays 100 bps/block), flat 1% sell fee, buy fees converted to ETH via _swapTokenToEth, split between IFeeSplitter.depositETH and a per-token buyback sink (SafeTransferLib.forceSafeTransferETH(token, buybackEth)). No promotional, audit, or endorsement language.

All fields verified against on-chain source. No issues found.

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. TTTHook on ethereum (0xdee7...a444). Bitmask 0x2444 → beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnsDelta. LGTM.

@marktoda marktoda merged commit c657a98 into main May 22, 2026
7 checks passed
@marktoda marktoda deleted the hooks/ethereum/0xdee7a2ffa963f82facbb12a4e3e8909e4a51a444 branch May 22, 2026 16:41
marktoda added a commit that referenced this pull request May 22, 2026
§6 step 4 and §7 step 3 of classify-hook.md said "If rejected or
absent, ... add a warning to the warnings array", but §8 only
enumerated the rejected-case templates. The AI followed §8's literal
forms and silently dropped warnings when a submitter left the Hook
Name or Description form fields blank.

Result: registry entries where 100% of the user-facing identity was
AI-authored looked indistinguishable from entries where a submitter
provided text that was vetted and accepted. Caught on PR #570 audit —
TTTHook had empty submitter fields and no warning was emitted.

Add two §8 templates for the absent case so warnings now flag every
field whose final value came from the AI rather than the submitter:

- Absent submitter name: "Submitter did not provide a name. Using
  AI-derived "<Y>"."
- Absent submitter description: "Submitter did not provide a
  description. Using AI-generated description."

Also add a closing paragraph making explicit that warnings should
fire on rejection OR absence — the threat model is "AI text landed
in the registry; reviewer needs an audit trail" — so absence and
rejection get the same treatment.

No code changes; assemble_hook.py already renders warnings as opaque
bullets via the existing test_generate_pr_body_renders_warnings_as_bullets
path. Existing tests unchanged and passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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:

1 participant