Add TTTHook hook on ethereum#570
Merged
marktoda merged 1 commit intoMay 22, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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
beforeSwapand doesn't callupdateDynamicLPFee(). Fees are implemented viaafterSwapReturnsDelta, which is a post-swap delta mechanism, not a dynamic LP fee. - upgradeable: false — Correct. No proxy pattern,
delegatecall, mutable implementation slot, orSELFDESTRUCT. Owner can updatefeeAddressand (once)factory, but the contract logic itself is immutable. - requiresCustomSwapData: false — Correct.
_afterSwapacceptsbytes calldatahookData but never reads it; swaps work normally without any custom data. - vanillaSwap: false — Correct. The hook uses
afterSwapReturnsDelta: trueto take fees from swappers (_handleBuy/_handleSell), materially changing the token amounts received. This disqualifies it from vanilla. - swapAccess: "none" — Correct. There is no
beforeSwaphook, so no access control gate on swaps.
Metadata
- name: "TTTHook" — Matches
contractNamefrom Etherscan (source_meta.json) and the NatSpec@titlein source. - chainId: 1 — Correct for
ethereumperchains.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 betweenIFeeSplitter.depositETHand 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.
marktoda
approved these changes
May 22, 2026
Contributor
marktoda
left a comment
There was a problem hiding this comment.
Bot review verified. TTTHook on ethereum (0xdee7...a444). Bitmask 0x2444 → beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnsDelta. LGTM.
3 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Properties
Warnings
None
Closes #569